-
-
Notifications
You must be signed in to change notification settings - Fork 36k
WebGPURenderer: Array-Based RenderTarget Refactor #30959
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
Changes from 11 commits
7ccb258
3080fd3
6ad7180
5176f75
1bb3e29
2d0a54d
0ad11ef
b4714e6
7919acd
564ef5b
c70f8a4
6f8555b
79efef8
ca79f2b
ca48a40
6441b9a
5968334
2087d85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -2,7 +2,6 @@ import DataMap from './DataMap.js'; | |||
|
||||
import { Vector3 } from '../../math/Vector3.js'; | ||||
import { DepthTexture } from '../../textures/DepthTexture.js'; | ||||
import { DepthArrayTexture } from '../../textures/DepthArrayTexture.js'; | ||||
import { DepthStencilFormat, DepthFormat, UnsignedIntType, UnsignedInt248Type, UnsignedByteType } from '../../constants.js'; | ||||
|
||||
const _size = /*@__PURE__*/ new Vector3(); | ||||
|
@@ -77,15 +76,7 @@ class Textures extends DataMap { | |||
|
||||
if ( depthTexture === undefined && useDepthTexture ) { | ||||
|
||||
if ( renderTarget.multiview === true && size.depth > 1 ) { | ||||
|
||||
depthTexture = new DepthArrayTexture(); | ||||
|
||||
} else { | ||||
|
||||
depthTexture = new DepthTexture(); | ||||
|
||||
} | ||||
depthTexture = new DepthTexture(); | ||||
|
||||
depthTexture.format = renderTarget.stencilBuffer ? DepthStencilFormat : DepthFormat; | ||||
depthTexture.type = renderTarget.stencilBuffer ? UnsignedInt248Type : UnsignedIntType; // FloatType | ||||
|
@@ -106,7 +97,7 @@ class Textures extends DataMap { | |||
depthTexture.needsUpdate = true; | ||||
depthTexture.image.width = mipWidth; | ||||
depthTexture.image.height = mipHeight; | ||||
depthTexture.image.depth = depthTexture.isDepthArrayTexture ? depthTexture.image.depth : 1; | ||||
depthTexture.image.depth = depthTexture.isArrayTexture ? depthTexture.image.depth : 1; | ||||
|
||||
} | ||||
|
||||
|
@@ -147,7 +138,6 @@ class Textures extends DataMap { | |||
|
||||
const texture = textures[ i ]; | ||||
|
||||
texture.isTextureArray = renderTarget.multiview === true && size.depth > 1; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fear this removal breaks multiview. When rendering in XR, the framebuffer render target is resized with a depth value larger three.js/src/renderers/common/Renderer.js Line 1246 in 6e56458
But since the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this option makes a lot more sense I will try. |
||||
if ( textureNeedsUpdate ) texture.needsUpdate = true; | ||||
|
||||
this.updateTexture( texture, options ); | ||||
|
Uh oh!
There was an error while loading. Please reload this page.