Rewritten nebula shader
This commit is contained in:
parent
bef15301cb
commit
0c684417f5
5 changed files with 42 additions and 21 deletions
12
shaders/nebula.gdshader
Normal file
12
shaders/nebula.gdshader
Normal 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);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue