Jump to content

Shadow Generations Shaders - BlendDetail dndnd: Difference between revisions

From HedgeDocs
Justin113D (talk | contribs)
Created page with "{{Shader Documentation | game = Shadow Generations | shader name = BlendDetail_dndnd | sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer | overview = An advanced PBR shader that uses * vertex alpha to blend between two albedo textures * distance blending to apply detail Hedgehog Engine 2 - T..."
 
Justin113D (talk | contribs)
Used new bug parameters
 
(2 intermediate revisions by the same user not shown)
Line 9: Line 9:
* [[Texture Blending#Distance blending|distance blending]] to apply detail [[Hedgehog Engine 2 - Textures#Albedo|albedo]] and [[Hedgehog Engine 2 - Textures#Normal map|normal map]] textures
* [[Texture Blending#Distance blending|distance blending]] to apply detail [[Hedgehog Engine 2 - Textures#Albedo|albedo]] and [[Hedgehog Engine 2 - Textures#Normal map|normal map]] textures


{{notice
| overview bugs = This shader has a severe bug where normals break outside the detail range!
|type=warn
|content=This shader has a severe bug where normals break outside the detail range!  
It is advised to not use this shader.
}}


| related shaders =  
| related shaders =  
Line 28: Line 24:
| behavior =
| behavior =


Todo
=== Vertex alpha blending ===


=== Bugs ===
The shader has two sets of <code>diffuse</code> textures and two sets of <code>PBRFactor</code> parameters.
{{notice
 
|type=warn
The shader uses a <b>blend factor</b> to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.
|content=The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures.
<br/>This <b>blend factor</b> consists of just the vertex alpha.
Unfortunately, the surface' normal direction never gets set outside this <code>if</code>-blocks, which means normals are completely broken outside the detail range.
 
}}
=== Distance blending ===
 
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate
 
{{{!}} class="wikitable
{{!}}+
! From...
!... to
{{!}}-
{{!}} the <code>normal</code> texture
{{!}} the <code>normal</code> and <code>normal[1]</code> textures [[Texture Blending#Normal map blending|blended]] together
{{!}}-
{{!}} the combined <code>diffuse</code> textures
{{!}} the combined <code>diffuse</code> textures overlaid with the <code>diffuse[1]</code> texture using [[Texture Blending#Detail blending|detail blending]]
{{!}}}


| vertex colors =
| vertex colors =
Line 41: Line 51:
* Alpha is used as the basis for the <b>blend factor</b>
* Alpha is used as the basis for the <b>blend factor</b>


| textures =
| bugs = The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures.
Unfortunately, the surface' normal direction never gets set outside this <code>if</code>-block, which means normals are completely broken outside the detail range.
 
| textures =  


diffuse,0,Any,
diffuse,0,Any,

Latest revision as of 12:17, 25 August 2025

Return to shaders list

Overview

Shader Behavior Overview

An advanced PBR shader that uses

Warning
This shader has a severe bug where normals break outside the detail range! It is advised to not used this shader.

Related shaders

Behavior

Vertex alpha blending

The shader has two sets of diffuse textures and two sets of PBRFactor parameters.

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.

Distance blending

Uses distance blending to interpolate

From... ... to
the normal texture the normal and normal[1] textures blended together
the combined diffuse textures the combined diffuse textures overlaid with the diffuse[1] texture using detail blending

Vertex Colors

  • Color is not used
  • Alpha is used as the basis for the blend factor

Bugs

Warning
The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures. Unfortunately, the surface' normal direction never gets set outside this if-block, which means normals are completely broken outside the detail range.

Material Inputs

Textures

Name

Index

UV Index

Kind

Red

Green

Blue

Alpha

diffuse 0 Any Albedo First Albedo color N/A
diffuse 1 2 Detail albedo Detail color N/A
diffuse 2 Any Albedo Second Albedo color N/A
normal 0 0 Normal map Normal map direction N/A N/A
normal 1 2 Detail Normal map Detail Normal map direction N/A N/A

Parameters

Name

X

Y

Z

W

DetailFactor UV scale for the diffuse[1] and normal[1] textures N/A N/A N/A
PBRFactor First Specular factor First Smoothness factor First Metallic factor N/A
PBRFactor2 Second Specular factor Second Smoothness factor Second Metallic factor 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.