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

fix(troika-three-utils): add support for colorspace_fragment introduced in Three r154 #325

Merged
merged 1 commit into from
Aug 8, 2024
Merged

fix(troika-three-utils): add support for colorspace_fragment introduced in Three r154 #325

merged 1 commit into from
Aug 8, 2024

Conversation

asyncore
Copy link
Contributor

@asyncore asyncore commented Aug 8, 2024

This PR fixes #324.
Color space is applied to a text color using custom shaders in upgradeShaders() (troika-three-utils/src/DerivedMaterial.js#L306) through injecting custom shader code into the encodings_fragment shader. The shader has been renamed colorspace_fragment in mrdoob/three.js#26206 since Three r154. Since the pre-r154 fragment shader name is kept in the list, this PR shouldn't break compatibility with Three versions before r154.

…ee r154) to the list of fragment shaders to process in `upgradeShaders()`
@lojjic lojjic merged commit 9169ebf into protectwise:main Aug 8, 2024
5 checks passed
@lojjic
Copy link
Collaborator

lojjic commented Aug 8, 2024

thanks!

@asyncore asyncore deleted the fix/r154-colorspace-fragment branch August 8, 2024 17:49
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.

troika-three-text: The color space of text color is incorrect with Three.js r154+
2 participants