21 lines
No EOL
522 B
Text
21 lines
No EOL
522 B
Text
shader_type spatial;
|
|
|
|
render_mode unshaded, cull_disabled,depth_prepass_alpha;
|
|
|
|
uniform sampler2D noise_texture: repeat_enable;
|
|
uniform sampler2D fire_gradient;
|
|
uniform float height: hint_range(0.0, 1.0, 0.01);
|
|
|
|
void fragment() {
|
|
float noise = texture(noise_texture,UV + vec2(0,fract(TIME/5.0))).x;
|
|
|
|
ALBEDO = texture(fire_gradient,vec2(UV.y+noise*0.1,0)).rgb;
|
|
float interpolated = 0.;
|
|
if (UV.y > 0.0) {
|
|
interpolated = UV.y/height;
|
|
}
|
|
|
|
if (UV.y < height) {
|
|
ALPHA = step(0.5,mix(noise,1.0,interpolated-0.3));
|
|
}
|
|
} |