Rewritten nebula shader

This commit is contained in:
R34nd0 2024-01-13 17:23:49 +05:00
commit 0c684417f5
5 changed files with 42 additions and 21 deletions

12
shaders/nebula.gdshader Normal file
View file

@ -0,0 +1,12 @@
shader_type canvas_item;
uniform sampler2D noise_texture;
uniform float divisor = 10.0;
uniform vec2 offset;
uniform vec3 nebula_color : source_color;
void fragment() {
float color_amount = texture(noise_texture,fract(UV+offset/divisor)).r;
COLOR = vec4(mix(vec3(0),nebula_color,color_amount),1);
}