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

PrePass renderer: Fix engine current render pass id set too early #12988

Merged
merged 3 commits into from
Sep 19, 2022
Merged

PrePass renderer: Fix engine current render pass id set too early #12988

merged 3 commits into from
Sep 19, 2022

Conversation

Popov72
Copy link
Contributor

@Popov72 Popov72 commented Sep 16, 2022

See https://forum.babylonjs.com/t/issue-when-prepassrenderer-and-rendertargettexture-are-used-at-the-same-time/29317/7

Basically it's a revert of my changes from:

269132c#diff-5fec6a90573f71adda2b2d7c9364ac6da73fe8cfc6a641b129a051bf38d67cd2

I don't remember why I did this change at that time, I think it's wrong to set Engine.currentRenderPassId in PrePassRenderer._setRenderTarget as RenderTargetTexture._renderToTarget will set the right pass id before drawing the meshes anyway.

[EDIT] Ok, I updated the fix which is not simply a revert now: the engine.currentRenderPassId needs to be updated but only when setting the default RT.

@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

@azure-pipelines
Copy link

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12988/merge/testResults/webgl2/index.html

If tests were successful afterwards, this report might not be available anymore.

@sebavan sebavan merged commit 8cf9585 into BabylonJS:master Sep 19, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
PrePass renderer: Fix engine current render pass id set too early

Former-commit-id: 222c799bf629897b799e142b45a3b60bbfc1b899
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.

3 participants