Capítulo 404 de 859

Chapter 404: CubeTextureNode

Core Idea

This type of uniform node represents a cube texture.

Key Concepts

  • isCubeTextureNode : boolean (readonly): This flag can be used for type testing.

Reference Tables

Constructor

Signature
new CubeTextureNode( value : CubeTexture, uvNode : Node.<vec3>, levelNode : Node.<int>, biasNode : Node.<float> )

Properties

PropertyDescription
.isCubeTextureNode : boolean (readonly)This flag can be used for type testing.

Methods

MethodDescription
.generateUV( builder : NodeBuilder, cubeUV : Node ) : stringGenerates the uv code snippet.
.getDefaultUV() : Node.<vec3>Returns a default uvs based on the mapping type of the cube texture.
.getInputType( builder : NodeBuilder ) : stringOverwrites the default implementation to return the appropriate cube texture type.
.setUpdateMatrix( value : boolean )Overwritten with an empty implementation since the updateMatrix flag is ignored for cube textures. The uv transformation matrix is not applied to cube textures.
.setupUV( builder : NodeBuilder, uvNode : Node ) : NodeSetups the uv node. Depending on the backend as well as the texture type, it might be necessary to modify the uv node for correct sampling.

Key Takeaways

  1. CubeTextureNode extends: EventDispatcher → Node → InputNode → UniformNode → TextureNode
  2. Most relevant properties: isCubeTextureNode.
  3. Key methods: generateUV, getDefaultUV, getInputType, setUpdateMatrix.

Connects To