Blend shaders¶
These are standard PBR shaders that blend two sets of textures based on the meshes alpha vertex color.
Shader table¶
Behavior¶
- Standard behaviors
Uses the PBR lighting model
Uses dithering
Uses weather effects
- Rendering
The shaders only support deferred rendering and have not been compiled for forward rendering.
- Transparency
Neither transparency clipping, nor transparency blending are supported.
- Multiple Tangents
These shaders can use a second set of tangents for the second set of textures when the bool parameter
enable_multi_tangent_space
is set to true.- Vertex colors
Vertex colors get combined with the diffuse texture via multiplication
The alpha gets combined with the blending factor via multiplication.
- Texture Blending
The shaders use a blending factor to determine how much the two sets of textures should be blended together.
Blend_dpnbdpn
uses the transparency textures red channel.Blend_dpndpn
andBlendDetail_dpndpnn
rely solely on the vertex color alpha.
Furthermore, the diffuse1 textures alpha channel influences how the diffuse textures get blended together by multiplying into the previous blending factor.
- Distance blending
The
BlendDetail_dpndpnn
shader will fade in the normal2 based on the distance between the camera and surface being rendered. The game usually starts the fade-in at a distance of 180, and fully fades them in at a distance of 150.
Textures¶
- diffuse
A standard albedo texture.
Uses the 1st UV channel.
- specular
A standard PRM texture.
Uses the 1st UV channel
- normal
A standard normal map texture.
Uses the 1st UV channel.
- transparency
The red channel is used for blending between the two texture sets.
Uses the 4th UV channel.
- diffuse1
A standard albedo texture.
The alpha influences the blending between this and the diffuse texture.
Uses the 3rd UV channel.
- specular1
A standard PRM texture.
Uses the 3rd UV channel.
- normal1
A standard normal map texture.
Uses the 3rd UV channel.
Warning
This texture is not used in the
BlendDetail_dpndpnn
shader!Yet, a slot is required to specify the normal2 texture, even if this one is left empty!
- normal2
A standard normal map texture.
Attempts to use the 4th UV channel.
Gets blended together with the normal texture (influenced by the camera distance).
Parameters¶
- DetailFactor
A float parameter of which the first component scales the texture coordinates of the normal2 textures.