fix litematica schematic boxes

This commit is contained in:
Xonk
2025-03-18 16:33:55 -04:00
parent 43096d747a
commit 485d1a3dd7
3 changed files with 16 additions and 3 deletions

View File

@ -34,6 +34,7 @@ varying vec4 color;
flat varying vec4 lightCol;
#endif
uniform int renderStage;
uniform int isEyeInWater;
uniform sampler2D texture;
@ -269,7 +270,7 @@ uniform vec3 eyePosition;
#ifdef DAMAGE_BLOCK_EFFECT
/* RENDERTARGETS:11 */
#else
/* DRAWBUFFERS:29 */
/* RENDERTARGETS:2,9,11 */
#endif
void main() {
@ -340,6 +341,9 @@ void main() {
#endif
#if !defined DAMAGE_BLOCK_EFFECT
gl_FragData[2] = vec4(0.0);
#ifdef LINES
#ifndef SELECT_BOX
if(SELECTION_BOX > 0) discard;
@ -463,6 +467,14 @@ void main() {
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * toLinear(color.rgb);
if(SELECTION_BOX > 0) gl_FragData[0].rgba = vec4(toLinear(vec3(SELECT_BOX_COL_R, SELECT_BOX_COL_G, SELECT_BOX_COL_B)), 1.0);
float LITEMATICA_SCHEMATIC_THING_MASK = 0.0;
if (renderStage == MC_RENDER_STAGE_NONE){
LITEMATICA_SCHEMATIC_THING_MASK = 0.1;
gl_FragData[0] = vec4(toLinear(color.rgb), color.a);
}
gl_FragData[2] = vec4(encodeVec2(vec2(0.0)), encodeVec2(vec2(0.0)), encodeVec2(vec2(0.0)), encodeVec2(0.0, LITEMATICA_SCHEMATIC_THING_MASK));
#else
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * Albedo;
#endif
@ -471,7 +483,7 @@ void main() {
if(TEXTURE.a < 0.7 && TEXTURE.a > 0.2) gl_FragData[0] *= clamp(1.0 - length(feetPlayerPos) / 100.0 ,0.0,1.0);
gl_FragData[0].rgb *= 0.1;
#endif
#endif
}

View File

@ -602,7 +602,7 @@ void main() {
// if(z >= 1.0) color = vec3(0,255,0);
// else color = vec3(0.01);
color *= min(temporallyFilteredVL.a + (1-nametagbackground),1.0);
color *= min(temporallyFilteredVL.a + (1.0-nametagbackground),1.0);
color += temporallyFilteredVL.rgb * nametagbackground;
#else
color *= temporallyFilteredVL.a ;