Minor island shader tweak.

WorldChunkRefactoring
Martin Felis 2023-06-11 12:45:19 +02:00
parent 6afc0f3424
commit 120d1dea7d
1 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,9 @@ void vertex() {
} }
vec3 color_ramp(float h) { vec3 color_ramp(float h) {
if (h < 0.4f) { if (h < 0.35f) {
return vec3(0, 0, 0.3);
else if (h < 0.4f) {
return vec3(0, 0, 0.6); return vec3(0, 0, 0.6);
} else if (h < 0.45f) { } else if (h < 0.45f) {
return vec3(0, 0, 0.7); return vec3(0, 0, 0.7);
@ -14,11 +16,11 @@ vec3 color_ramp(float h) {
return vec3(0, 0, 1); return vec3(0, 0, 1);
} else if (h < 0.55){ } else if (h < 0.55){
return vec3(0.8, 0.8, 0.1); return vec3(0.8, 0.8, 0.1);
} else if (h < 0.6){ } else if (h < 0.65){
return vec3(0, 0.6, 0); return vec3(0, 0.6, 0);
} else if (h < 0.68){ } else if (h < 0.75){
return vec3(0, 0.4, 0); return vec3(0, 0.4, 0);
} else if (h <= 0.78){ } else if (h <= 0.85){
return vec3(0.6, 0.6, 0.6); return vec3(0.6, 0.6, 0.6);
} else if (h < 1.0){ } else if (h < 1.0){
return vec3(0.8, 0.8, 0.8); return vec3(0.8, 0.8, 0.8);
@ -43,10 +45,8 @@ float borderFalloffCircle(vec2 uv) {
void fragment() { void fragment() {
vec4 texture_color = texture(TEXTURE, UV); vec4 texture_color = texture(TEXTURE, UV);
COLOR.rgb = vec3(abs(UV.x - 0.5) * 2.0);
//COLOR.rgb = color_ramp(texture_color.r * borderFalloffCircle(UV) * 1.8);
COLOR.rgb = vec3(texture_color.r * borderFalloff(UV) * 1.8); COLOR.rgb = vec3(texture_color.r * borderFalloff(UV) * 1.8);
// COLOR.rgb = vec3(texture_color.r * borderFalloffCircle(UV) * 1.8);
} }