robot_2Generated
code_blocksInput

Description

The Trans field is a member of the TextureExtension enumeration within the Editor.ShaderGraph namespace. This enumeration is used to specify different types of texture extensions that can be applied within a shader graph in the s&box game engine. The Trans value specifically represents a texture extension related to transparency or translucency effects in shaders.

Usage

Use the TextureExtension.Trans enumeration value when you need to specify a texture extension that deals with transparency in your shader graph. This can be particularly useful when creating materials that require transparency effects, such as glass or water.

Example

// Example of using TextureExtension.Trans in a shader graph setup

public class MyShaderComponent : Component
{
    public void SetupShader()
    {
        // Assuming shaderGraph is an instance of a ShaderGraph class
        ShaderGraph shaderGraph = new ShaderGraph();
        
        // Set the texture extension to Trans for transparency effects
        shaderGraph.SetTextureExtension(TextureExtension.Trans);
        
        // Additional shader setup code...
    }
}