Sign in to follow this  

How to mix water reflection color with water refraction color, how to draw it properly

This topic is 816 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So the main problem is when the sun goes down i get sharer agnles and the look of the water looks really bad

 

for now i do (reflectionColor + refractionColor) / 2.0 -> and that gives me such results

 

2015_09_24_19.12.29.jpg

2015_09_24_19.21.00.jpg

 

2015_09_24_19.22.58.jpg

2015_09_24_19.23.32.jpg

 

 

 

 

 

 

how can i fix that?

Share this post


Link to post
Share on other sites

Well, i can tell you the hack i used first.

 

I cheated.

 

I created two materials in my game, one for water during the day and another for water during nighttime as the way light behaves had the same kind of odd issues for me. In absence of a proper solution, i simple lerp'ed between these two materials during sunset, along with other settings.

 

My next and proper solution (in unreal engine) was to completely turn off the directional light at night, set the light colour to black, and lerp the skybox colour down to nearly nothing so it's nothing more than a very dim light as would be emitted by starlight and moonlight. I also slightly increased the opacity of the water.

 

Of course my game doesn't have a moon in view, so this makes things a bit easier.

 

Is this a custom engine you are using?

 

Let me know if this helps at all!

Edited by braindigitalis

Share this post


Link to post
Share on other sites

aye its custom, however i think that answer doesn't help me at all ;] im searching for something like PBR

 

 

images show only a quad with a normalmap applied so i can reflect refract directional light (sun)

 

 

i rather though about the night/day cycle like when the sun goes down the less the light the more the moon is visible so basically (something like -dot(sun_pos, watersurf_normal) will tell me how much of sunlight and moonlight i can put where if that dot is <= 0 then moonlight brigts at full intensity. 

 

However i need to fix the shader to make this more realistic look.

 

the best thing would be not to use cubemapping, and all samples i saw on the net use that.

Edited by ?W ?I ?R ?E ?D ? ?C ?A ?T

Share this post


Link to post
Share on other sites

This topic is 816 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this