Hi, The other day I asked it here : http://neatcorporation.com/forums/viewtopic.php?f=4&t=2039 no one seems to know the answer although it should be not that hard. I just need some clue. The question is how to achieve the mirage effect (the reflections) that is appeared on the road in the image below: It should be a shader…
Take the for product of the blue channel of the camera vector and the vertex normals. This should give you a fresnel that only works vertically. From here, you want a road normalmap that has the waves. To make it happening only in the distance, you can use pixel depth. Then lerp between 0 and 1 metallic based on the mask…
I'm wondering if there isn't some automatic way of doing this. You can use the same "mirage streak" texture on the entire road, but make use of pre-authored mipmap levels that have a different transparency for each level. This way you associate transparency with distance from the camera: the texture will automatically…
This should really be done as a screen space effect, not a custom road shader. What you're seeing are not reflections. They're light rays being bent by pockets of hot air: The perception of it being a reflection is part of the illusion. You never actually see the road underneath.
Turned out nicely! :) About the vertex normal thing - I used that too , so it can appear only on faces that looks up (z+). So, if you would rotate the road to its side or upside-down, the effect would not happen. This is optional though and yes it does without it, but this is like a small fix for an issue that could happen…
Huge thanks @Obscura, I've learned a lot about some new nodes that I've never used before with the image you've made. So today our city (Babolsar) was strangely very snowy and they closed our school, so I didn't waste time and managed to make the mirage effect with good realtime reflections. The note is , @radiancef0rge…
This is fresnel. You should be able to see this in any modern engine using PBR. If you are not seeing this, your roughness is incorrect or your camera is not perpendicular enough the surface normal.
Okay so this is what I have now (shown below), thanks. I'll fine tune and may change the mirage normal map later. Also the image shows some reflection errors which also I'll work on it sometime.
Hey all, thanks for the replies I am reading them and some are actually really informative, but I should solve a misunderstanding here. Shader forge is a node-based shader editor tool just like the one that is used in Unreal or CryEngine, Or the one that is used in 3DS Max. So yeah, nothing automatic or magical happenes…