Background shader OSL breaks with texture mapping-based nodes

Hi all,

I have something strange happening here. I am using Cycles standalone latest patches from 2.82 (via GafferCycles) here and have noticed that any texture connected to the background shader will turn out black but only in OSL mode. Those same textures are working fine in other lights and shaders. This includes all textures that I’ve tested so far, like noise and sky not just image-based ones. SVM mode is working great also. Using a shader graph with a background shader and a non-texture node like a blackbody is working great also in OSL/SVM consistently.

I’ll see if I can reproduce it from Cycles command line soon. I couldn’t trigger the issue in the latest Blender 2.82 build.


Possible fix in: