The Tex2D
field is a member of the TextureType
enumeration within the Editor.ShaderGraph
namespace. This enumeration is used to specify the type of texture being utilized in a shader graph, particularly in the context of 2D textures.
The Tex2D
field is a member of the TextureType
enumeration within the Editor.ShaderGraph
namespace. This enumeration is used to specify the type of texture being utilized in a shader graph, particularly in the context of 2D textures.
Use the Tex2D
field when you need to specify a 2D texture type in your shader graph. This is typically used in shader development within the s&box game engine to define how textures are applied to surfaces.
// Example of using TextureType.Tex2D in a shader graph context // Assume this is part of a shader graph setup TextureType textureType = TextureType.Tex2D; // Use textureType in shader graph logic if (textureType == TextureType.Tex2D) { // Logic for handling 2D textures // For example, setting up a sampler for a 2D texture }