Good morning, I have started studying how to create custom shaders in Playcanvas and it is a very powerful framework.
I started from [PlayCanvas 3D HTML5 Game Engine] project and tried to fix the issue of changing the version of uDepthMap
to uSceneDepthMap
using pc.shaderChunks.screenDepthPS to reconstruct the logic of the foam lines in the water.
I am encountering problems in my shader because the error
Shader [Shader Id 3 WaterToon-proc] requires texture sampler [uSceneDepthMap] which has not been set, while rendering [Pass:RenderPassForward | Camera | World(OPAQUE) | Node: Untitled | Material: DynamicWater_Material | Untitled]
is reported during pre-loading script but then the shader does not seem to work.
Checking the camera’s requestSceneDepthMap
property in CameraCompinent, it is activated, but non work.
My public project is https://playcanvas.com/project/1208364/overview/watertoon and I am seeking assistance to better understand my error.
Thank you.