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

Fixed NativeEngine render target assignment #13306

Merged
merged 3 commits into from
Dec 2, 2022
Merged

Fixed NativeEngine render target assignment #13306

merged 3 commits into from
Dec 2, 2022

Conversation

SergioRZMasson
Copy link
Contributor

Native engine is currently not assingning the new texture passed in bindFrameBuffer to its _currentRenderTarget. This will result in NaN values for camera's projection matrix since it uses the engine.getRenderWidth() and engine.getRenderHeight() and those values will be zero.

Storing _currentRenderTarget fixes the problem.

…s will cause camera projection matrix to be calculated wrong.
@azure-pipelines
Copy link

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.

@azure-pipelines
Copy link

Copy link
Contributor

@Popov72 Popov72 left a comment

Choose a reason for hiding this comment

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

You should also set it to null in unBindFramebuffer.

@SergioRZMasson
Copy link
Contributor Author

@Popov72 , updated PR with changes.

@sebavan sebavan merged commit 5bef218 into BabylonJS:master Dec 2, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
…der-target-bind

Fixed NativeEngine render target assignment

Former-commit-id: 0e97ee5ca60d360854f8e7fff456bf2090d5b151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants