Page MenuHome

Allow the use of background shader instead of hard-coded default_background for OSL

Authored by Alex Fuller (mistaed) on Jan 19 2020, 8:48 PM.



I managed to get some time to debug an issue I've been having in GafferCycles where the SVM backend and background shaders seem to work correctly, however for the OSL backend they only partially worked only if the shader graph had no texture-mapping derived shader, otherwise it would completely break and become black. More information in the forum:

The patch will make the OSL backend look for any assigned shader for background much like how the light manager will look for one and then revert to the default_background shader if there is none. The bug never was triggered for Cycles standalone or Blender because scene->default_background's shader graph was always modified instead of making a new shader that is assigned to background.

Diff Detail

rB Blender