Water Shader With Reflections?

Hi there!

I used to use the After the Flood water shader script from this demo here:
https://playcanvas.com/project/712960/overview/water-reflections

But while it still mostly works, it seems to have started accruing some errors as the playcanvas engine gets updated. Anyone has any suggestions of other water shaders with reflections out there that seem to be running smoothly as of 2023? Thanks in advance,

Hugo

@LeXXik , have you got an updated version of this project?

Nope, unfortunately I don’t have an updated one. The API changed quite a bit. I moved the render target from layers to the camera, but I get some errors with the depth layer, where it tries to write to the active texture. Needs some time to look into, which I haven’t managed to find yet.

1 Like

It’s not very clear how to render multiple layers with possibly different objects to multiple render targets.Why did we change it to One single render target on the camera?

See the recommended setup here:
https://developer.playcanvas.com/en/user-manual/graphics/layers/#recommended-setup

1 Like

I have updated the project to work with the latest engine release.

3 Likes


Anyone else get weird performance on this demo? My phone seems to render a few frames then stutter, repeat… weird

Seems to work fine on my iPhone 12.

It seems nothing renders during those frames. Do you have any plugins? Maybe try using incognito tab.