Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/osl.cpp
| Show First 20 Lines • Show All 1,101 Lines • ▼ Show 20 Lines | if(shader->need_update) { | ||||
| if(shader->graph_bump) { | if(shader->graph_bump) { | ||||
| shader->graph_bump->finalize(scene, | shader->graph_bump->finalize(scene, | ||||
| true, | true, | ||||
| true, | true, | ||||
| shader->has_integrator_dependency, | shader->has_integrator_dependency, | ||||
| shader->displacement_method == DISPLACE_BOTH); | shader->displacement_method == DISPLACE_BOTH); | ||||
| } | } | ||||
| /* When rendering in the viewport, it's better to avoid updating attributes | |||||
| * whenever the shader is compiled. Otherwise, simply tweaking the parameters | |||||
| * might cause all attributes to be re-synced due to shader optimization. */ | |||||
| if(scene->params.background) { | |||||
| shader->update_attributes(scene); | |||||
| } | |||||
| current_shader = shader; | current_shader = shader; | ||||
| shader->has_surface = false; | shader->has_surface = false; | ||||
| shader->has_surface_emission = false; | shader->has_surface_emission = false; | ||||
| shader->has_surface_transparent = false; | shader->has_surface_transparent = false; | ||||
| shader->has_surface_bssrdf = false; | shader->has_surface_bssrdf = false; | ||||
| shader->has_bssrdf_bump = false; | shader->has_bssrdf_bump = false; | ||||
| shader->has_volume = false; | shader->has_volume = false; | ||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | |||||