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 canvas rendering bugs #12

Closed
wants to merge 4 commits into from
Closed

Fix canvas rendering bugs #12

wants to merge 4 commits into from

Conversation

2xsaiko
Copy link

@2xsaiko 2xsaiko commented Aug 7, 2021

The text block issue looks like it should be solved on Canvas's side (you shouldn't need to special case it in this kind of way) and I have no idea if the text can be fixed in an easier way (or why it works correctly without canvas in the first place)

Closes #11.

@2xsaiko
Copy link
Author

2xsaiko commented Aug 7, 2021

Actually, I just noticed that if you have an item in the item display, then the shadow of the text will be white as well because the formatting of the text overrides the passed color >_>
Gonna have to fix that a different way

@2xsaiko
Copy link
Author

2xsaiko commented Aug 7, 2021

And now that I've thought about this some more, I think it's more likely both these issues are actually caused by differences in behavior on Canvas's side. I even find it likely that it comes from the same difference. My guess is that Canvas stores the camera rotation in the modelview matrix and Minecraft stores it in the projection matrix. So for example TextRenderer doesn't expect the modelview matrix to rotate anything and it hasn't been caught so far because nothing actually renders text with shadows in the world. However, I haven't checked if that's actually the case.

@grondag mind taking a look at this/the original issue, maybe you can see what's going on here?

LemmaEOF added a commit to quat1024/glowcase that referenced this pull request Aug 11, 2023
Quick and dirty support for colored/formatted text
@2xsaiko 2xsaiko closed this by deleting the head repository Dec 1, 2023
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.

Canvas issues
1 participant