Skip to content

Conversation

@illwieckz
Copy link
Member

@illwieckz illwieckz commented Sep 11, 2025

Cherry-pick from #1730:

This one shouldn't be controversial.

One discussion possible is that we can do this conversion either in tr_shader.cpp, either in tr_bsp.cpp.

Fog shaders should be parsed when requested by the BSP code, there is no meaning outside of that, so the behavior should be the same.

@illwieckz
Copy link
Member Author

illwieckz commented Sep 11, 2025

After some thinking, I moved the conversion to tr_bsp. It's just a feeling and some presentiment, but I feel it in better way.

In fact, no other code in our code base converts colors at shader parsing, they all do it in code closer to their processing code than the shader code is, so I feel doing it that ways keeps the programming pattern more unified, and then it's easier to search for things by expecting where things can be in a more predictable way. That's the only reason why I went for preferring this.

@illwieckz illwieckz force-pushed the illwieckz/srgb-fog-color branch from 04ef873 to 879b34c Compare September 13, 2025 14:55
@illwieckz
Copy link
Member Author

This looks ready to me.

@slipher
Copy link
Member

slipher commented Sep 13, 2025

LGTM

@illwieckz illwieckz merged commit a570f47 into master Sep 17, 2025
9 checks passed
@illwieckz illwieckz deleted the illwieckz/srgb-fog-color branch September 17, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants