Skip to content

Shader.WithTexture

Name Mandatory Description Default Type
⬅️ Input This shard does not read the texture directly. Use Shader.SampleTexture within the Then branch if you need to access the texture. None
Output ➡️ This shard outputs none None
Name No The name of the texture to check for. `` String
Then No The shards to execute if the texture is available none Shard[Shard]None
Else No The shards to execute if the texture is not available none Shard[Shard]None

This shard creates a conditional statement within a shader code. If the texture specified in the Name parameter is available for the vertex or pixel, the code in the Then parameter will be executed. Otherwise, the code in the Else parameter will execute.