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 createTexture for R and RG format textures #14436

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

djn24
Copy link
Contributor

@djn24 djn24 commented Oct 18, 2023

I think I've found a bug in createTexture when the texture creation options pass format: Engine.TEXTUREFORMAT_R or _RG. Repro is in this playground https://playground.babylonjs.com/#YCY2IL#1861, I've also posted to the forum with some extra information.

This PR is my attempt to fix it by using _getRGBABufferInternalSizedFormat to get the sized format, similar to other forms of texture creation in thinEngine.ts.

(This is a recreation of PR #14404. I realised I had committed with an email address I don't use for public repos so I've recreated the PR with exactly the same changes but a different committer email. I'm really sorry about the hassle.)

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 18, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 18, 2023

@carolhmj carolhmj requested a review from Popov72 October 18, 2023 11:21
Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot

@sebavan sebavan merged commit ea42d27 into BabylonJS:master Oct 18, 2023
10 checks passed
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.

None yet

4 participants