The build version too to old to compile the shader?

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
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 +

Pinging @LeXXik so he can update the original project.


Thank you, @Leonidas ! This is fixed now.


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.

1 Like

Thanks a lot @LeXXik!!! Amazingly fast, and works perfect.

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

1 Like

Great! Thanks a lot @Leonidas