With certain macro blocks, Optifine will consider shadowtex and shadowcolor is not used even its actually used in shader source. When happening, all shadowtex and shadowcolor samples will result in black, and anything uses shadow matrix (including custom uniforms) will be absolutely wrong.
Steps to Reproduce
I'll provide an exmaple shader, and here is its core code:
There is an include file test.glsl with code below:
Description of Issue
With certain macro blocks, Optifine will consider shadowtex and shadowcolor is not used even its actually used in shader source. When happening, all shadowtex and shadowcolor samples will result in black, and anything uses shadow matrix (including custom uniforms) will be absolutely wrong.
Steps to Reproduce
I'll provide an exmaple shader, and here is its core code: There is an include file
test.glsl
with code below:And in composite.fsh, we use this include in this way:
If
TEST
is not defined, no shadowtex or shadowcolor will be considered as used, and then Optifine will not even call the shadow pass.OptiFine Version
1.20.1 I5
Installation Method
Standalone
Log Files/Crash Reports
If the
TEST
described above is not defined, info in log says that no shadowtex or shadowcolor is used;But if
TEST
is defined, everything just looks fineF3 Debug Screenshot
If
If its not defined:
![2023-07-26_13 10 38](https://github.com/sp614x/optifine/assets/41003546/1e7fb2cd-630c-4683-a542-cd11554a36ac)
TEST
is defined:Additional Information
shaders.zip