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

Save resources by not binding a color texture to a render target #12455

Merged
merged 3 commits into from
Apr 28, 2022
Merged

Save resources by not binding a color texture to a render target #12455

merged 3 commits into from
Apr 28, 2022

Conversation

Popov72
Copy link
Contributor

@Popov72 Popov72 commented Apr 28, 2022

This PR allows the user to indicate that the color texture should not be created/bound when creating a render target.

It's a waste of resources (a texture the size of the render target) if all you want is generating the depth buffer/texture and don't have anything to write in a color texture.

Here's a PG to test it: https://playground.babylonjs.com/#0PYWXZ#1

With Spector, you will see that only the depth buffer is bound:
image

Without the PR, a color texture is also bound:
image

@azure-pipelines
Copy link

Please make sure to tag your PR with "bug", "new feature" or "breaking change" tags.

@deltakosh deltakosh enabled auto-merge (squash) April 28, 2022 15:13
@azure-pipelines
Copy link

Please make sure to tag your PR with "bug", "new feature" or "breaking change" tags.

@azure-pipelines
Copy link

@deltakosh deltakosh merged commit 4b9718d into BabylonJS:master Apr 28, 2022
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.

2 participants