hi there it seems the version canvas shader too old to run in editor. do u have any time to fix the issues? very thanks of it
https://playcanvas.com/project/712960/overview/water-reflections
anyone can help ?
Hi @tongfei_Guo and welcome,
Yes, shader chunks are a private API and are subject to change from time to time. In this case a chunk has been removed so you can easily fix this error by replacing line 286 in the water.js
script with this (note what I’ve commented out):
material.customFragmentShader = pc.programlib.gammaCode(app.scene.gamma) + pc.programlib.tonemapCode(app.scene.toneMapping) /*+ pc.shaderChunks.rgbmPS*/ + pc.shaderChunks.screenDepthPS +
app.assets.find("waterPS").resource;
Pinging @LeXXik so he can update the original project.
Hello! First of all, thank you @LeXXik for this great project.
I’ve tried to make it work and the background doesn’t show up, I get this error: Cannot read properties of undefined (reading ‘meshInstances’)
Can you please look at it? Thanks a million!
Hello, @Hector_Zapata. The project is a bit old, so some techniques are a bit outdated. I’ve fixed the error, though. Should work now.
Hello @LeXXik,
I’m really sorry but it broke again and I don’t know how to fix it:
"
Shader [Shader Id 7 standard] requires texture sampler [uSceneDepthMap] which has not been set, while rendering [Pass:RenderAction 4-6 Cam: Camera | Camera | World | Untitled]"
Hi @Hector_Zapata,
Check here on how to fix that: Lots of shader error messages after new update - #2 by yaustar