tweaking starlight shader

This commit is contained in:
betalars 2023-07-10 16:19:40 +02:00
parent fa8dac7748
commit 971ffb472d
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
shader_type spatial;
render_mode blend_add, specular_disabled;
render_mode blend_add, specular_disabled, ambient_light_disabled;
uniform float nebula_brightness = 4;
uniform vec2 nebula_scale = vec2(1.5);
@ -23,12 +23,12 @@ vec2 rotateUV(vec2 uv, vec2 pivot, float rotation)
void fragment() {
ALBEDO = vec3(.0,
texture(starlight_textures,UV).x * max(sin(TIME + 10.0 * texture(starlight_textures,UV).y), .0),
texture(starlight_textures,UV*1.5).x * 2.0*pow(max(sin(TIME + 10.0 * texture(starlight_textures,UV).y), .0), 5.0),
texture(starlight_textures,
clamp(
UV / nebula_scale + drift_compensation + 1.0 *
texture(starlight_noise, rotateUV(
UV / nebula_scale + noise_strength * texture(starlight_noise, rotateUV(UV, -rotation_pivot, TIME*rotation_speed)).yx,
UV / nebula_scale + noise_strength * texture(starlight_noise, rotateUV(UV, -rotation_pivot, TIME*rotation_speed)).yz,
rotation_pivot, TIME*rotation_speed)
).xz,
.0, 1.0))