I’ve picked up my project for the first time in a long time and the API’s shifted a bit.
A shader that previously worked is now triggering an error:
Shader [Shader Id 133 shader-proc] requires texture sampler [noise] which has not been set, while rendering [Pass:RenderPassShadowDirectional-Light | SHADOW Light FACE 0 | FlameConeExtended]
I’m setting the parameter whilst programmatically generating the material, and as mentioned this approach worked previously.
I’ve seen discussion on this forum that some of the API updates may have caused errors that only show for the first render of the material, but I’d like to know what I can do to ensure I’ve using my custom shader materials properly.
Hmm, I’m not aware of any changes here that changed the behaviour. We added this error message (when using the debug engine only) where before we had no message and possibly incorrect behaviour / using this material property from some previous material that set it up.
Try putting a breakpoint to where the message is printed, and inspect the material and similar.
My previously exported works fine but for some reason since the engine update it no longer seems to be reading the asset correctly. This function is called to modify materials on first use and store them in a global namespace - so they should only get generated once.
Looking at the generated material it appears to have the parameters set correctly, but perhaps I’m looking at the wrong area. Is there a preferred way to set a sampler2d programmatically from the asset library? I’m afraid I’m a bit lost at the moment as to what could be causing this…
I think it is something to do with the engine trying to render a shadow map with your shader and cannot find noise texture sampler. Try disabling shadow casts for the box. @mvaligursky can probably give a more educated answer.