Constructor
new StorageTextureNode( value : StorageTexture, uvNode : Node.<(vec2|vec3)>, storeNode : Node )
Constructs a new storage texture node.
| value |
The storage texture. |
| uvNode |
The uv node. |
| storeNode |
The value node that should be stored in the texture. Default is |
Properties
.access : string
The access type of the texture node.
Default is 'writeOnly'.
.isStorageTextureNode : boolean (readonly)
This flag can be used for type testing.
Default is true.
.mipLevel : number
The mip level to write to for storage textures.
Default is 0.
Methods
.generate( builder : NodeBuilder, output : string ) : string
Generates the code snippet of the storage node. If no storeNode
is defined, the texture node is generated as normal texture.
| builder |
The current node builder. |
| output |
The current output. |
- Overrides: TextureNode#generate
- Returns: The generated code snippet.
.generateSnippet( builder : NodeBuilder, textureProperty : string, uvSnippet : string, levelSnippet : string, biasSnippet : string, depthSnippet : string, compareSnippet : string, gradSnippet : Array.<string>, offsetSnippet : string ) : string
Generates the snippet for the storage texture.
| builder |
The current node builder. |
| textureProperty |
The texture property. |
| uvSnippet |
The uv snippet. |
| levelSnippet |
The level snippet. |
| biasSnippet |
The bias snippet. |
| depthSnippet |
The depth snippet. |
| compareSnippet |
The compare snippet. |
| gradSnippet |
The grad snippet. |
| offsetSnippet |
The offset snippet. |
- Overrides: TextureNode#generateSnippet
- Returns: The generated code snippet.
.generateStore( builder : NodeBuilder )
Generates the code snippet of the storage texture node.
| builder |
The current node builder. |
.getInputType( builder : NodeBuilder ) : string
Overwrites the default implementation to return a fixed value 'storageTexture'.
| builder |
The current node builder. |
- Overrides: TextureNode#getInputType
- Returns: The input type.
.setAccess( value : string ) : StorageTextureNode
Defines the node access.
| value |
The node access. |
- Returns: A reference to this node.
.setMipLevel( level : number ) : StorageTextureNode
Sets the mip level to write to.
| level |
The mip level. |
- Returns: A reference to this node.
.toReadOnly() : StorageTextureNode
Convenience method for configuring a read-only node access.
- Returns: A reference to this node.
.toReadWrite() : StorageTextureNode
Convenience method for configuring a read/write node access.
- Returns: A reference to this node.
.toWriteOnly() : StorageTextureNode
Convenience method for configuring a write-only node access.
- Returns: A reference to this node.