sixthsurge / photon

A gameplay-focused shader pack for Minecraft
MIT License
1.06k stars 200 forks source link

Water Texture Highlights option nonfunctional with Distant Horizons #177

Open Nekrozmik opened 5 months ago

Nekrozmik commented 5 months ago

What happened?

Upon changing the Water Texture option to Highlights with the Distant Horizons mod installed, the shader pack fails to load.

Minecraft Version

Other

Which shader mod are you using?

Iris

Shader mod version

Iris 1.7.0+mc1.20.4

Shader settings

#Mon Jun 10 09:53:43 EDT 2024
SKY_GROUND=true
COLORED_LIGHTS=true
AUTO_EXPOSURE=AUTO_EXPOSURE_HISTOGRAM
HANDHELD_LIGHTING=true
TAAU=true
BLOCK_ENTITY_SHADOWS=true
NORMAL_MAPPING=true
SH_SKYLIGHT=true
SNELLS_WINDOW=true
SSR_ROUGHNESS_THRESHOLD=0.0
MOTION_BLUR=true
WATER_CAUSTICS=true
AIR_FOG_COLORED_LIGHT_SHAFTS=true
WATER_FOAM=true
SPECULAR_MAPPING=true
DIRECTIONAL_LIGHTMAPS=true
DOF=true
CLOUDS_TEMPORAL_UPSCALING=1
VANILLA_AO=false

Relevant log output

dh_water.fsh: dh_water.fsh: 0(1394) : error C1503: undefined variable "texture_highlight"
Gijs-Hooghiemstra commented 4 months ago

Yup, can report the same bug. This only happens when DH is on and both texture highlights and water foam is on. When water foam is turned off highlights can be turned on. Appears that variable texture_highlight is not defined on line 306 of the water.glsl file (shaders\program\gbuffer\distant_horizons\water.glsl). I fixed it temporarily by adding the following line above:

float texture_highlight = 0.5 * sqr(linear_step(0.63, 1.0, base_color.r)) + 0.03 * base_color.r;

I coppied this line from the translucent.glsl file where it is defined.