-
Notifications
You must be signed in to change notification settings - Fork 19
Shader Documentation
The shaders included in TexturesUnlimited are:
- TU/Metallic - PBR - Metallic Workflow
- TU/Specular - PBR - Specular Workflow
- TU/Legacy - BlinnPhong - Colored Specular
- TU/Transparent/Metallic - transparent version of above - depth test on, z-write off, standard blending (additive?)
- TU/Transparent/Specular - transparent version of above - depth test on, z-write off, standard blending (additive?)
- TU/Transparent/Legacy - transparent version of above - depth test on, z-write off, standard blending (additive?)
All of the TU/ shader share a common set of functionality; their only differences are in the workflow/lighting model used, as described above. Documentation on the workflows may be found in the links below. Some of the texture slot names may differ, but the main inputs and workflow are the same as the Unity Standard shader variants. The exception to this would be the advanced features such as recoloring and subsurface scattering, which will be detailed below.
Metallic -
Specular -
Legacy -
Albedo/Diffuse texture. This describes the main color of the object. Alpha channel may contain transparency or smoothness data.
In Metallic workflow this texture input contains the metallic mask in the [R]ed channel. Smoothness should be in the [A]lpha channel. Unused in Specular and Legacy workflow.
In Specular and Legacy workflow this texture input contains the specular color in the RGB channels. Smoothness should be in the [A]lpha channel. Unused in Metallic workflow.
Standard normal map texture. Always enabled; can be left empty/unused if needed.
Controls material emission amounts, to make a material seem to emit light. Used mostly for cabin-window-lighting effects. Always enabled; may be left empty/unused if needed.
Ambient occlusion texture. Sample is taken from the [G]reen channel in the texture, so in the metallic workflow this texture data may optionally be packed into the MetallicGlossMap. Always enabled; may be left empty/unused if needed.
Colored thickness map used by subsurface scattering effects. Only enabled when subsurface scattering is enabled.
The mask texture is the main input component of the recoloring system; it determines what parts of the model are assigned to each of the three recoloring selections (main, second, detail). Alpha channel may contain luminance normalization data for use in the recoloring system. Details on its setup and use can be found in the section on recoloring below. Only enabled when recoloring is enabled.
Used by the recoloring system to normalize metal/smooth or spec/smooth source textures for use in the recoloring system. Details on their setup and use can be found in the section on recoloring below. Only enabled when recoloring normalization is enabled.
Used by the recoloring system to remove user control and recoloring input of metallic/specular/smoothness (independently of each other). Details on their setup and use can be found in the section on recoloring below. Only enabled when recoloring input masking is enabled.
Multiplier to the texture sampled color value for diffuse/albedo coloring. Alpha channel serves as a multiplier to texture sampled alpha value for transparency.
Multiplier to the texture based metallic value. If no texture is provided, this is the main metallic value control.
Multiplier to the texture based specular color. If no texture is provided, this is the main specular color control.
Multiplier to the texture based smoothness. If no texture is provided, this is the main smoothness control.
Multiplier to the input emission texture. Self-multiplies by the alpha channel; output = RGB * A.
Manual opacity control used by KSP for part highlighting functions - do not manually adjust. Use _Color alpha channel for user specified opacity.
Used by KSP for part highlighting functions.
Used by KSP for part highlighting functions.
Used by KSP for temperature/heat based glow effects.
Used by KSP for ??
Subsurface scattering ambient light factor.
Subsurface scattering effect multiplier.
Subsurface scattering exponential/non-linear growth factor.
Subsurface scattering surface-normal distortion contribution factor.
Subsurface scattering thickness-texture driven light attenuation factor.
- RGB = Diffuse/Albedo for Channel 1 (Main)
- A = Smoothness for Channel 1 (Main)
- RGB = Diffuse/Albedo for Channel 2 (Second)
- A = Smoothness for Channel 2 (Second)
- RGB = Diffuse/Albedo for Channel 3 (Detail)
- A = Smoothness for Channel 3 (Detail)
- R = Metal value for Channel 1 (Main)
- G = Metal value for Channel 2 (Second)
- B = Metal value for Channel 3 (Detail)
- R = Diffuse Normalization - For Channel 1 (Main)
- G = Diffuse Normalization - For Channel 2 (Second)
- B = Diffuse Normalization - For Channel 3 (Detail)
- R = Metal Normalization - For Channel 1 (Main)
- G = Metal Normalization - For Channel 2 (Second)
- B = Metal Normalization - For Channel 3 (Detail)
- R = Specular Color Luminance Normalization - For Channel 1 (Main)
- G = Specular Color Luminance Normalization - For Channel 2 (Second)
- B = Specular Color Luminance Normalization - For Channel 3 (Detail)
- R = Smoothness Normalization - For Channel 1 (Main)
- G = Smoothness Normalization - For Channel 2 (Second)
- B = Smoothness Normalization - For Channel 3 (Detail)
Controls if smoothness data is sampled from spec/metal alpha channel (TU_STD_SPEC), or from diffuse alpha channel (TU_STOCK_SPEC).