Realistic water node
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Realistic water node
https://youtu.be/bjzmA5lJ5Mk
I've improved the reflection shader and added flow maps for the water to get better results for things that are actually in the water. I have not added refraction yet but once I do it should be a pretty good alternative for water rendering.
I've improved the reflection shader and added flow maps for the water to get better results for things that are actually in the water. I have not added refraction yet but once I do it should be a pretty good alternative for water rendering.
Re: Realistic water node
I finally managed to get a "Custom Three Layer Cloud Node" (tbw) reflected on a simple "Water Reflection Node" (elvman)..
The code is a mess, so I'll post it when it looks better..
The code is a mess, so I'll post it when it looks better..
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Realistic water node
Vectrotek I added Refraction to my water node I'll post some screenshots later.
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Realistic water node
Pics
Pictures are hard to see so I posted a video link.
Pictures are hard to see so I posted a video link.
Last edited by The_Glitch on Fri Jul 15, 2016 7:26 pm, edited 1 time in total.
Re: Realistic water node
For the love of god use clamp() on your refracted screen space coordinates, cause otherwise you'll refract from the other side of the screen at the edges... also grab the depth map and clamp against that so you dont refract from the stuff in front of the water
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Realistic water node
Materials are using ETC_CLAMP. I'll look in to it some more. Just got it up and running before I posted.
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Realistic water node
Found my mistake I set the array for the materials to be clamped after I set the materials.
Here's the new pictures:
Here's the new pictures:
Re: Realistic water node
If I use "createDeviceEX()" with HLSL/D3D and then rendering to a Render Target the Z Buffer has problems..
It also causes Occlusion Queries in Render Targets to malfunction.
(I hope its not my machine)
Here is Lensflare, 3 layers of Moving Clouds,
Water Reflection / Refraction (clamped properly),
FXAA Antialiassing and Posterization.
It also causes Occlusion Queries in Render Targets to malfunction.
(I hope its not my machine)
Here is Lensflare, 3 layers of Moving Clouds,
Water Reflection / Refraction (clamped properly),
FXAA Antialiassing and Posterization.
Re: Realistic water node
I think its possible to include the "Edge Wave Dampening" functionality offered by the extra "Depth Buffer" Render
WITHOUT that Depth Buffer Render using "Distance From Plane" where the plane would be parallel to
the water. If it works then EVERYTHING can be done in the water shader without the need
to render the depth and all those complex calculations seen in tbw's XML based PostProc.
My version is based on Elvman's Water Node but will have lots of extra functionality.
WITHOUT that Depth Buffer Render using "Distance From Plane" where the plane would be parallel to
the water. If it works then EVERYTHING can be done in the water shader without the need
to render the depth and all those complex calculations seen in tbw's XML based PostProc.
My version is based on Elvman's Water Node but will have lots of extra functionality.
Re: Realistic water node
Reflecting Lens Flare has a few problems.
The math involved makes it so that it can't be
reflected like everything else and the "Sprites"
or "Images" of the "Flares" will not be "Plane Clipped"
(used in water rendering) so I had to add a
function to the Water Renderer called
"ExcludeItems(ISceneNode* Node);" which
then sets this lens flare node to invisible
from within the water renderer itself. It worked.
Somehow the Billboard used for the sun itself
survived the "setVisible(false);" from the water
renderer so it reflects just fine.
Everything happens in a very specific order.
Also, when I disabled the cube map I had
to re-code all the Post Processor and Water Renderer
calls to setRenderTarget() to include the basis Background Colour.
Re: Realistic water node
I have a working formula for determining on which side of a plane a point is.
My question is: "Is it possible to emulate " PrivateVideoDriver->setClipPlane(0, refractionClipPlane, true);"
in a shader (GLSL or HLSL)" using such a formula?
My question is: "Is it possible to emulate " PrivateVideoDriver->setClipPlane(0, refractionClipPlane, true);"
in a shader (GLSL or HLSL)" using such a formula?