Jump to content

Shadow Generations Shaders - BlendDetail dpndpnn: Difference between revisions

From HedgeDocs
Justin113D (talk | contribs)
Added page
 
Justin113D (talk | contribs)
Added missing feature
Line 100: Line 100:
| features =
| features =
enable_multi_tangent_space,
enable_multi_tangent_space,
is_use_tex_srt_anim,
is_use_gi_prt,
is_use_gi_prt,
is_use_gi_sg,
is_use_gi_sg,

Revision as of 22:34, 23 August 2025

Return to shaders list

Overview

Shader Behavior Overview

An advanced PBR shader that uses

It is essentially a combination of the Blend_dpndpn and Detail_dpnn shaders.

Related shaders

Behavior

Distance blending

Uses distance blending to interpolate

  • from the normal texture
  • to the normal and normal[2] textures blended together.


The shader uses detailDistance and detailFadeRange from the stage RFL to determine the detail range.

Vertex alpha blending

This shader has two sets of PBR textures:

  • diffuse and specular
  • diffuse[1] and specular[1]

The shader uses a blend factor to interpolate from the first set of textures to second one.
This blend factor consists of just the vertex alpha.

  • For the specular textures, the blend factor is used as is.
  • For the diffuse textures, the blend factor is multiplied by the diffuse[1] texture alpha.

Bugs

Warning
The shader has 3 normal texture slots: Only normal and normal[2] are used, with normal[1] left unused.

Yet, to be able to specify a texture for the normal[2] slot, a material must have 3 texture slots, even if the slot for normal[1] is empty.
In a similar vein, the shader has the enable_multi_tangent_space feature, but never makes use of it.


Speculation:

What likely happened here is that the developers used the code from Blend_dpndpn as a base and then added in the detail normal map logic from Detail_dpnn but accidentally pasted it over the previous normal map code, leaving just the detail normal map code behind.

Vertex Colors

  • Color is multiplied into the diffuse texture color
  • Alpha is used as the basis for the blend factor

Material Inputs

Textures

Name

Index

UV Index

Kind

Red

Green

Blue

Alpha

diffuse 0 0 Albedo First Albedo color N/A
diffuse 1 2 Albedo Second Albedo color Multiplied into the vertex alpha (blend factor), but only for when blending the two diffuse textures!
specular 0 0 PRM First Specular factor;
Gets multiplied by 0.25
First Smoothness factor First Metallic factor First Ambient Occlusion
specular 1 2 PRM Second Specular factor;
Gets multiplied by 0.25
Second Smoothness factor Second Metallic factor Second Ambient Occlusion
normal 0 0 Normal map First Normal map direction N/A N/A
normal 1 N/A N/A Unused
normal 2 3 Detail Normal map Detail Normal map direction N/A N/A

Parameters

Name

X

Y

Z

W

DetailFactor UV scale for the normal[2] texture N/A N/A N/A

Technical

Shader Features
enable_multi_tangent_space
is_use_tex_srt_anim
is_use_gi_prt
is_use_gi_sg
is_use_gi
Cookies help us deliver our services. By using our services, you agree to our use of cookies.