Shadow Generations Shaders - DirectionBlend dpndpnn: Difference between revisions
Appearance
	
	
| Justin113D (talk | contribs)  Added page | 
| (No difference) | 
Latest revision as of 14:03, 25 August 2025
Overview
Shader Behavior Overview
Shader model: 
   [2] Standard (PBR)
Does not support:
An advanced PBR shader that
- uses directional blending to interpolate between two texture sets
- blends an extra normal map textures into the other normal maps.
This shader is essentially a modification of the DirectionBlend_dpndpn shader.
Related shaders
- Blend_dpnbdpn
- Blend_dpndpn
- BlendDetail_dndnd
- BlendDetail_dpndpnn
- Detail_dpndpn
- Detail_dpnn
- DirectionBlend_dpndpn
- DirectionBlend_dpnndpn
- DistanceBlend_dpn
Behavior
Extra Normal Map
The normal[2] texture is blended into the normal and normal[1] textures before their usage.
Directional blending
This shader has two sets of PBR textures:
- diffuse,- specularand- normal
- diffuse[1],- specular[1]and- normal[1]
The shader uses a blend factor to interpolate from the first set of textures to second one.
This blend factor is calculated using directional blending.
This involves various inputs:
| Input | Description | 
|---|---|
| Normal map | The normaltexture is applied to the normal direction before calculating the directional blend factor | 
| Red vertex color channel | The directional blend bias | 
| DirectionParamparameter | The directional blend direction | 
| NormalBlendParamparameter | The Directional blend intensity and offset | 
| diffuseanddiffuse[1](multiplied together) | The Directional blend limit | 
Transparency
(For some reason) the directional blend factor is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.
Vertex Colors
- The colors...
- Red channel is used as the directional blend bias
- Green and blue channels are unused
 
- Alpha is unused
Material Inputs
Textures
| Name | Index | UV Index | Kind | Red | Green | Blue | Alpha | 
|---|---|---|---|---|---|---|---|
| diffuse | 0 | Any | Albedo | First Albedo color | directional blend limit | ||
| diffuse | 1 | Any | Albedo | Second Albedo color | directional blend limit | ||
| specular | 0 | Any | PRM | First Specular factor; Gets multiplied by 0.25 | First Smoothness factor | First Metallic factor | First Ambient Occlusion | 
| specular | 1 | Any | PRM | Second Specular factor; Gets multiplied by 0.25 | Second Smoothness factor | Second Metallic factor | Second Ambient Occlusion | 
| normal | 0 | Any | Normal map | First Normal map direction | N/A | N/A | |
| normal | 1 | Any | Normal map | Second Normal map direction | N/A | N/A | |
| normal | 2 | Any | Normal map | Extra Normal map direction that is blended into the other normal maps | N/A | N/A | |
Parameters
| Name | X | Y | Z | W | 
|---|---|---|---|---|
| DirectionParam | Directional blend direction | N/A | ||
| NormalBlendParam | Directional blend intensity | Directional blend offset | N/A | N/A | 
Technical
| Shader Features | 
|---|
| is_compute_instancing | 
| is_use_tex_srt_anim | 
| enable_alpha_threshold | 
| is_use_gi_prt | 
| is_use_gi_sg | 
| is_use_gi |