Get water surface in post effect Hello all. I'm newbie on this forum and my english not very good. Sorry >< I created a volumetric lighting with a shadow for my water. Right now I need to compute a max height relative to the water (like a volume water depth). So, I have only screen space uv and 4 clip space vertexes (graphics.blit of unity3d). How I can reproduce the water vertex world space position? My water always is horizontal. Like in this screen. I have one bad idea, but I don't like it. I can render the water depth to texture and use this depth for reconstruct world space position in the lighting post effect. Also, I can reuse this water depth for manual writing to unity depth buffer (for correct depth of field posteffect). Also, it's only way to write to depth texture with transparent geometry. I tried work with a matrix transformations of space (posteffect quad -> world space quad -> transform this quad using TRS (model) matrix of water -> view -> projectrive -> clip), but it does not work for me. Any idea? https://ift.tt/eA8V8J
Hello all. I'm newbie on this forum and my english not very good. Sorry >< I created a volumetric lighting with a shadow for my water. Right now I need to compute a max height relative to the water (like a volume water depth). So, I have only screen space uv and 4 clip space vertexes (graphics.blit of unity3d). How I can reproduce the water vertex world space position? My water always is horizontal. Like in this screen. I have one bad idea, but I don't like it. I can render the water depth to texture and use this depth for reconstruct world space position in the lighting post effect. Also, I can reuse this water depth for manual writing to unity depth buffer (for correct depth of field posteffect). Also, it's only way to write to depth texture with transparent geometry. I tried work with a matrix transformations of space (posteffect quad -> world space quad -> transform this quad using TRS (model) matrix of water -> view -> projectrive -> clip), but it does not work for me. Any idea?
from GameDev.net http://bit.ly/2IunrAp
from GameDev.net http://bit.ly/2IunrAp
ليست هناك تعليقات