pub struct CubeRenderTarget {
pub texture: CubeTexture,
/* private fields */
}Expand description
new CubeRenderTarget( size, { type } ) — the cube a
CubeCamera draws its six faces into.
texture is three’s cubeRenderTarget.texture: a CubeTexture with
no mipmaps and LinearFilter both ways, the defaults three’s descriptor
dump of webgpu_sky shows (mipLevelCount: 1). It is what a material’s
envMap takes.
Three renders each face straight into a layer of the cube; the port has no
layered colour attachment, so the target also owns one 2-D render target
of the same size and type, with a depth buffer (depthBuffer defaults to
true), which each face is drawn into and then copied out of — see the
module comment.
Fields§
§texture: CubeTexturecubeRenderTarget.texture.
Implementations§
Source§impl CubeRenderTarget
impl CubeRenderTarget
Sourcepub fn dispose(self)
pub fn dispose(self)
cubeRenderTarget.dispose() — drops the target and, with it, its
handles on the cube texture and the face target; the GPU side goes
with the last handle, as for RenderTarget::dispose. Dropping the
target does the same; this exists so three.js code ports line for
line.
Sourcepub fn new(size: u32, texture_type: TextureType) -> Result<Self, Error>
pub fn new(size: u32, texture_type: TextureType) -> Result<Self, Error>
new CubeRenderTarget( size, { type: textureType } ).
§Errors
Error::UnsupportedTextureType if texture_type is not a colour
type.