how do u implement a heat distortion effect in godot?
it would basically be a viewport texture 'displaced' by a UV translated/animated normal map or bump map(noise) to emulate refraction through the medium of heated air/gas.
This is for unity but it should give you an idea:
https://lindenreidblog.com/2018/03/05/heat-distortion-shader-tutorial/
and heres a godot reddit topic from 7(!!) years ago where in one of the replies you can find a shadergraph for this effect, it's old, sure but shadergraph should still work the same so it might work for you too.
I find searching Shadertoy is a good place to start. You usually cannot steal the code, but it's fair to get ideas or look at the names of algorithms to do the research yourself. This is one I found to show the basic idea.
Ant yes i got the idea, but i dont want to use shadergraph. ill setup a refraction material and convert it to a shader and see how the code looks
Condemnatory i actually looked at that allready, ill try to get it working in godot
there should be ways of getting the shaderlang code from the shadergraph, but it won't be as convenient to read since the variables and functions produced will all have nondescript names.
Wow, I can't really find any information on this, though it would seem like a common effect. I guess this is one problem with Unity being so popular. Now barely anyone knows anything with game dev or graphics programming without using Unity.
This ok? This person is good with shader.
Oh, yes, sorry. I forgot about that one. I know them. Here is the code.
https://bitbucket.org/arlez80/heat-haze-shader/src/master/heathaze.shader
© 2022 - 2024 — McMap. All rights reserved.