Open TY-NiD50 opened 2 years ago
This is a side-effect of the workaround used by the purple grass fix. This alternative solution should fix it for everyone and eliminate the need for the purple grass fix. Here's a unified format patch for colormap.vsh that fixed it in testing:
See the Discord thread for details on testing/etc.
The important parts of the changes, to see at a glance:
- int seasonMapIndex = colormapData & 0x3f;
- int climateMapIndex = (colormapData >> 8) & 0xf;
+ int seasonMapIndex = (colormapData & 0x3f) - 1;
+ int climateMapIndex = ((colormapData >> 8) & 0xf) - 1;
- if (climateMapIndex > 0) {
- #if RADEONHDFIX == 1
- // I have no idea why this is needed for Radeon HD 5000/6000 series cards.
+ if (climateMapIndex > -1) {
vec4 rect = colorMapRects[climateMapIndex];
- #else
- vec4 rect = colorMapRects[climateMapIndex - 1];
- #endif
- if (seasonMapIndex > 0) {
- vec4 rect = colorMapRects[seasonMapIndex - 1];
+ if (seasonMapIndex > -1) {
+ vec4 rect = colorMapRects[seasonMapIndex];
These cards seem to have issues with expressions as array subscripts; even though nothing in the GLSL 330 spec forbids it, changing the indices to be variables rather than variable expressions seems to resolve the issue. This would allow removing the purple grass fix option entirely.
Game Version: 1.15.6 Platform: Windows 7 Modded: No
Description
The water is rendering purple.
How to reproduce
I'm using the purple grass fix check box. -When you turn it off, it fixes the water while returning the grass to purple.
Expected behavior
Is simple/obvious.
Screenshots
Purple Water
Logs