diff -ru bedrock-vanilla-1.8.0/shaders/glsl/renderchunk.fragment broken-shader-1.8.0/shaders/glsl/renderchunk.fragment --- bedrock-vanilla-1.8.0/shaders/glsl/renderchunk.fragment 2018-12-17 21:25:12.000000000 +0900 +++ broken-shader-1.8.0/shaders/glsl/renderchunk.fragment 2018-12-21 14:47:20.000000000 +0900 @@ -26,6 +26,11 @@ varying vec4 fogColor; #endif +// Adding a single "varying" variable somehow breaks the shader. +#ifndef BYPASS_PIXEL_SHADER +varying vec4 theProblem; +#endif + #include "uniformShaderConstants.h" #include "util.h" @@ -62,6 +67,9 @@ vec4 inColor = color; + // Use the variable to prevent it from being optimized out. + inColor = theProblem; + #if defined(BLEND) diffuse.a *= inColor.a; #endif diff -ru bedrock-vanilla-1.8.0/shaders/glsl/renderchunk.vertex broken-shader-1.8.0/shaders/glsl/renderchunk.vertex --- bedrock-vanilla-1.8.0/shaders/glsl/renderchunk.vertex 2018-12-17 21:25:12.000000000 +0900 +++ broken-shader-1.8.0/shaders/glsl/renderchunk.vertex 2018-12-21 14:46:58.000000000 +0900 @@ -22,6 +22,11 @@ varying vec4 fogColor; #endif +// Adding a single "varying" variable somehow breaks the shader. +#ifndef BYPASS_PIXEL_SHADER +varying vec4 theProblem; +#endif + #include "uniformWorldConstants.h" #include "uniformPerFrameConstants.h" #include "uniformShaderConstants.h" @@ -113,5 +118,8 @@ // If the FOG_COLOR isn't used, the reflection on NVN fails to compute the correct size of the constant buffer as the uniform will also be gone from the reflection data color.rgb += FOG_COLOR.rgb * 0.000001; #endif + + // Use the variable to prevent it from being optimized out. + theProblem = color; #endif }