Water refraction in rtt

Repro: https://playground.babylonjs.com/#UNGKGD#33

The problem is a combination of 2 forum threads.
(registerView question + Simple stylized water shader)

You should be able to see in the mini RTT that the water refraction is incorrect. I tried a bunch of different options but nothing seemed to work. It seems like the water_refraction is showing up in the water_refraction in the rtt ? Can’t quite wrap my head around this…

Unfortunately you will need two different RTT to make it work correctly here. cause the mini map and the main one are using different cameras.

I would advise to disable it in the minimap for perf purpose if possible.

1 Like

I see, so the refraction in the minimap is using the RTT generated via the depth calculations from the main camera. That’s why its showing up wrong. I can’t disable the water in the minimap. :frowning: Guess this means the water shader has outlived its usefulness…

Thanks, closing this. Marking as solved.