From f22aa95189dec04c6f005e58cc470a97faca24a5 Mon Sep 17 00:00:00 2001 From: Xonk Date: Thu, 21 Mar 2024 23:51:19 -0400 Subject: [PATCH] fix speculars and emissives being disabled --- shaders/dimensions/all_translucent.fsh | 2 ++ shaders/dimensions/composite1.fsh | 19 ++++++------------- shaders/world0/shadow.fsh | 1 - 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/shaders/dimensions/all_translucent.fsh b/shaders/dimensions/all_translucent.fsh index 9550268..0ac66a6 100644 --- a/shaders/dimensions/all_translucent.fsh +++ b/shaders/dimensions/all_translucent.fsh @@ -355,7 +355,9 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) #endif + vec4 COLORTEST = vec4(Albedo, UnchangedAlpha); + #ifdef BIOME_TINT_WATER if (iswater > 0.95) COLORTEST.rgb = color.rgb; diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index b57bd35..bae21e4 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -1014,7 +1014,6 @@ void main() { if(shadowMapFalloff > 0.0){ shadowMap = vec3(0.0); vec3 ShadowColor = vec3(0.0); - vec3 COLOR = vec3(1.0) ; projectedShadowPosition = projectedShadowPosition * vec3(0.5,0.5,0.5/6.0) + vec3(0.5); @@ -1047,10 +1046,6 @@ void main() { shadowMap += vec3(shadow2D(shadow, projectedShadowPosition).x / SHADOW_FILTER_SAMPLE_COUNT); #endif } - - #ifdef TRANSLUCENT_COLORED_SHADOWS - DirectLightColor = ShadowColor; - #endif #else @@ -1321,16 +1316,14 @@ void main() { gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * albedo; - // gl_FragData[0].rgb = Direct_lighting; + #ifdef Specular_Reflections + vec2 specularNoises = vec2(noise, R2_dither()); + DoSpecularReflections(gl_FragData[0].rgb, viewPos, feetPlayerPos_normalized, WsunVec, specularNoises, normal, SpecularTex.r, SpecularTex.g, albedo, DirectLightColor*Shadows*NdotL, lightmap.y, hand); + #endif - // #ifdef Specular_Reflections - // vec2 specularNoises = vec2(noise, R2_dither()); - // DoSpecularReflections(gl_FragData[0].rgb, viewPos, feetPlayerPos_normalized, WsunVec, specularNoises, normal, SpecularTex.r, SpecularTex.g, albedo, DirectLightColor*Shadows*NdotL, lightmap.y, hand); - // #endif - - // Emission(gl_FragData[0].rgb, albedo, SpecularTex.a); + Emission(gl_FragData[0].rgb, albedo, SpecularTex.a); - // if(lightningBolt) gl_FragData[0].rgb = vec3(77.0, 153.0, 255.0); + if(lightningBolt) gl_FragData[0].rgb = vec3(77.0, 153.0, 255.0); } diff --git a/shaders/world0/shadow.fsh b/shaders/world0/shadow.fsh index b3a9dc0..1299a71 100644 --- a/shaders/world0/shadow.fsh +++ b/shaders/world0/shadow.fsh @@ -44,7 +44,6 @@ float blueNoise(){ void main() { - gl_FragData[0] = vec4(1); gl_FragData[0] = texture2D(tex,texcoord.xy) * color;