From febeeb9b65e577a9a8fd5a905a4029932fde1bce Mon Sep 17 00:00:00 2001 From: Xonk Date: Thu, 1 Jun 2023 20:48:27 -0400 Subject: [PATCH] fix material masks when POM is on oopsie doopsie --- shaders/gbuffers_all_solid.fsh | 26 +++++++++++++++++++++++++- shaders/shaders.properties | 8 ++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/shaders/gbuffers_all_solid.fsh b/shaders/gbuffers_all_solid.fsh index fdaca3a..20ae46e 100644 --- a/shaders/gbuffers_all_solid.fsh +++ b/shaders/gbuffers_all_solid.fsh @@ -409,8 +409,32 @@ void main() { SpecularTex.r = max(SpecularTex.r, Puddle_shape); SpecularTex.g = max(SpecularTex.g, Puddle_shape*0.04); + #ifdef ENTITIES + if(NameTags == 1) SpecularTex = vec4(0.0); + #endif - gl_FragData[2] = SpecularTex ; + + gl_FragData[2].rg = SpecularTex.rg; + + #if SSS_TYPE == 0 + gl_FragData[2].b = 0.0; + #endif + + #if SSS_TYPE == 1 + gl_FragData[2].b = SSSAMOUNT; + #endif + + #if SSS_TYPE == 2 + gl_FragData[2].b = SpecularTex.b; + if(SpecularTex.b < 65.0/255.0) gl_FragData[2].b = SSSAMOUNT; + #endif + + #if SSS_TYPE == 3 + gl_FragData[2].b = SpecularTex.b; + #endif + + if(EMISSIVE > 0) gl_FragData[2].a = 0.9; + if(LIGHTNING > 0.0) gl_FragData[2].a = 0.9; //////////////////////////////// //////////////////////////////// FINALIZE diff --git a/shaders/shaders.properties b/shaders/shaders.properties index bc29a34..6a4de56 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -203,7 +203,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds] ######## moonphase based weather uniform.float.Cumulus_Cov = smooth( if( \ moonPhase == 0, 0.7, \ - moonPhase == 1, 0.0, \ + moonPhase == 1, 0.9, \ moonPhase == 2, 0.0, \ moonPhase == 3, 0.0, \ moonPhase == 4, 0.0, \ @@ -212,8 +212,8 @@ uniform.float.Cumulus_Cov = smooth( if( \ 0.0 ), 5, 5) uniform.float.Alto_Cov = smooth( if( \ - moonPhase == 0, 0.3, \ - moonPhase == 1, 0.0, \ + moonPhase == 0, 0.1, \ + moonPhase == 1, 1.0, \ moonPhase == 2, 0.0, \ moonPhase == 3, 0.0, \ moonPhase == 4, 0.0, \ @@ -223,7 +223,7 @@ uniform.float.Alto_Cov = smooth( if( \ uniform.float.Alto_Den = smooth( if( \ moonPhase == 0, 0.1, \ - moonPhase == 1, 0.0, \ + moonPhase == 1, 0.1, \ moonPhase == 2, 0.0, \ moonPhase == 3, 0.0, \ moonPhase == 4, 0.0, \