Class TextureGeneratorControl
Represents a control for a texture property with possibility to inline 2 extra properties. Also includes a texture generator.
Namespace: VRLabs.SimpleShaderInspectors.Controls
Syntax
public class TextureGeneratorControl : TextureControl, IAdditionalProperties, IAdditionalLocalization
Remarks
It is a more complex and specialized version of TextureControl, where on top of the base functionality of TextureControl it also has a fuull blown texture generator.
When using it right away the texture generator will default to a simple 4 channel merger where for each channel you can select a texture, select which channel of the texture use, and use that as the channel for the final generated texture.
While this is already a great use of the control and a fairly common one (like merging 4 monochrome texture masks) it is just one possible use,
since it can load custom compute shaders and relative control input options to go along, enabling you to create your own generator that takes
your own defined parameters to get a specific output.
Examples
Example usage:
// Adds a new texture generator control with a texture and color field, using the default merger for the generator
this.AddTextureGeneratorControl("_TextureProperty", "_ColorProperty");
// Adds a new texture generator control with a texture and color field, using a custom generator
this.AddTextureGeneratorControl(myCompute, computeInputJson, "_TextureProperty", "_ColorProperty");
Constructors
| Name | Description |
|---|---|
| TextureGeneratorControl(String, String, String) | Default constructor of TextureGeneratorControl |
| TextureGeneratorControl(ComputeShader, String, String, String, String) | Default constructor of TextureGeneratorControl |
Properties
| Name | Description |
|---|---|
| AdditionalContent | Additional localization strings. Implementation for IAdditionalLocalization. |
| GeneratorButtonColor | Background color for the texture generator button. |
| GeneratorButtonStyle | Style for the texture generator button. |
| GeneratorColor | Background color for the generator background. |
| GeneratorInputColor | Background color for the generator input background. |
| GeneratorInputStyle | Style for the generator input background. |
| GeneratorSaveButtonColor | Background color for the generator save button. |
| GeneratorSaveButtonStyle | Style for the texture generator save button. |
| GeneratorStyle | Style for the texture generator background. |
Methods
| Name | Description |
|---|---|
| ControlGUI(MaterialEditor) | Draws the control represented by this object. |