Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct usage of old code with slight LUT miscalculation #440

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

FrostKiwi
Copy link
Contributor

@FrostKiwi FrostKiwi commented Mar 1, 2024

When writing an article about the usage of LUTs in video games, I stumbled upon this QA article. Shown is a piece of code on how to emulate 3D Texture reads in WebGL 1.0, when no such function is present.

The code shown was outdated however, with a miscalculation on how the texture coordinates are accessed, leading to colors being blue-shifted. This was corrected by the original author of the code sample, @greggman in 2019, but the webglfundamentals article picked up the older version.

This PR corrects the code by replacing it with the newer version, which works flawlessly.

@greggman greggman merged commit 6a2f2ce into gfxfundamentals:master Mar 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants