Some part of CTM using overlay method will have incorrect at_midBlock attribute. Unload and load shader again will make this attribute becomes defferent. Press F3+R can also change at_midBlock of CTM overlays, tho after several reload it will not change anymore (and still incorrect).
Steps to Reproduce
An shader with only 2 files described below will directly output the at_midBlock for debug:
gbuffers_terrain.vsh:
#version 450
in vec3 vaPosition;
in vec2 vaUV0;
in vec3 at_midBlock;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
uniform vec3 chunkOffset;
out vec2 texcoord;
out vec3 midBlock;
void main()
{
texcoord = vaUV0;
midBlock = at_midBlock;
gl_Position = projectionMatrix * modelViewMatrix * vec4(vaPosition + chunkOffset, 1.0);
}
And you will see the color of CTM overlay is incorrect.
OptiFine Version
1.20.1 I5
Installation Method
Standalone
F3 Debug Screenshot
Used resourcepack: https://modrinth.com/resourcepack/alacrity/version/24
Grass block with 8 dirt surrounding it.
F3 debug screen:
Screenshot without F3 overlay: (Reloaded the shader before take this screenshot. So it looks different with above pic.)
Vanilla color reference:
Description of Issue
Some part of CTM using overlay method will have incorrect
at_midBlock
attribute. Unload and load shader again will make this attribute becomes defferent. Press F3+R can also changeat_midBlock
of CTM overlays, tho after several reload it will not change anymore (and still incorrect).Steps to Reproduce
An shader with only 2 files described below will directly output the at_midBlock for debug: gbuffers_terrain.vsh:
gbuffers_terrain.fsh:
And you will see the color of CTM overlay is incorrect.
OptiFine Version
1.20.1 I5
Installation Method
Standalone
F3 Debug Screenshot
Used resourcepack: https://modrinth.com/resourcepack/alacrity/version/24 Grass block with 8 dirt surrounding it. F3 debug screen:
Screenshot without F3 overlay: (Reloaded the shader before take this screenshot. So it looks different with above pic.)
Vanilla color reference:
![2023-08-02_09 26 34](https://github.com/sp614x/optifine/assets/41003546/a9da1185-7d08-47bf-9421-f9a52330c114)