-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
WebGPURenderer: Introduce RenderTarget3D and RenderTargetArray #30155
base: dev
Are you sure you want to change the base?
WebGPURenderer: Introduce RenderTarget3D and RenderTargetArray #30155
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
…ix clear in webgpubackend
|
||
if ( color ) { | ||
|
||
for ( const texture of renderTargetData.textures ) { | ||
const descriptor = this._getRenderPassDescriptor( renderTargetContext ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunag FYI here I updated the RenderContext to support RenderTarget that has not been rendered yet.
This way this prevent issues where the clear Pass doesn't match the correct descriptor associated to a texture and reuse how we setup a descriptor with _getRenderPassDescriptor
which also makes the code cleaner.
Maybe |
Description
Introduce support for 3D textures and texture arrays in multi-render target (MRT) setups for both WebGPU and WebGL backends.
Unlike WebGLRenderer I used prefix instead of suffix (
WebGLArrayRenderTarget
->RenderTargetArray
) as a3DRenderTarget
felt wrong.Made a example while working on it that displays 4 meshes:
Each slice of both RenderTarget is incremented and rendered every 50ms.
This contribution is funded by Utsubo