heat distortion shader?
Asked Answered
A

7

0

how do u implement a heat distortion effect in godot?

Arthralgia answered 2/8, 2022 at 14:27 Comment(0)
A
0

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.

Ant answered 2/8, 2022 at 20:55 Comment(0)
C
0

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.

https://www.shadertoy.com/view/XslXWr

Condemnatory answered 2/8, 2022 at 22:51 Comment(0)
A
0

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

Arthralgia answered 3/8, 2022 at 7:8 Comment(0)
A
0

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.

Ant answered 3/8, 2022 at 8:3 Comment(0)
C
0

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.

Condemnatory answered 3/8, 2022 at 8:18 Comment(0)
R
0

This ok? This person is good with shader.

Reactionary answered 3/8, 2022 at 8:20 Comment(0)
C
0

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

Condemnatory answered 3/8, 2022 at 9:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.