Description
The ImageFormat
property specifies the format used when compiling a texture within the Editor.ShaderGraph.TextureInput
class. This property is crucial for determining how the texture data is processed and stored, affecting both the quality and performance of the texture in the shader graph.
Usage
To use the ImageFormat
property, you need to have an instance of the TextureInput
class. You can then get or set the ImageFormat
to specify the desired texture format for compilation. This is typically used in shader development where specific texture formats are required for different rendering techniques.
Example
// Example of setting the ImageFormat property
TextureInput textureInput = new TextureInput();
textureInput.ImageFormat = Editor.ShaderGraph.TextureFormat.RGBA32;
// Example of getting the ImageFormat property
Editor.ShaderGraph.TextureFormat currentFormat = textureInput.ImageFormat;
// Use the currentFormat in your shader logic
// ...