<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hedgedocs.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Justin113D</id>
	<title>HedgeDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://hedgedocs.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Justin113D"/>
	<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php/Special:Contributions/Justin113D"/>
	<updated>2026-04-08T13:32:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DistanceBlend_dpn&amp;diff=1133</id>
		<title>Shadow Generations Shaders - DistanceBlend dpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DistanceBlend_dpn&amp;diff=1133"/>
		<updated>2025-08-25T15:31:14Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Fixed title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DistanceBlend_dpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_noise, no_compute_instancing&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend between 3 sets of textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
This shader uses [[Texture Blending#Distance blending|distance blending]] to blend between 3 sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
* The &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture counts as 3 different textures, each color channel containing the smoothness for a different set.&lt;br /&gt;
&lt;br /&gt;
The specular factor is the same for every set, and the ambient occlusion from the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture only gets used for the first set, while the second and third sets don&#039;t receive any ambient occlusion.&lt;br /&gt;
&lt;br /&gt;
The shaders &amp;lt;code&amp;gt;DistanceBlend&amp;lt;/code&amp;gt; parameter determines at which distance to blend to each texture set:&lt;br /&gt;
* &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; are used to blend to the second set of textures&lt;br /&gt;
* &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt; are used to blend to the third set of textures&lt;br /&gt;
&lt;br /&gt;
The third set has priority over the second set, so if the distances are set up so that the third set starts blending in before the second, then the second won&#039;t be visible at all.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|albedo]] color__,&lt;br /&gt;
First [[Opacity|opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|albedo]] color__,&lt;br /&gt;
Second [[Opacity|opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Third [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|albedo]] color__,&lt;br /&gt;
Third [[Opacity|opacity]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|smoothness]] factor,&lt;br /&gt;
Third [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Third [[Normal_mapping|normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DistanceBlend,&lt;br /&gt;
First distance center,&lt;br /&gt;
First fade range,&lt;br /&gt;
Second distance center,&lt;br /&gt;
Second fade range;&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture &lt;br /&gt;
* &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture &amp;lt;br/&amp;gt;(only for sampling the second smoothness factor),&lt;br /&gt;
UV scale for the &lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[2]&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture &lt;br /&gt;
* &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture &amp;lt;br/&amp;gt;(only for sampling the third smoothness factor),,;&lt;br /&gt;
&lt;br /&gt;
PBRFactor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DistanceBlend_dpn&amp;diff=1132</id>
		<title>Shadow Generations Shaders - DistanceBlend dpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DistanceBlend_dpn&amp;diff=1132"/>
		<updated>2025-08-25T15:30:08Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Created page with &amp;quot;{{Shader Documentation | game = Shadow Generations | shader name = Blend_dpndpn | sbo = model=2, no_transparent_layer, no_noise, no_compute_instancing  | overview =  An advanced PBR shader that uses distance blending to blend between 3 sets of textures.  | related shaders =  Blend_dpndpn, Blend_dpnbdpn, BlendDetail_dndnd, BlendDetail_dpndpnn, Detail_dpndpn, Detail_dpnn, Direct...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpndpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_noise, no_compute_instancing&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend between 3 sets of textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
This shader uses [[Texture Blending#Distance blending|distance blending]] to blend between 3 sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
* The &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture counts as 3 different textures, each color channel containing the smoothness for a different set.&lt;br /&gt;
&lt;br /&gt;
The specular factor is the same for every set, and the ambient occlusion from the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture only gets used for the first set, while the second and third sets don&#039;t receive any ambient occlusion.&lt;br /&gt;
&lt;br /&gt;
The shaders &amp;lt;code&amp;gt;DistanceBlend&amp;lt;/code&amp;gt; parameter determines at which distance to blend to each texture set:&lt;br /&gt;
* &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; are used to blend to the second set of textures&lt;br /&gt;
* &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt; are used to blend to the third set of textures&lt;br /&gt;
&lt;br /&gt;
The third set has priority over the second set, so if the distances are set up so that the third set starts blending in before the second, then the second won&#039;t be visible at all.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|albedo]] color__,&lt;br /&gt;
First [[Opacity|opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|albedo]] color__,&lt;br /&gt;
Second [[Opacity|opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Third [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|albedo]] color__,&lt;br /&gt;
Third [[Opacity|opacity]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|smoothness]] factor,&lt;br /&gt;
Third [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Third [[Normal_mapping|normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DistanceBlend,&lt;br /&gt;
First distance center,&lt;br /&gt;
First fade range,&lt;br /&gt;
Second distance center,&lt;br /&gt;
Second fade range;&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture &lt;br /&gt;
* &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture &amp;lt;br/&amp;gt;(only for sampling the second smoothness factor),&lt;br /&gt;
UV scale for the &lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[2]&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture &lt;br /&gt;
* &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; texture &amp;lt;br/&amp;gt;(only for sampling the third smoothness factor),,;&lt;br /&gt;
&lt;br /&gt;
PBRFactor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1131</id>
		<title>Shadow Generations Shaders - DirectionBlend dpnndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1131"/>
		<updated>2025-08-25T14:04:54Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added more shader links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpnndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets&lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]] into the first normal texture&lt;br /&gt;
&lt;br /&gt;
This shader is essentially a combination of the {{ShaderLink|Shadow Generations|DirectionBlend_dpndpn}} and {{ShaderLink|Shadow Generations|Detail_dpnn}} shaders.&lt;br /&gt;
&lt;br /&gt;
| overview bugs = This shader has a bug where the second normal texture is not applied.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
for the normal map of the first set of textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; (after[[#Distance blending|distance blending]]) texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| bugs =&lt;br /&gt;
When the shader unpacks the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture, the tangent and binormal vectors are left at 0, which results in no change by the normal map at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
The developers could have attempted to implement multi-tangent here, but must have compiled the shader before the multi-tangent system was properly implemented, which left the tangent and binormal at 0 and resulted in incorrectly unpacking the normal map.&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery = &lt;br /&gt;
File:ShadowGenerations DirectionBlend dpnndpn example.jpg{{!}}How &amp;lt;code&amp;gt;DirectionBlend_dpnndpn&amp;lt;/code&amp;gt; is used in Shadow Generations to create a &amp;quot;moss&amp;quot; layer on top of the cliffs in Kingdom Valley&lt;br /&gt;
File:ShadowGenerations DirectionBlend dpnndpn bug.png{{!}}Showing how the bug affects normals of the second set of textures&lt;br /&gt;
&lt;br /&gt;
| technical =&lt;br /&gt;
For some reason using the &amp;lt;code&amp;gt;IBL_CAPTURE&amp;lt;/code&amp;gt; debug view the directional blend factor is set to 0. &lt;br /&gt;
&amp;lt;br/&amp;gt;Why this was done is unknown, and makes no sense, as this produces IBL textures with an incorrect looking environment.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpnn&amp;diff=1130</id>
		<title>Shadow Generations Shaders - DirectionBlend dpndpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpnn&amp;diff=1130"/>
		<updated>2025-08-25T14:03:52Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpndpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that&lt;br /&gt;
* uses [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets&lt;br /&gt;
* [[Texture Blending#Normal map blending|blends]] an extra [[Hedgehog Engine 2 - Textures#Normal map|normal map]] textures into the other normal maps.&lt;br /&gt;
&lt;br /&gt;
This shader is essentially a modification of the {{ShaderLink|Shadow Generations|DirectionBlend_dpndpn}} shader.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Extra Normal Map ===&lt;br /&gt;
The &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture is [[Texture Blending#Normal map blending|blended]] into the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures before their usage.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Extra [[Normal_mapping|Normal map direction]] that is [[Texture Blending#Normal map blending|blended]] into the other normal maps_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpndpn_example.jpg&amp;diff=1129</id>
		<title>File:ShadowGenerations DirectionBlend dpndpn example.jpg</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpndpn_example.jpg&amp;diff=1129"/>
		<updated>2025-08-25T13:49:01Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Justin113D uploaded a new version of File:ShadowGenerations DirectionBlend dpndpn example.jpg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example for how the DirectionBlend_dpndpn shader is used in Shadow Generations&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1128</id>
		<title>Shadow Generations Shaders - DirectionBlend dpnndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1128"/>
		<updated>2025-08-25T13:28:25Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpnndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets&lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]] into the first normal texture&lt;br /&gt;
&lt;br /&gt;
| overview bugs = This shader has a bug where the second normal texture is not applied.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
for the normal map of the first set of textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; (after[[#Distance blending|distance blending]]) texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| bugs =&lt;br /&gt;
When the shader unpacks the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture, the tangent and binormal vectors are left at 0, which results in no change by the normal map at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
The developers could have attempted to implement multi-tangent here, but must have compiled the shader before the multi-tangent system was properly implemented, which left the tangent and binormal at 0 and resulted in incorrectly unpacking the normal map.&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery = &lt;br /&gt;
File:ShadowGenerations DirectionBlend dpnndpn example.jpg{{!}}How &amp;lt;code&amp;gt;DirectionBlend_dpnndpn&amp;lt;/code&amp;gt; is used in Shadow Generations to create a &amp;quot;moss&amp;quot; layer on top of the cliffs in Kingdom Valley&lt;br /&gt;
File:ShadowGenerations DirectionBlend dpnndpn bug.png{{!}}Showing how the bug affects normals of the second set of textures&lt;br /&gt;
&lt;br /&gt;
| technical =&lt;br /&gt;
For some reason using the &amp;lt;code&amp;gt;IBL_CAPTURE&amp;lt;/code&amp;gt; debug view the directional blend factor is set to 0. &lt;br /&gt;
&amp;lt;br/&amp;gt;Why this was done is unknown, and makes no sense, as this produces IBL textures with an incorrect looking environment.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1127</id>
		<title>Shadow Generations Shaders - DirectionBlend dpnndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1127"/>
		<updated>2025-08-25T13:19:08Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added gallery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpnndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets&lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]] into the first normal texture&lt;br /&gt;
&lt;br /&gt;
| overview bugs = This shader has a bug where the second normal texture is not applied.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
for the normal map of the first set of textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; (after[[#Distance blending|distance blending]]) texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| bugs =&lt;br /&gt;
When the shader unpacks the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture, the tangent and binormal vectors are left at 0, which results in no change by the normal map at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
The developers could have attempted to implement multi-tangent here, but must have compiled the shader before the multi-tangent system was properly implemented, which left the tangent and binormal at 0 and resulted in incorrectly unpacking the normal map.&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery = &lt;br /&gt;
File:ShadowGenerations DirectionBlend dpnndpn example.jpg{{!}}How &amp;lt;code&amp;gt;DirectionBlend_dpnndpn&amp;lt;/code&amp;gt; is used in Shadow Generations to create a &amp;quot;moss&amp;quot; layer on top of the cliffs in Kingdom Valley&lt;br /&gt;
File:ShadowGenerations DirectionBlend dpnndpn bug.png{{!}}Showing how the bug affects normals of the second set of textures&lt;br /&gt;
&lt;br /&gt;
| technical =&lt;br /&gt;
For some reason using the &amp;lt;code&amp;gt;IBL_CAPTURE&amp;lt;/code&amp;gt; debug view the directional blend factor is set to 0. &lt;br /&gt;
Why this was done is unknown, and makes no sense.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpnndpn_bug.png&amp;diff=1126</id>
		<title>File:ShadowGenerations DirectionBlend dpnndpn bug.png</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpnndpn_bug.png&amp;diff=1126"/>
		<updated>2025-08-25T13:17:43Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Showing how the DirectionBlend_dpnndpn shader in Shadow Generations is bugged&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpnndpn_example.jpg&amp;diff=1125</id>
		<title>File:ShadowGenerations DirectionBlend dpnndpn example.jpg</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpnndpn_example.jpg&amp;diff=1125"/>
		<updated>2025-08-25T13:17:05Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example for how the DirectionBlend_dpnndpn shader is used in Shadow Generations&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dpndpnn&amp;diff=1124</id>
		<title>Shadow Generations Shaders - BlendDetail dpndpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dpndpnn&amp;diff=1124"/>
		<updated>2025-08-25T12:17:51Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new bugs parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dpndpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] in a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]]&lt;br /&gt;
* Vertex alpha to blend between two sets of [[Hedgehog Engine 2 - Textures#Albedo|albedo]] and [[Hedgehog Engine 2 - Textures#PRM|PRM]] textures&lt;br /&gt;
&lt;br /&gt;
It is essentially a combination of the {{ShaderLink|Shadow Generations|Blend_dpndpn}} and {{ShaderLink|Shadow Generations|Detail_dpnn}} shaders.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Vertex alpha blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| bugs = The shader has 3 &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture slots: Only &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; are used, with &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; left unused.&lt;br /&gt;
Yet, to be able to specify a texture for the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; slot, a material must have 3 texture slots, even if the slot for &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; is empty.&lt;br /&gt;
&amp;lt;br/&amp;gt;In a similar vein, the shader has the &amp;lt;code&amp;gt;enable_multi_tangent_space&amp;lt;/code&amp;gt; feature, but never makes use of it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
What likely happened here is that the developers used the code from {{ShaderLink|Shadow Generations|Blend_dpndpn}} as a base and then added in the detail normal map logic from {{ShaderLink|Shadow Generations|Detail_dpnn}} but accidentally pasted it over the previous normal map code, leaving just the detail normal map code behind.&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,N/A,,Unused___;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
normal,2,3,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1123</id>
		<title>Shadow Generations Shaders - BlendDetail dndnd</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1123"/>
		<updated>2025-08-25T12:17:11Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new bug parameters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dndnd&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses&lt;br /&gt;
* vertex alpha to blend between two [[Hedgehog Engine 2 - Textures#Albedo|albedo]] textures&lt;br /&gt;
* [[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&lt;br /&gt;
&lt;br /&gt;
| overview bugs = This shader has a severe bug where normals break outside the detail range!&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Vertex alpha blending ===&lt;br /&gt;
&lt;br /&gt;
The shader has two sets of &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures and two sets of &amp;lt;code&amp;gt;PBRFactor&amp;lt;/code&amp;gt; parameters.&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&lt;br /&gt;
{{!}}+&lt;br /&gt;
! From...&lt;br /&gt;
!... to&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
{{!}} the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} the combined &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures&lt;br /&gt;
{{!}} the combined &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures overlaid with the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture using [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is not used&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| bugs = The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures.&lt;br /&gt;
Unfortunately, the surface&#039; normal direction never gets set outside this &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;-block, which means normals are completely broken outside the detail range.&lt;br /&gt;
&lt;br /&gt;
| textures = &lt;br /&gt;
&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
[[Texture Blending#Detail blending|Detail color]]__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures,,,;&lt;br /&gt;
&lt;br /&gt;
PBRFactor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
PBRFactor2,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1122</id>
		<title>Shadow Generations Shaders - DirectionBlend dpnndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1122"/>
		<updated>2025-08-25T12:15:55Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added bug warnings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpnndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets&lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]] into the first normal texture&lt;br /&gt;
&lt;br /&gt;
| overview bugs = This shader has a bug where the second normal texture is not applied.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
for the normal map of the first set of textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; (after[[#Distance blending|distance blending]]) texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| bugs =&lt;br /&gt;
When the shader unpacks the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture, the tangent and binormal vectors are left at 0, which results in no change by the normal map at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
The developers could have attempted to implement multi-tangent here, but must have compiled the shader before the multi-tangent system was properly implemented, which left the tangent and binormal at 0 and resulted in incorrectly unpacking the normal map.&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| technical =&lt;br /&gt;
For some reason using the &amp;lt;code&amp;gt;IBL_CAPTURE&amp;lt;/code&amp;gt; debug view the directional blend factor is set to 0. &lt;br /&gt;
Why this was done is unknown, and makes no sense.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Template:Shader_Documentation&amp;diff=1121</id>
		<title>Template:Shader Documentation</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Template:Shader_Documentation&amp;diff=1121"/>
		<updated>2025-08-25T12:11:35Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{DISPLAYTITLE:{{{game}}} Shaders - {{{shader name}}}}}&lt;br /&gt;
[[{{{game}}} Shaders|Return to shaders list]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
{{#invoke:ShaderDoc|create_sbo|game={{{game}}}|parameters={{{sbo|}}}}}&lt;br /&gt;
{{{overview}}}&lt;br /&gt;
{{#if:{{{overview bugs|}}}|{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content={{{overview bugs}}}&lt;br /&gt;
It is advised to not used this shader.}}}}&lt;br /&gt;
{{#if:{{{related shaders|}}}|&lt;br /&gt;
=== Related shaders ===&lt;br /&gt;
{{#invoke:ShaderDoc|shader_link_list&lt;br /&gt;
|game={{{game}}}&lt;br /&gt;
|shaders={{{related shaders}}}&lt;br /&gt;
}}|}}&lt;br /&gt;
== Behavior ==&lt;br /&gt;
{{{behavior|}}}&lt;br /&gt;
{{#if:{{{multi tangent|}}}|&lt;br /&gt;
=== Multi-tangent ===&lt;br /&gt;
{{{multi tangent}}}&lt;br /&gt;
|}}&lt;br /&gt;
=== Vertex Colors ===&lt;br /&gt;
{{{vertex colors|Shader does not use vertex colors}}}&lt;br /&gt;
{{#if:{{{bugs|}}}|&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content={{{bugs}}}}}}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Material Inputs ==&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
{{#if:{{{textures|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Name|Name of the material texture slot}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Index|Index of the texture slot name, starting from 0; This is important when a shader has the same slot name multiple times, in which case their order determines how each slot is used}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: UV Index|Which UV map the slot uses, which is either an index from 0 to 3 or &amp;quot;any&amp;quot;, in which case the UV map can be selected in the material. &lt;br /&gt;
If a model does not have a UV Map for the specified index, then the game will fall back to UV Index 0}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Kind|General usage format of the texture slot. More precise documentation is found on the right}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Red|How the red component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Green|How the green component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Blue|How the blue component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Alpha|How the alpha component of the texture gets used}}&lt;br /&gt;
{{#invoke:ShaderDoc|shader_table|{{{textures}}}}}&lt;br /&gt;
{{!}}}|This shader does not use any textures.}}&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
{{#if:{{{parameters|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Name|Name of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: X|The first component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: Y|The second component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: Z|The third component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: W|The fourth component of the parameter}}&lt;br /&gt;
{{#invoke:ShaderDoc|shader_table|{{{parameters}}}}}&lt;br /&gt;
{{!}}}|This shader does not use any parameters.}}&lt;br /&gt;
{{#if:{{{gallery|}}}|&lt;br /&gt;
== Gallery ==&lt;br /&gt;
{{#tag:gallery|{{{gallery}}}|perrow=4|widths=400px|heights=300px|mode=nolines|}}|}}&lt;br /&gt;
== Technical ==&lt;br /&gt;
{{{technical|}}}&lt;br /&gt;
{{#if:{{{features|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; width=&amp;quot;300px&amp;quot;&lt;br /&gt;
{{!}}-&lt;br /&gt;
!Shader Features&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|{{{features}}}}}&lt;br /&gt;
{{!}}}|}}&amp;lt;nowiki/&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;params&amp;quot;: {&lt;br /&gt;
        &amp;quot;game&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Game&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Which game this shader belongs to&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;shader name&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader name&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;The name of the shader&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;sbo&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader behavior overview&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Parameters for the shader behavior overview&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;overview&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Overview&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Overview content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;overview bug&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Overview bug&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Overview bug content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;related shaders&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Related shaders&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;List of related shaders&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;behavior&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Behavior content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;multi tangent&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Multi tangent&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Multi tangent behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;vertex colors&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Vertex color&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Vertex color behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;bugs&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Bugs&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Bugs in behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;textures&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Textures&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Texture table contents; Fields seperated by commas, column spans specified by underscores and rows seperated by semicolons&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;parameters&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Parameters&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Parameter table contents; Fields seperated by commas, column spans specified by underscores and rows seperated by semicolons&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;gallery&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Gallery contents&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Picture gallery contents&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;technical&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Technical&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Technical information&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;features&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader features (technical)&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;List of technical features that the shader has been compiled with&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
&lt;br /&gt;
| shader name = Common_dpn&lt;br /&gt;
&lt;br /&gt;
| sbo = model=2,&lt;br /&gt;
no_opaque_layer,&lt;br /&gt;
no_punch_through_layer,&lt;br /&gt;
noise_dithering&lt;br /&gt;
&lt;br /&gt;
| overview = A standard PBR shader with no special behavior.&lt;br /&gt;
&lt;br /&gt;
| overview bugs = &lt;br /&gt;
&lt;br /&gt;
BUGS!&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Common_dn,&lt;br /&gt;
Common_dp,&lt;br /&gt;
Common_dpn,&lt;br /&gt;
Common_dpna,&lt;br /&gt;
Common_dither_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = Lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| multi tangent = &lt;br /&gt;
Lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| bugs =&lt;br /&gt;
BUGS!&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,Transparency;&lt;br /&gt;
test,1,2,,,,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
diffuse,[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
PBRFactor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery = File:ShadowGenerations Detail dpnn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpnn&amp;lt;/code&amp;gt; is used for cliffs in Rail Canyon to blend in detail normals when the camera is closer to the surface&lt;br /&gt;
&lt;br /&gt;
| technical = lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_deferred_rendering,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi &lt;br /&gt;
}}&lt;br /&gt;
== Other ==&lt;br /&gt;
Outside template&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Template:Shader_Documentation&amp;diff=1120</id>
		<title>Template:Shader Documentation</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Template:Shader_Documentation&amp;diff=1120"/>
		<updated>2025-08-25T12:11:02Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added bugs panels&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{DISPLAYTITLE:{{{game}}} Shaders - {{{shader name}}}}}&lt;br /&gt;
[[{{{game}}} Shaders|Return to shaders list]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
{{#invoke:ShaderDoc|create_sbo|game={{{game}}}|parameters={{{sbo|}}}}}&lt;br /&gt;
{{{overview}}}&lt;br /&gt;
{{#if:{{{overview bugs|}}}|{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content={{{overview bugs}}}&lt;br /&gt;
It is adviced to not used this shader.}}}}&lt;br /&gt;
{{#if:{{{related shaders|}}}|&lt;br /&gt;
=== Related shaders ===&lt;br /&gt;
{{#invoke:ShaderDoc|shader_link_list&lt;br /&gt;
|game={{{game}}}&lt;br /&gt;
|shaders={{{related shaders}}}&lt;br /&gt;
}}|}}&lt;br /&gt;
== Behavior ==&lt;br /&gt;
{{{behavior|}}}&lt;br /&gt;
{{#if:{{{multi tangent|}}}|&lt;br /&gt;
=== Multi-tangent ===&lt;br /&gt;
{{{multi tangent}}}&lt;br /&gt;
|}}&lt;br /&gt;
=== Vertex Colors ===&lt;br /&gt;
{{{vertex colors|Shader does not use vertex colors}}}&lt;br /&gt;
{{#if:{{{bugs|}}}|&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content={{{bugs}}}}}}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Material Inputs ==&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
{{#if:{{{textures|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Name|Name of the material texture slot}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Index|Index of the texture slot name, starting from 0; This is important when a shader has the same slot name multiple times, in which case their order determines how each slot is used}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: UV Index|Which UV map the slot uses, which is either an index from 0 to 3 or &amp;quot;any&amp;quot;, in which case the UV map can be selected in the material. &lt;br /&gt;
If a model does not have a UV Map for the specified index, then the game will fall back to UV Index 0}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Kind|General usage format of the texture slot. More precise documentation is found on the right}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Red|How the red component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Green|How the green component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Blue|How the blue component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Alpha|How the alpha component of the texture gets used}}&lt;br /&gt;
{{#invoke:ShaderDoc|shader_table|{{{textures}}}}}&lt;br /&gt;
{{!}}}|This shader does not use any textures.}}&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
{{#if:{{{parameters|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Name|Name of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: X|The first component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: Y|The second component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: Z|The third component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: W|The fourth component of the parameter}}&lt;br /&gt;
{{#invoke:ShaderDoc|shader_table|{{{parameters}}}}}&lt;br /&gt;
{{!}}}|This shader does not use any parameters.}}&lt;br /&gt;
{{#if:{{{gallery|}}}|&lt;br /&gt;
== Gallery ==&lt;br /&gt;
{{#tag:gallery|{{{gallery}}}|perrow=4|widths=400px|heights=300px|mode=nolines|}}|}}&lt;br /&gt;
== Technical ==&lt;br /&gt;
{{{technical|}}}&lt;br /&gt;
{{#if:{{{features|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; width=&amp;quot;300px&amp;quot;&lt;br /&gt;
{{!}}-&lt;br /&gt;
!Shader Features&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|{{{features}}}}}&lt;br /&gt;
{{!}}}|}}&amp;lt;nowiki/&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;params&amp;quot;: {&lt;br /&gt;
        &amp;quot;game&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Game&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Which game this shader belongs to&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;shader name&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader name&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;The name of the shader&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;sbo&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader behavior overview&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Parameters for the shader behavior overview&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;overview&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Overview&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Overview content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;overview bug&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Overview bug&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Overview bug content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;related shaders&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Related shaders&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;List of related shaders&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;behavior&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Behavior content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;multi tangent&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Multi tangent&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Multi tangent behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;vertex colors&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Vertex color&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Vertex color behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;bugs&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Bugs&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Bugs in behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;textures&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Textures&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Texture table contents; Fields seperated by commas, column spans specified by underscores and rows seperated by semicolons&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;parameters&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Parameters&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Parameter table contents; Fields seperated by commas, column spans specified by underscores and rows seperated by semicolons&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;gallery&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Gallery contents&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Picture gallery contents&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;technical&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Technical&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Technical information&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;features&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader features (technical)&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;List of technical features that the shader has been compiled with&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
&lt;br /&gt;
| shader name = Common_dpn&lt;br /&gt;
&lt;br /&gt;
| sbo = model=2,&lt;br /&gt;
no_opaque_layer,&lt;br /&gt;
no_punch_through_layer,&lt;br /&gt;
noise_dithering&lt;br /&gt;
&lt;br /&gt;
| overview = A standard PBR shader with no special behavior.&lt;br /&gt;
&lt;br /&gt;
| overview bugs = &lt;br /&gt;
&lt;br /&gt;
BUGS!&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Common_dn,&lt;br /&gt;
Common_dp,&lt;br /&gt;
Common_dpn,&lt;br /&gt;
Common_dpna,&lt;br /&gt;
Common_dither_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = Lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| multi tangent = &lt;br /&gt;
Lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| bugs =&lt;br /&gt;
BUGS!&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,Transparency;&lt;br /&gt;
test,1,2,,,,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
diffuse,[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
PBRFactor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery = File:ShadowGenerations Detail dpnn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpnn&amp;lt;/code&amp;gt; is used for cliffs in Rail Canyon to blend in detail normals when the camera is closer to the surface&lt;br /&gt;
&lt;br /&gt;
| technical = lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_deferred_rendering,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi &lt;br /&gt;
}}&lt;br /&gt;
== Other ==&lt;br /&gt;
Outside template&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1119</id>
		<title>Shadow Generations Shaders - DirectionBlend dpnndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1119"/>
		<updated>2025-08-25T12:06:54Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpnndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets&lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]] into the first normal texture&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=This shader has a bug where the second normal texture is not applied.&lt;br /&gt;
It is advised to not use this shader.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
for the normal map of the first set of textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; (after[[#Distance blending|distance blending]]) texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| technical =&lt;br /&gt;
For some reason using the &amp;lt;code&amp;gt;IBL_CAPTURE&amp;lt;/code&amp;gt; debug view the directional blend factor is set to 0. &lt;br /&gt;
Why this was done is unknown, and makes no sense.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1118</id>
		<title>Shadow Generations Shaders - DirectionBlend dpnndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpnndpn&amp;diff=1118"/>
		<updated>2025-08-25T12:02:13Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Created page with &amp;quot;{{Shader Documentation | game = Shadow Generations | shader name = DirectionBlend_dpnndpn | sbo = model=2, no_noise, no_transparent_layer  | overview = An advanced PBR shader that uses directional blending to interpolate between two texture sets.  | related shaders =  Blend_dpnbdpn, Blend_dpndpn, BlendDetail_dndnd, BlendDetail_dpndpnn, Detail_dpndpn, Detail_dpnn, DirectionB...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpnndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
for the normal map of the first set of textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; (after[[#Distance blending|distance blending]]) texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,Any,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| technical =&lt;br /&gt;
For some reason using the &amp;lt;code&amp;gt;IBL_CAPTURE&amp;lt;/code&amp;gt; debug view the directional blend factor is set to 0. &lt;br /&gt;
Why this was done is unknown, and makes no sense.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpnbdpn&amp;diff=1117</id>
		<title>Shadow Generations Shaders - Blend dpnbdpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpnbdpn&amp;diff=1117"/>
		<updated>2025-08-25T11:40:18Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added PBR link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpnbdpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_punch_through_layer, no_noise, no_compute_instancing, multi_tangent&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that lets you blend between two sets of textures using vertex alpha and a mask texture.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of the vertex alpha multiplied by the &amp;lt;code&amp;gt;transparency&amp;lt;/code&amp;gt; textures red channel.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| multi tangent =&lt;br /&gt;
When enabled, the second set of tangents will be used to [[Normal_mapping#Tangent_Space|unpack]] the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the blended together diffuse texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
transparency,0,3,&lt;br /&gt;
Mask,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor),,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
File:ShadowGenerations Blend dpnbdpn example.jpg{{!}}How &amp;lt;code&amp;gt;Blend_dpnbdpn&amp;lt;/code&amp;gt; is used for the Ship in the metal overlord boss fight to make use of already existing textures&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpn&amp;diff=1116</id>
		<title>Shadow Generations Shaders - DirectionBlend dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpn&amp;diff=1116"/>
		<updated>2025-08-25T11:29:28Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the &amp;lt;b&amp;gt;directional blend factor&amp;lt;/b&amp;gt; is used for the transparency, and not any of the diffuse textures alpha channels, which makes for limited use cases.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
File:ShadowGenerations DirectionBlend dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;DirectionBlend_dpndpn&amp;lt;/code&amp;gt; is used in Shadow Generations to create a &amp;quot;gravel&amp;quot; layer on top of rocky surfaces on Chaos Island&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpn&amp;diff=1115</id>
		<title>Shadow Generations Shaders - DirectionBlend dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpn&amp;diff=1115"/>
		<updated>2025-08-25T11:12:13Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added gallery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the blend factor is used for the transparency, and not any of the diffuse textures alpha channels.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
File:ShadowGenerations DirectionBlend dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;DirectionBlend_dpndpn&amp;lt;/code&amp;gt; is used in Shadow Generations to create a &amp;quot;gravel&amp;quot; layer on top of rocky surfaces on Chaos Island&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpndpn_example.jpg&amp;diff=1114</id>
		<title>File:ShadowGenerations DirectionBlend dpndpn example.jpg</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_DirectionBlend_dpndpn_example.jpg&amp;diff=1114"/>
		<updated>2025-08-25T11:10:25Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example for how the DirectionBlend_dpndpn shader is used in Shadow Generations&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpn&amp;diff=1113</id>
		<title>Shadow Generations Shaders - DirectionBlend dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_DirectionBlend_dpndpn&amp;diff=1113"/>
		<updated>2025-08-25T10:58:47Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Created page with &amp;quot;{{Shader Documentation | game = Shadow Generations | shader name = DirectionBlend_dpndpn | sbo = model=2, no_noise, no_transparent_layer  | overview = An advanced PBR shader that uses directional blending to interpolate between two texture sets.  | related shaders =  Blend_dpnbdpn, Blend_dpndpn, BlendDetail_dndnd, BlendDetail_dpndpnn, Detail_dpndpn, Detail_dpnn, DirectionBl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = DirectionBlend_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview =&lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Directional blending|directional blending]] to interpolate between two texture sets.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is calculated using [[Texture Blending#Directional blending|directional blending]].&lt;br /&gt;
&lt;br /&gt;
This involves various inputs:&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Input&lt;br /&gt;
! Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal map&lt;br /&gt;
{{!}} The &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture is applied to the normal direction before calculating the directional blend factor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Red vertex color channel&lt;br /&gt;
{{!}} The [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;DirectionParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|directional blend direction]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;NormalBlendParam&amp;lt;/code&amp;gt; parameter&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend intensity and offset]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; (multiplied together)&lt;br /&gt;
{{!}} The [[Texture Blending#Directional blending|Directional blend limit]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Transparency ===&lt;br /&gt;
&lt;br /&gt;
(For some reason) the blend factor is used for the transparency, and not any of the diffuse textures alpha channels.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* The colors...&lt;br /&gt;
** Red channel is used as the [[Texture Blending#Variables|directional blend bias]]&lt;br /&gt;
** Green and blue channels are unused&lt;br /&gt;
* Alpha is unused&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Texture Blending#Variables|directional blend limit]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
&lt;br /&gt;
DirectionParam, [[Texture Blending#Directional blending|Directional blend direction]]__,;&lt;br /&gt;
&lt;br /&gt;
NormalBlendParam, &lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend intensity]],&lt;br /&gt;
[[Texture Blending#Directional blending|Directional blend offset]],&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpndpn&amp;diff=1111</id>
		<title>Shadow Generations Shaders - Blend dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpndpn&amp;diff=1111"/>
		<updated>2025-08-25T10:38:24Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added PBR link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpndpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_punch_through_layer, no_noise, no_compute_instancing, multi_tangent&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that lets you blend between two sets of textures using vertex alpha.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| multi tangent =&lt;br /&gt;
When enabled, the second set of tangents will be used to [[Normal_mapping#Tangent_Space|unpack]] the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the blended together diffuse texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:ShadowGenerations Blend dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;Blend_dpndpn&amp;lt;/code&amp;gt; is used to transition from the bridge to the grass&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1110</id>
		<title>Shadow Generations Shaders - BlendDetail dndnd</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1110"/>
		<updated>2025-08-23T23:02:37Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added behavior&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dndnd&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses&lt;br /&gt;
* vertex alpha to blend between two [[Hedgehog Engine 2 - Textures#Albedo|albedo]] textures&lt;br /&gt;
* [[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&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=This shader has a severe bug where normals break outside the detail range! &lt;br /&gt;
It is advised to not use this shader.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
=== Vertex alpha blending ===&lt;br /&gt;
&lt;br /&gt;
The shader has two sets of &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures and two sets of &amp;lt;code&amp;gt;PBRFactor&amp;lt;/code&amp;gt; parameters.&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&lt;br /&gt;
{{!}}+&lt;br /&gt;
! From...&lt;br /&gt;
!... to&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
{{!}} the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} the combined &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures&lt;br /&gt;
{{!}} the combined &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures overlaid with the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture using [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures.&lt;br /&gt;
Unfortunately, the surface&#039; normal direction never gets set outside this &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;-block, which means normals are completely broken outside the detail range.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is not used&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
[[Texture Blending#Detail blending|Detail color]]__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures,,,;&lt;br /&gt;
&lt;br /&gt;
PBRFactor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
PBRFactor2,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1109</id>
		<title>Shadow Generations Shaders - BlendDetail dndnd</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1109"/>
		<updated>2025-08-23T22:53:40Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dndnd&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses&lt;br /&gt;
* vertex alpha to blend between two [[Hedgehog Engine 2 - Textures#Albedo|albedo]] textures&lt;br /&gt;
* [[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&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=This shader has a severe bug where normals break outside the detail range! &lt;br /&gt;
It is advised to not use this shader.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
Todo&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures.&lt;br /&gt;
Unfortunately, the surface&#039; normal direction never gets set outside this &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;-block, which means normals are completely broken outside the detail range.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is not used&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
[[Texture Blending#Detail blending|Detail color]]__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures,,,;&lt;br /&gt;
&lt;br /&gt;
PBRFactor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
PBRFactor2,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1108</id>
		<title>Shadow Generations Shaders - BlendDetail dndnd</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dndnd&amp;diff=1108"/>
		<updated>2025-08-23T22:52:36Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Created page with &amp;quot;{{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...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dndnd&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses&lt;br /&gt;
* vertex alpha to blend between two [[Hedgehog Engine 2 - Textures#Albedo|albedo]] textures&lt;br /&gt;
* [[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&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=This shader has a severe bug where normals break outside the detail range! &lt;br /&gt;
It is advised to not use this shader.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
&lt;br /&gt;
Todo&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=The shader checks if the surface is within the detail range, and only then applies the detail diffuse and the detail normal textures.&lt;br /&gt;
Unfortunately, the surface&#039; normal direction never gets set outside this &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;-blocks, which means normals are completely broken outside the detail range.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is not used&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
&lt;br /&gt;
diffuse,0,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
[[Texture Blending#Detail blending|Detail color]]__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,2,Any,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures,,,;&lt;br /&gt;
&lt;br /&gt;
PBRFactor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
PBRFactor2,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1107</id>
		<title>Shadow Generations Shaders - Detail dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1107"/>
		<updated>2025-08-23T22:49:00Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added detail color link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend in a set of detail textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate &lt;br /&gt;
* from the first set of textures&lt;br /&gt;
* to the first set of texture with the second set of texture blended into them.&lt;br /&gt;
&lt;br /&gt;
Each of the second textures is blended into the first differently:&lt;br /&gt;
&lt;br /&gt;
{{{!}} Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Texture property&lt;br /&gt;
! blend method&lt;br /&gt;
{{!}}- &lt;br /&gt;
{{!}} Albedo&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Transparency&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Specular&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Roughness&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Metallic&lt;br /&gt;
{{!}} Addition; Remaps the detail metallic to a range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; beforehand&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Ambient Occlusion&lt;br /&gt;
{{!}} Multiplication&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal&lt;br /&gt;
{{!}} Uses [[Texture Blending#Normal blending|normal blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
[[Texture Blending#Detail blending|Detail color]]__,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
Detail PRM,,&lt;br /&gt;
Detail Smoothness,&lt;br /&gt;
Detail Metallic,&lt;br /&gt;
Detail Ambient Occlusion;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the second set of textures,,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:ShadowGenerations Detail dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpndpn&amp;lt;/code&amp;gt; is used in the Mephiles boss arena to add details when the camera is close to the floor&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1106</id>
		<title>Shadow Generations Shaders - Detail dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1106"/>
		<updated>2025-08-23T22:47:02Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Corrected detail texture index and uv index&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend in a set of detail textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate &lt;br /&gt;
* from the first set of textures&lt;br /&gt;
* to the first set of texture with the second set of texture blended into them.&lt;br /&gt;
&lt;br /&gt;
Each of the second textures is blended into the first differently:&lt;br /&gt;
&lt;br /&gt;
{{{!}} Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Texture property&lt;br /&gt;
! blend method&lt;br /&gt;
{{!}}- &lt;br /&gt;
{{!}} Albedo&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Transparency&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Specular&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Roughness&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Metallic&lt;br /&gt;
{{!}} Addition; Remaps the detail metallic to a range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; beforehand&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Ambient Occlusion&lt;br /&gt;
{{!}} Multiplication&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal&lt;br /&gt;
{{!}} Uses [[Texture Blending#Normal blending|normal blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
Detail color__,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
Detail PRM,,&lt;br /&gt;
Detail Smoothness,&lt;br /&gt;
Detail Metallic,&lt;br /&gt;
Detail Ambient Occlusion;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the second set of textures,,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:ShadowGenerations Detail dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpndpn&amp;lt;/code&amp;gt; is used in the Mephiles boss arena to add details when the camera is close to the floor&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dpndpnn&amp;diff=1105</id>
		<title>Shadow Generations Shaders - BlendDetail dpndpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dpndpnn&amp;diff=1105"/>
		<updated>2025-08-23T22:34:45Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added missing feature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dpndpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] in a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]]&lt;br /&gt;
* Vertex alpha to blend between two sets of [[Hedgehog Engine 2 - Textures#Albedo|albedo]] and [[Hedgehog Engine 2 - Textures#PRM|PRM]] textures&lt;br /&gt;
&lt;br /&gt;
It is essentially a combination of the {{ShaderLink|Shadow Generations|Blend_dpndpn}} and {{ShaderLink|Shadow Generations|Detail_dpnn}} shaders.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Vertex alpha blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=The shader has 3 &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture slots: Only &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; are used, with &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; left unused.&lt;br /&gt;
Yet, to be able to specify a texture for the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; slot, a material must have 3 texture slots, even if the slot for &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; is empty.&lt;br /&gt;
&amp;lt;br/&amp;gt;In a similar vein, the shader has the &amp;lt;code&amp;gt;enable_multi_tangent_space&amp;lt;/code&amp;gt; feature, but never makes use of it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
What likely happened here is that the developers used the code from {{ShaderLink|Shadow Generations|Blend_dpndpn}} as a base and then added in the detail normal map logic from {{ShaderLink|Shadow Generations|Detail_dpnn}} but accidentally pasted it over the previous normal map code, leaving just the detail normal map code behind.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,N/A,,Unused___;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
normal,2,3,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Common_dpnm&amp;diff=1104</id>
		<title>Shadow Generations Shaders - Common dpnm</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Common_dpnm&amp;diff=1104"/>
		<updated>2025-08-22T20:45:28Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new gallery parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Common_dpnm&lt;br /&gt;
| sbo = model=2, no_noise&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
A standard [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader with an additional mask texture to apply a color decal.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Common_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
The &amp;lt;code&amp;gt;diffuse [1]&amp;lt;/code&amp;gt; texture is a mask that controls the visibility of the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; parameter color, which gets multiplied with the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color.&lt;br /&gt;
&amp;lt;br/&amp;gt;This is useful if you want to animate specific regions of a material with a single color.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,1,0,&lt;br /&gt;
Mask,&lt;br /&gt;
Controls the visibility of the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; parameter color,,,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters = &lt;br /&gt;
diffuse, (RGB) Color multiplied with the sampled diffuse texture color based on &amp;lt;code&amp;gt;diffuse [1]&amp;lt;/code&amp;gt;__,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:SXSG Common dpnm example.jpg{{!}}Using &amp;lt;code&amp;gt;Common_dpnm&amp;lt;/code&amp;gt; to overlay a red color over a ground texture using the HedgeDocs logo&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_deferred_rendering,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1103</id>
		<title>Shadow Generations Shaders - Detail dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1103"/>
		<updated>2025-08-22T20:44:46Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new gallery parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend in a set of detail textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate &lt;br /&gt;
* from the first set of textures&lt;br /&gt;
* to the first set of texture with the second set of texture blended into them.&lt;br /&gt;
&lt;br /&gt;
Each of the second textures is blended into the first differently:&lt;br /&gt;
&lt;br /&gt;
{{{!}} Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Texture property&lt;br /&gt;
! blend method&lt;br /&gt;
{{!}}- &lt;br /&gt;
{{!}} Albedo&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Transparency&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Specular&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Roughness&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Metallic&lt;br /&gt;
{{!}} Addition; Remaps the detail metallic to a range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; beforehand&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Ambient Occlusion&lt;br /&gt;
{{!}} Multiplication&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal&lt;br /&gt;
{{!}} Uses [[Texture Blending#Normal blending|normal blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
Detail color__,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
Detail PRM,,&lt;br /&gt;
Detail Smoothness,&lt;br /&gt;
Detail Metallic,&lt;br /&gt;
Detail Ambient Occlusion;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the second set of textures,,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:ShadowGenerations Detail dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpndpn&amp;lt;/code&amp;gt; is used in the Mephiles boss arena to add details when the camera is close to the floor&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpnbdpn&amp;diff=1102</id>
		<title>Shadow Generations Shaders - Blend dpnbdpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpnbdpn&amp;diff=1102"/>
		<updated>2025-08-22T20:44:06Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new gallery parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpnbdpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_punch_through_layer, no_noise, no_compute_instancing, multi_tangent&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced PBR shader that lets you blend between two sets of textures using vertex alpha and a mask texture.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of the vertex alpha multiplied by the &amp;lt;code&amp;gt;transparency&amp;lt;/code&amp;gt; textures red channel.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| multi tangent =&lt;br /&gt;
When enabled, the second set of tangents will be used to [[Normal_mapping#Tangent_Space|unpack]] the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the blended together diffuse texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
transparency,0,3,&lt;br /&gt;
Mask,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor),,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
File:ShadowGenerations Blend dpnbdpn example.jpg{{!}}How &amp;lt;code&amp;gt;Blend_dpnbdpn&amp;lt;/code&amp;gt; is used for the Ship in the metal overlord boss fight to make use of already existing textures&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpndpn&amp;diff=1101</id>
		<title>Shadow Generations Shaders - Blend dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpndpn&amp;diff=1101"/>
		<updated>2025-08-22T20:43:40Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new gallery parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpndpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_punch_through_layer, no_noise, no_compute_instancing, multi_tangent&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced PBR shader that lets you blend between two sets of textures using vertex alpha.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| multi tangent =&lt;br /&gt;
When enabled, the second set of tangents will be used to [[Normal_mapping#Tangent_Space|unpack]] the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the blended together diffuse texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:ShadowGenerations Blend dpndpn example.jpg{{!}}How &amp;lt;code&amp;gt;Blend_dpndpn&amp;lt;/code&amp;gt; is used to transition from the bridge to the grass&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpnn&amp;diff=1100</id>
		<title>Shadow Generations Shaders - Detail dpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpnn&amp;diff=1100"/>
		<updated>2025-08-22T20:42:48Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Used new gallery parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] in a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]].&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
| gallery =&lt;br /&gt;
&lt;br /&gt;
File:ShadowGenerations Detail dpnn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpnn&amp;lt;/code&amp;gt; is used for cliffs in Rail Canyon to blend in detail normals when the camera is closer to the surface&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Template:Shader_Documentation&amp;diff=1099</id>
		<title>Template:Shader Documentation</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Template:Shader_Documentation&amp;diff=1099"/>
		<updated>2025-08-22T20:42:12Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added gallery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{DISPLAYTITLE:{{{game}}} Shaders - {{{shader name}}}}}&lt;br /&gt;
[[{{{game}}} Shaders|Return to shaders list]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
{{#invoke:ShaderDoc|create_sbo|game={{{game}}}|parameters={{{sbo|}}}}}&lt;br /&gt;
{{{overview}}}&lt;br /&gt;
{{#if:{{{related shaders|}}}|&lt;br /&gt;
=== Related shaders ===&lt;br /&gt;
{{#invoke:ShaderDoc|shader_link_list&lt;br /&gt;
|game={{{game}}}&lt;br /&gt;
|shaders={{{related shaders}}}&lt;br /&gt;
}}|}}&lt;br /&gt;
== Behavior ==&lt;br /&gt;
{{{behavior|}}}&lt;br /&gt;
{{#if:{{{multi tangent|}}}|&lt;br /&gt;
=== Multi-tangent ===&lt;br /&gt;
{{{multi tangent}}}&lt;br /&gt;
|}}&lt;br /&gt;
=== Vertex Colors ===&lt;br /&gt;
{{{vertex colors|Shader does not use vertex colors}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Material Inputs ==&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
{{#if:{{{textures|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Name|Name of the material texture slot}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Index|Index of the texture slot name, starting from 0; This is important when a shader has the same slot name multiple times, in which case their order determines how each slot is used}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: UV Index|Which UV map the slot uses, which is either an index from 0 to 3 or &amp;quot;any&amp;quot;, in which case the UV map can be selected in the material. &lt;br /&gt;
If a model does not have a UV Map for the specified index, then the game will fall back to UV Index 0}}&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Kind|General usage format of the texture slot. More precise documentation is found on the right}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Red|How the red component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Green|How the green component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Blue|How the blue component of the texture gets used}}&lt;br /&gt;
!width=24%{{!}} {{#tip-text: Alpha|How the alpha component of the texture gets used}}&lt;br /&gt;
{{#invoke:ShaderDoc|shader_table|{{{textures}}}}}&lt;br /&gt;
{{!}}}|This shader does not use any textures.}}&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
{{#if:{{{parameters|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
!width=1%{{!}}{{#tip-text: Name|Name of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: X|The first component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: Y|The second component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: Z|The third component of the parameter}}&lt;br /&gt;
!width=25%{{!}}{{#tip-text: W|The fourth component of the parameter}}&lt;br /&gt;
{{#invoke:ShaderDoc|shader_table|{{{parameters}}}}}&lt;br /&gt;
{{!}}}|This shader does not use any parameters.}}&lt;br /&gt;
{{#if:{{{gallery|}}}|&lt;br /&gt;
== Gallery ==&lt;br /&gt;
{{#tag:gallery|{{{gallery}}}|perrow=4|widths=400px|heights=300px|mode=nolines|}}|}}&lt;br /&gt;
== Technical ==&lt;br /&gt;
{{{technical|}}}&lt;br /&gt;
{{#if:{{{features|}}}|&lt;br /&gt;
{{{!}} class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; width=&amp;quot;300px&amp;quot;&lt;br /&gt;
{{!}}-&lt;br /&gt;
!Shader Features&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|{{{features}}}}}&lt;br /&gt;
{{!}}}|}}&amp;lt;nowiki/&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;params&amp;quot;: {&lt;br /&gt;
        &amp;quot;game&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Game&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Which game this shader belongs to&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;shader name&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader name&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;The name of the shader&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;sbo&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader behavior overview&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Parameters for the shader behavior overview&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;overview&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Overview&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Overview content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;related shaders&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Related shaders&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;List of related shaders&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;behavior&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Behavior content&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;multi tangent&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Multi tangent&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Multi tangent behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;vertex colors&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Vertex color&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Vertex color behavior&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;textures&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Textures&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Texture table contents; Fields seperated by commas, column spans specified by underscores and rows seperated by semicolons&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;parameters&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Parameters&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Parameter table contents; Fields seperated by commas, column spans specified by underscores and rows seperated by semicolons&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;gallery&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Gallery contents&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Picture gallery contents&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;technical&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Technical&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;Technical information&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;features&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Shader features (technical)&amp;quot;,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;List of technical features that the shader has been compiled with&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
&lt;br /&gt;
| shader name = Common_dpn&lt;br /&gt;
&lt;br /&gt;
| sbo = model=2,&lt;br /&gt;
no_opaque_layer,&lt;br /&gt;
no_punch_through_layer,&lt;br /&gt;
noise_dithering&lt;br /&gt;
&lt;br /&gt;
| overview = A standard PBR shader with no special behavior.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Common_dn,&lt;br /&gt;
Common_dp,&lt;br /&gt;
Common_dpn,&lt;br /&gt;
Common_dpna,&lt;br /&gt;
Common_dither_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = Lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| multi tangent = &lt;br /&gt;
Lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,Transparency;&lt;br /&gt;
test,1,2,,,,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
diffuse,[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
PBRFactor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor&lt;br /&gt;
,[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor&lt;br /&gt;
,;&lt;br /&gt;
&lt;br /&gt;
| gallery = File:ShadowGenerations Detail dpnn example.jpg{{!}}How &amp;lt;code&amp;gt;Detail_dpnn&amp;lt;/code&amp;gt; is used for cliffs in Rail Canyon to blend in detail normals when the camera is closer to the surface&lt;br /&gt;
&lt;br /&gt;
| technical = lorem ipsum.&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_deferred_rendering,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi &lt;br /&gt;
}}&lt;br /&gt;
== Other ==&lt;br /&gt;
Outside template&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Module:ShaderDoc&amp;diff=1098</id>
		<title>Module:ShaderDoc</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Module:ShaderDoc&amp;diff=1098"/>
		<updated>2025-08-22T20:41:39Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Removed gallery function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
&lt;br /&gt;
This module provides several functions used in the &amp;quot;Shader_Documentation&amp;quot; template&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local shader_doc = {}&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
create_sbo&lt;br /&gt;
&lt;br /&gt;
Creates an &amp;quot;Shader behavior overview&amp;quot; from a list of comma separated parameters&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|create_sbo|game=Game|parameters=model=2,toggle_1,toggle_2,toggle_3,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    game: Prefix to use for the template&lt;br /&gt;
    parameters: A list of comma separated names. If a name is not &amp;quot;assigned&amp;quot;, it will receive the value &amp;quot;1&amp;quot;&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.create_sbo( frame )&lt;br /&gt;
    local game = frame.args[&#039;game&#039;];&lt;br /&gt;
    local parameters = frame.args[&#039;parameters&#039;] or &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    local parameter_list = mw.text.split( parameters, &#039;,&#039; );&lt;br /&gt;
&lt;br /&gt;
    local args = {};&lt;br /&gt;
&lt;br /&gt;
    for _, parameter in ipairs( parameter_list ) do&lt;br /&gt;
        if #parameter &amp;gt; 0 then&lt;br /&gt;
            local name = parameter;&lt;br /&gt;
            local value = 1;&lt;br /&gt;
            &lt;br /&gt;
            local equal_pos, equal_end = mw.ustring.find( parameter, &#039;=&#039; );&lt;br /&gt;
            if equal_pos ~= nil then&lt;br /&gt;
                name = mw.text.trim(mw.ustring.sub(parameter, 1, equal_pos - 1));&lt;br /&gt;
                value = mw.text.trim(mw.ustring.sub(parameter, equal_end + 1, #parameter));&lt;br /&gt;
            else&lt;br /&gt;
                name = mw.text.trim(name);&lt;br /&gt;
            end&lt;br /&gt;
            mw.log(name)&lt;br /&gt;
            mw.log(value)&lt;br /&gt;
            mw.log(&#039;---&#039;)&lt;br /&gt;
&lt;br /&gt;
            args[name] = value;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local title = game .. &#039; Shader Behavior&#039;;&lt;br /&gt;
&lt;br /&gt;
    return frame:expandTemplate{ title = title, args = args };&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
shader_link_list&lt;br /&gt;
&lt;br /&gt;
This function produces a bullet list of links to shaders&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|shader_link_list|game=game_name|shaders=shader_a,shader_b,shader_c,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    game: The shader link prefix&lt;br /&gt;
    shaders: A comma separated list of shaders to list&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.shader_link_list( frame )&lt;br /&gt;
    local game = frame.args[&#039;game&#039;];&lt;br /&gt;
    local shaders = frame.args[&#039;shaders&#039;];&lt;br /&gt;
&lt;br /&gt;
    if game == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Game not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if shaders == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Shaders not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local shader_list = mw.text.split( shaders, &#039;,&#039; );&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    for _, shader in ipairs( shader_list ) do&lt;br /&gt;
        local trimmed_shader = mw.text.trim(shader);&lt;br /&gt;
&lt;br /&gt;
        if #trimmed_shader &amp;gt; 0 then&lt;br /&gt;
            result = result .. &#039;* [[&#039; .. game .. &#039; Shaders - &#039; .. trimmed_shader .. &#039;|&#039; .. trimmed_shader .. &#039;]]\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
shader_table&lt;br /&gt;
&lt;br /&gt;
This function converts comma separated items to a list row&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|cell1,cell2,cell3}}&lt;br /&gt;
&lt;br /&gt;
info:&lt;br /&gt;
commas (,) = seperate items&lt;br /&gt;
underscores (_) before commas = span to the next cell&lt;br /&gt;
semicolons (;) = seperate rows&lt;br /&gt;
backslash  (\) before any of these 4: escape&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.shader_table( frame )&lt;br /&gt;
    local contents = frame.args[1];&lt;br /&gt;
&lt;br /&gt;
    if contents == nil then&lt;br /&gt;
        return shader_doc._error( &#039;No contents&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if #contents &amp;gt; 0 and string.sub(contents, -1) ~= &#039;;&#039; then&lt;br /&gt;
        contents = contents .. &#039;;&#039;;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local current_cell_text = &#039;&#039;;&lt;br /&gt;
    local span_length = 0;&lt;br /&gt;
    local current_row = {};&lt;br /&gt;
    local rows = {};&lt;br /&gt;
    local escaped = false;&lt;br /&gt;
&lt;br /&gt;
    for cp in mw.ustring.gcodepoint( contents ) do&lt;br /&gt;
        local char = mw.ustring.char( cp );&lt;br /&gt;
        local skip = false;&lt;br /&gt;
&lt;br /&gt;
        if span_length &amp;gt; 0 then&lt;br /&gt;
            if char == &#039;_&#039; then&lt;br /&gt;
                span_length = span_length + 1;&lt;br /&gt;
                skip = true;&lt;br /&gt;
            elseif char ~= &#039;,&#039; and char ~= &#039;;&#039; then&lt;br /&gt;
                for i = 1,span_length,1 do&lt;br /&gt;
                    current_cell_text = current_cell_text .. &#039;_&#039;&lt;br /&gt;
                end&lt;br /&gt;
                span_length = 0;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if escaped and not skip then&lt;br /&gt;
            escaped = false;&lt;br /&gt;
            current_cell_text = current_cell_text .. char;&lt;br /&gt;
            skip = true;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if not skip then&lt;br /&gt;
            if char == &#039;\\&#039; then&lt;br /&gt;
                escaped = true;&lt;br /&gt;
            elseif char == &#039;_&#039; then&lt;br /&gt;
                span_length = 1;&lt;br /&gt;
            elseif char == &#039;,&#039; or char == &#039;;&#039; then&lt;br /&gt;
                &lt;br /&gt;
                table.insert(current_row, {&lt;br /&gt;
                    [&#039;text&#039;] = current_cell_text,&lt;br /&gt;
                    [&#039;span_length&#039;] = span_length&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                span_length = 0;&lt;br /&gt;
                current_cell_text = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
                if char == &#039;;&#039; then&lt;br /&gt;
                    table.insert(rows, current_row);&lt;br /&gt;
                    current_row = {};&lt;br /&gt;
                end&lt;br /&gt;
            else&lt;br /&gt;
                current_cell_text = current_cell_text .. char;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
    &lt;br /&gt;
    for i, row in ipairs(rows) do&lt;br /&gt;
        result = result .. &#039;|-\n&#039;;&lt;br /&gt;
        for j, cell in ipairs(row) do&lt;br /&gt;
            if j == 1 then&lt;br /&gt;
                result = result .. &#039;!&#039;;&lt;br /&gt;
            else&lt;br /&gt;
                result = result .. &#039;|&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            span_length = cell[&#039;span_length&#039;];&lt;br /&gt;
            if span_length &amp;gt; 0 then&lt;br /&gt;
                result = result .. &#039;colspan=&amp;quot;&#039; .. (span_length + 1) .. &#039;&amp;quot;|&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            current_cell_text = mw.text.trim(cell[&#039;text&#039;]);&lt;br /&gt;
&lt;br /&gt;
            if #current_cell_text == 0 then&lt;br /&gt;
                current_cell_text = &#039;N/A&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            if j == 1 then&lt;br /&gt;
                current_cell_text = &#039;&amp;lt;code&amp;gt;&#039; .. current_cell_text .. &#039;&amp;lt;/code&amp;gt;&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            result = result .. current_cell_text .. &#039;\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
technical_features&lt;br /&gt;
&lt;br /&gt;
This function produces single column table rows with code formatting.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|feature_a,feature_b,feature_c,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    features: A comma separated list of technical features&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.technical_features( frame )&lt;br /&gt;
    local features = frame.args[1];&lt;br /&gt;
&lt;br /&gt;
    if features == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Features not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local feature_list = mw.text.split( features, &#039;,&#039; );&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    for _, feature in ipairs( feature_list ) do&lt;br /&gt;
        local trimmed_feature = mw.text.trim(feature);&lt;br /&gt;
        if #trimmed_feature &amp;gt; 0 then&lt;br /&gt;
            result = result .. &#039;|-\n|&amp;lt;code&amp;gt;&#039; .. trimmed_feature .. &#039;&amp;lt;/code&amp;gt;\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function to handle error messages.&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc._error( error_str )&lt;br /&gt;
	local frame = mw.getCurrentFrame();&lt;br /&gt;
	local error_category = frame.args.error_category or &#039;Errors reported by Module String&#039;;&lt;br /&gt;
	local ignore_errors = frame.args.ignore_errors or false;&lt;br /&gt;
	local no_category = frame.args.no_category or false;&lt;br /&gt;
&lt;br /&gt;
	if shader_doc._getBoolean(ignore_errors) then&lt;br /&gt;
		return &#039;&#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local error_str = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: &#039; .. error_str .. &#039;&amp;lt;/strong&amp;gt;&#039;;&lt;br /&gt;
	if error_category ~= &#039;&#039; and not shader_doc._getBoolean( no_category ) then&lt;br /&gt;
		error_str = &#039;[[Category:&#039; .. error_category .. &#039;]]&#039; .. error_str;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return error_str;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper Function to interpret boolean strings&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc._getBoolean( boolean_str )&lt;br /&gt;
	local boolean_value;&lt;br /&gt;
&lt;br /&gt;
	if type( boolean_str ) == &#039;string&#039; then&lt;br /&gt;
		boolean_str = boolean_str:lower();&lt;br /&gt;
		if boolean_str == &#039;false&#039; or boolean_str == &#039;no&#039; or boolean_str == &#039;0&#039;&lt;br /&gt;
				or boolean_str == &#039;&#039; then&lt;br /&gt;
			boolean_value = false;&lt;br /&gt;
		else&lt;br /&gt;
			boolean_value = true;&lt;br /&gt;
		end&lt;br /&gt;
	elseif type( boolean_str ) == &#039;boolean&#039; then&lt;br /&gt;
		boolean_value = boolean_str;&lt;br /&gt;
	else&lt;br /&gt;
		error( &#039;No boolean value found&#039; );&lt;br /&gt;
	end&lt;br /&gt;
	return boolean_value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return shader_doc;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Module:ShaderDoc&amp;diff=1097</id>
		<title>Module:ShaderDoc</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Module:ShaderDoc&amp;diff=1097"/>
		<updated>2025-08-22T20:35:19Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Gallery tests&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
&lt;br /&gt;
This module provides several functions used in the &amp;quot;Shader_Documentation&amp;quot; template&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local shader_doc = {}&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
create_sbo&lt;br /&gt;
&lt;br /&gt;
Creates an &amp;quot;Shader behavior overview&amp;quot; from a list of comma separated parameters&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|create_sbo|game=Game|parameters=model=2,toggle_1,toggle_2,toggle_3,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    game: Prefix to use for the template&lt;br /&gt;
    parameters: A list of comma separated names. If a name is not &amp;quot;assigned&amp;quot;, it will receive the value &amp;quot;1&amp;quot;&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.create_sbo( frame )&lt;br /&gt;
    local game = frame.args[&#039;game&#039;];&lt;br /&gt;
    local parameters = frame.args[&#039;parameters&#039;] or &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    local parameter_list = mw.text.split( parameters, &#039;,&#039; );&lt;br /&gt;
&lt;br /&gt;
    local args = {};&lt;br /&gt;
&lt;br /&gt;
    for _, parameter in ipairs( parameter_list ) do&lt;br /&gt;
        if #parameter &amp;gt; 0 then&lt;br /&gt;
            local name = parameter;&lt;br /&gt;
            local value = 1;&lt;br /&gt;
            &lt;br /&gt;
            local equal_pos, equal_end = mw.ustring.find( parameter, &#039;=&#039; );&lt;br /&gt;
            if equal_pos ~= nil then&lt;br /&gt;
                name = mw.text.trim(mw.ustring.sub(parameter, 1, equal_pos - 1));&lt;br /&gt;
                value = mw.text.trim(mw.ustring.sub(parameter, equal_end + 1, #parameter));&lt;br /&gt;
            else&lt;br /&gt;
                name = mw.text.trim(name);&lt;br /&gt;
            end&lt;br /&gt;
            mw.log(name)&lt;br /&gt;
            mw.log(value)&lt;br /&gt;
            mw.log(&#039;---&#039;)&lt;br /&gt;
&lt;br /&gt;
            args[name] = value;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local title = game .. &#039; Shader Behavior&#039;;&lt;br /&gt;
&lt;br /&gt;
    return frame:expandTemplate{ title = title, args = args };&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
shader_link_list&lt;br /&gt;
&lt;br /&gt;
This function produces a bullet list of links to shaders&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|shader_link_list|game=game_name|shaders=shader_a,shader_b,shader_c,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    game: The shader link prefix&lt;br /&gt;
    shaders: A comma separated list of shaders to list&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.shader_link_list( frame )&lt;br /&gt;
    local game = frame.args[&#039;game&#039;];&lt;br /&gt;
    local shaders = frame.args[&#039;shaders&#039;];&lt;br /&gt;
&lt;br /&gt;
    if game == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Game not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if shaders == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Shaders not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local shader_list = mw.text.split( shaders, &#039;,&#039; );&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    for _, shader in ipairs( shader_list ) do&lt;br /&gt;
        local trimmed_shader = mw.text.trim(shader);&lt;br /&gt;
&lt;br /&gt;
        if #trimmed_shader &amp;gt; 0 then&lt;br /&gt;
            result = result .. &#039;* [[&#039; .. game .. &#039; Shaders - &#039; .. trimmed_shader .. &#039;|&#039; .. trimmed_shader .. &#039;]]\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
shader_table&lt;br /&gt;
&lt;br /&gt;
This function converts comma separated items to a list row&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|cell1,cell2,cell3}}&lt;br /&gt;
&lt;br /&gt;
info:&lt;br /&gt;
commas (,) = seperate items&lt;br /&gt;
underscores (_) before commas = span to the next cell&lt;br /&gt;
semicolons (;) = seperate rows&lt;br /&gt;
backslash  (\) before any of these 4: escape&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.shader_table( frame )&lt;br /&gt;
    local contents = frame.args[1];&lt;br /&gt;
&lt;br /&gt;
    if contents == nil then&lt;br /&gt;
        return shader_doc._error( &#039;No contents&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if #contents &amp;gt; 0 and string.sub(contents, -1) ~= &#039;;&#039; then&lt;br /&gt;
        contents = contents .. &#039;;&#039;;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local current_cell_text = &#039;&#039;;&lt;br /&gt;
    local span_length = 0;&lt;br /&gt;
    local current_row = {};&lt;br /&gt;
    local rows = {};&lt;br /&gt;
    local escaped = false;&lt;br /&gt;
&lt;br /&gt;
    for cp in mw.ustring.gcodepoint( contents ) do&lt;br /&gt;
        local char = mw.ustring.char( cp );&lt;br /&gt;
        local skip = false;&lt;br /&gt;
&lt;br /&gt;
        if span_length &amp;gt; 0 then&lt;br /&gt;
            if char == &#039;_&#039; then&lt;br /&gt;
                span_length = span_length + 1;&lt;br /&gt;
                skip = true;&lt;br /&gt;
            elseif char ~= &#039;,&#039; and char ~= &#039;;&#039; then&lt;br /&gt;
                for i = 1,span_length,1 do&lt;br /&gt;
                    current_cell_text = current_cell_text .. &#039;_&#039;&lt;br /&gt;
                end&lt;br /&gt;
                span_length = 0;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if escaped and not skip then&lt;br /&gt;
            escaped = false;&lt;br /&gt;
            current_cell_text = current_cell_text .. char;&lt;br /&gt;
            skip = true;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if not skip then&lt;br /&gt;
            if char == &#039;\\&#039; then&lt;br /&gt;
                escaped = true;&lt;br /&gt;
            elseif char == &#039;_&#039; then&lt;br /&gt;
                span_length = 1;&lt;br /&gt;
            elseif char == &#039;,&#039; or char == &#039;;&#039; then&lt;br /&gt;
                &lt;br /&gt;
                table.insert(current_row, {&lt;br /&gt;
                    [&#039;text&#039;] = current_cell_text,&lt;br /&gt;
                    [&#039;span_length&#039;] = span_length&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                span_length = 0;&lt;br /&gt;
                current_cell_text = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
                if char == &#039;;&#039; then&lt;br /&gt;
                    table.insert(rows, current_row);&lt;br /&gt;
                    current_row = {};&lt;br /&gt;
                end&lt;br /&gt;
            else&lt;br /&gt;
                current_cell_text = current_cell_text .. char;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
    &lt;br /&gt;
    for i, row in ipairs(rows) do&lt;br /&gt;
        result = result .. &#039;|-\n&#039;;&lt;br /&gt;
        for j, cell in ipairs(row) do&lt;br /&gt;
            if j == 1 then&lt;br /&gt;
                result = result .. &#039;!&#039;;&lt;br /&gt;
            else&lt;br /&gt;
                result = result .. &#039;|&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            span_length = cell[&#039;span_length&#039;];&lt;br /&gt;
            if span_length &amp;gt; 0 then&lt;br /&gt;
                result = result .. &#039;colspan=&amp;quot;&#039; .. (span_length + 1) .. &#039;&amp;quot;|&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            current_cell_text = mw.text.trim(cell[&#039;text&#039;]);&lt;br /&gt;
&lt;br /&gt;
            if #current_cell_text == 0 then&lt;br /&gt;
                current_cell_text = &#039;N/A&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            if j == 1 then&lt;br /&gt;
                current_cell_text = &#039;&amp;lt;code&amp;gt;&#039; .. current_cell_text .. &#039;&amp;lt;/code&amp;gt;&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            result = result .. current_cell_text .. &#039;\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
create_gallery&lt;br /&gt;
&lt;br /&gt;
This function creates a gallery, because for some reason this cant be done in a regular template.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function shader_doc.create_gallery( frame )&lt;br /&gt;
    local parameters = frame.args[1] or &#039;&#039;;&lt;br /&gt;
    local contents = frame.args[2] or &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    local gallery = mw.html.create( &#039;gallery&#039; );&lt;br /&gt;
    gallery:wikitext( contents );&lt;br /&gt;
&lt;br /&gt;
    return tostring( gallery );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
technical_features&lt;br /&gt;
&lt;br /&gt;
This function produces single column table rows with code formatting.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|feature_a,feature_b,feature_c,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    features: A comma separated list of technical features&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.technical_features( frame )&lt;br /&gt;
    local features = frame.args[1];&lt;br /&gt;
&lt;br /&gt;
    if features == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Features not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local feature_list = mw.text.split( features, &#039;,&#039; );&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    for _, feature in ipairs( feature_list ) do&lt;br /&gt;
        local trimmed_feature = mw.text.trim(feature);&lt;br /&gt;
        if #trimmed_feature &amp;gt; 0 then&lt;br /&gt;
            result = result .. &#039;|-\n|&amp;lt;code&amp;gt;&#039; .. trimmed_feature .. &#039;&amp;lt;/code&amp;gt;\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function to handle error messages.&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc._error( error_str )&lt;br /&gt;
	local frame = mw.getCurrentFrame();&lt;br /&gt;
	local error_category = frame.args.error_category or &#039;Errors reported by Module String&#039;;&lt;br /&gt;
	local ignore_errors = frame.args.ignore_errors or false;&lt;br /&gt;
	local no_category = frame.args.no_category or false;&lt;br /&gt;
&lt;br /&gt;
	if shader_doc._getBoolean(ignore_errors) then&lt;br /&gt;
		return &#039;&#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local error_str = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: &#039; .. error_str .. &#039;&amp;lt;/strong&amp;gt;&#039;;&lt;br /&gt;
	if error_category ~= &#039;&#039; and not shader_doc._getBoolean( no_category ) then&lt;br /&gt;
		error_str = &#039;[[Category:&#039; .. error_category .. &#039;]]&#039; .. error_str;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return error_str;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper Function to interpret boolean strings&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc._getBoolean( boolean_str )&lt;br /&gt;
	local boolean_value;&lt;br /&gt;
&lt;br /&gt;
	if type( boolean_str ) == &#039;string&#039; then&lt;br /&gt;
		boolean_str = boolean_str:lower();&lt;br /&gt;
		if boolean_str == &#039;false&#039; or boolean_str == &#039;no&#039; or boolean_str == &#039;0&#039;&lt;br /&gt;
				or boolean_str == &#039;&#039; then&lt;br /&gt;
			boolean_value = false;&lt;br /&gt;
		else&lt;br /&gt;
			boolean_value = true;&lt;br /&gt;
		end&lt;br /&gt;
	elseif type( boolean_str ) == &#039;boolean&#039; then&lt;br /&gt;
		boolean_value = boolean_str;&lt;br /&gt;
	else&lt;br /&gt;
		error( &#039;No boolean value found&#039; );&lt;br /&gt;
	end&lt;br /&gt;
	return boolean_value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return shader_doc;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Module:ShaderDoc&amp;diff=1096</id>
		<title>Module:ShaderDoc</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Module:ShaderDoc&amp;diff=1096"/>
		<updated>2025-08-22T20:24:53Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added create_gallery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
&lt;br /&gt;
This module provides several functions used in the &amp;quot;Shader_Documentation&amp;quot; template&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local shader_doc = {}&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
create_sbo&lt;br /&gt;
&lt;br /&gt;
Creates an &amp;quot;Shader behavior overview&amp;quot; from a list of comma separated parameters&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|create_sbo|game=Game|parameters=model=2,toggle_1,toggle_2,toggle_3,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    game: Prefix to use for the template&lt;br /&gt;
    parameters: A list of comma separated names. If a name is not &amp;quot;assigned&amp;quot;, it will receive the value &amp;quot;1&amp;quot;&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.create_sbo( frame )&lt;br /&gt;
    local game = frame.args[&#039;game&#039;];&lt;br /&gt;
    local parameters = frame.args[&#039;parameters&#039;] or &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    local parameter_list = mw.text.split( parameters, &#039;,&#039; );&lt;br /&gt;
&lt;br /&gt;
    local args = {};&lt;br /&gt;
&lt;br /&gt;
    for _, parameter in ipairs( parameter_list ) do&lt;br /&gt;
        if #parameter &amp;gt; 0 then&lt;br /&gt;
            local name = parameter;&lt;br /&gt;
            local value = 1;&lt;br /&gt;
            &lt;br /&gt;
            local equal_pos, equal_end = mw.ustring.find( parameter, &#039;=&#039; );&lt;br /&gt;
            if equal_pos ~= nil then&lt;br /&gt;
                name = mw.text.trim(mw.ustring.sub(parameter, 1, equal_pos - 1));&lt;br /&gt;
                value = mw.text.trim(mw.ustring.sub(parameter, equal_end + 1, #parameter));&lt;br /&gt;
            else&lt;br /&gt;
                name = mw.text.trim(name);&lt;br /&gt;
            end&lt;br /&gt;
            mw.log(name)&lt;br /&gt;
            mw.log(value)&lt;br /&gt;
            mw.log(&#039;---&#039;)&lt;br /&gt;
&lt;br /&gt;
            args[name] = value;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local title = game .. &#039; Shader Behavior&#039;;&lt;br /&gt;
&lt;br /&gt;
    return frame:expandTemplate{ title = title, args = args };&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
shader_link_list&lt;br /&gt;
&lt;br /&gt;
This function produces a bullet list of links to shaders&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|shader_link_list|game=game_name|shaders=shader_a,shader_b,shader_c,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    game: The shader link prefix&lt;br /&gt;
    shaders: A comma separated list of shaders to list&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.shader_link_list( frame )&lt;br /&gt;
    local game = frame.args[&#039;game&#039;];&lt;br /&gt;
    local shaders = frame.args[&#039;shaders&#039;];&lt;br /&gt;
&lt;br /&gt;
    if game == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Game not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if shaders == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Shaders not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local shader_list = mw.text.split( shaders, &#039;,&#039; );&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    for _, shader in ipairs( shader_list ) do&lt;br /&gt;
        local trimmed_shader = mw.text.trim(shader);&lt;br /&gt;
&lt;br /&gt;
        if #trimmed_shader &amp;gt; 0 then&lt;br /&gt;
            result = result .. &#039;* [[&#039; .. game .. &#039; Shaders - &#039; .. trimmed_shader .. &#039;|&#039; .. trimmed_shader .. &#039;]]\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
shader_table&lt;br /&gt;
&lt;br /&gt;
This function converts comma separated items to a list row&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|cell1,cell2,cell3}}&lt;br /&gt;
&lt;br /&gt;
info:&lt;br /&gt;
commas (,) = seperate items&lt;br /&gt;
underscores (_) before commas = span to the next cell&lt;br /&gt;
semicolons (;) = seperate rows&lt;br /&gt;
backslash  (\) before any of these 4: escape&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.shader_table( frame )&lt;br /&gt;
    local contents = frame.args[1];&lt;br /&gt;
&lt;br /&gt;
    if contents == nil then&lt;br /&gt;
        return shader_doc._error( &#039;No contents&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if #contents &amp;gt; 0 and string.sub(contents, -1) ~= &#039;;&#039; then&lt;br /&gt;
        contents = contents .. &#039;;&#039;;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local current_cell_text = &#039;&#039;;&lt;br /&gt;
    local span_length = 0;&lt;br /&gt;
    local current_row = {};&lt;br /&gt;
    local rows = {};&lt;br /&gt;
    local escaped = false;&lt;br /&gt;
&lt;br /&gt;
    for cp in mw.ustring.gcodepoint( contents ) do&lt;br /&gt;
        local char = mw.ustring.char( cp );&lt;br /&gt;
        local skip = false;&lt;br /&gt;
&lt;br /&gt;
        if span_length &amp;gt; 0 then&lt;br /&gt;
            if char == &#039;_&#039; then&lt;br /&gt;
                span_length = span_length + 1;&lt;br /&gt;
                skip = true;&lt;br /&gt;
            elseif char ~= &#039;,&#039; and char ~= &#039;;&#039; then&lt;br /&gt;
                for i = 1,span_length,1 do&lt;br /&gt;
                    current_cell_text = current_cell_text .. &#039;_&#039;&lt;br /&gt;
                end&lt;br /&gt;
                span_length = 0;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if escaped and not skip then&lt;br /&gt;
            escaped = false;&lt;br /&gt;
            current_cell_text = current_cell_text .. char;&lt;br /&gt;
            skip = true;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if not skip then&lt;br /&gt;
            if char == &#039;\\&#039; then&lt;br /&gt;
                escaped = true;&lt;br /&gt;
            elseif char == &#039;_&#039; then&lt;br /&gt;
                span_length = 1;&lt;br /&gt;
            elseif char == &#039;,&#039; or char == &#039;;&#039; then&lt;br /&gt;
                &lt;br /&gt;
                table.insert(current_row, {&lt;br /&gt;
                    [&#039;text&#039;] = current_cell_text,&lt;br /&gt;
                    [&#039;span_length&#039;] = span_length&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                span_length = 0;&lt;br /&gt;
                current_cell_text = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
                if char == &#039;;&#039; then&lt;br /&gt;
                    table.insert(rows, current_row);&lt;br /&gt;
                    current_row = {};&lt;br /&gt;
                end&lt;br /&gt;
            else&lt;br /&gt;
                current_cell_text = current_cell_text .. char;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
    &lt;br /&gt;
    for i, row in ipairs(rows) do&lt;br /&gt;
        result = result .. &#039;|-\n&#039;;&lt;br /&gt;
        for j, cell in ipairs(row) do&lt;br /&gt;
            if j == 1 then&lt;br /&gt;
                result = result .. &#039;!&#039;;&lt;br /&gt;
            else&lt;br /&gt;
                result = result .. &#039;|&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            span_length = cell[&#039;span_length&#039;];&lt;br /&gt;
            if span_length &amp;gt; 0 then&lt;br /&gt;
                result = result .. &#039;colspan=&amp;quot;&#039; .. (span_length + 1) .. &#039;&amp;quot;|&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            current_cell_text = mw.text.trim(cell[&#039;text&#039;]);&lt;br /&gt;
&lt;br /&gt;
            if #current_cell_text == 0 then&lt;br /&gt;
                current_cell_text = &#039;N/A&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            if j == 1 then&lt;br /&gt;
                current_cell_text = &#039;&amp;lt;code&amp;gt;&#039; .. current_cell_text .. &#039;&amp;lt;/code&amp;gt;&#039;;&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            result = result .. current_cell_text .. &#039;\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
create_gallery&lt;br /&gt;
&lt;br /&gt;
This function creates a gallery, because for some reason this cant be done in a regular template.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function shader_doc.create_gallery( frame )&lt;br /&gt;
    local parameters = frame.args[1] or &#039;&#039;;&lt;br /&gt;
    local contents = frame.args[2] or &#039;&#039;;&lt;br /&gt;
    return &#039;&amp;lt;gallery &#039; .. parameters .. &#039;&amp;gt;\n&#039; .. contents .. &#039;\n&amp;lt;/gallery&amp;gt;&#039;;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
technical_features&lt;br /&gt;
&lt;br /&gt;
This function produces single column table rows with code formatting.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:ShaderDoc|technical_features|feature_a,feature_b,feature_c,etc}}&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
    features: A comma separated list of technical features&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc.technical_features( frame )&lt;br /&gt;
    local features = frame.args[1];&lt;br /&gt;
&lt;br /&gt;
    if features == nil then&lt;br /&gt;
        return shader_doc._error( &#039;Features not specified&#039; );&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local feature_list = mw.text.split( features, &#039;,&#039; );&lt;br /&gt;
    local result = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
    for _, feature in ipairs( feature_list ) do&lt;br /&gt;
        local trimmed_feature = mw.text.trim(feature);&lt;br /&gt;
        if #trimmed_feature &amp;gt; 0 then&lt;br /&gt;
            result = result .. &#039;|-\n|&amp;lt;code&amp;gt;&#039; .. trimmed_feature .. &#039;&amp;lt;/code&amp;gt;\n&#039;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function to handle error messages.&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc._error( error_str )&lt;br /&gt;
	local frame = mw.getCurrentFrame();&lt;br /&gt;
	local error_category = frame.args.error_category or &#039;Errors reported by Module String&#039;;&lt;br /&gt;
	local ignore_errors = frame.args.ignore_errors or false;&lt;br /&gt;
	local no_category = frame.args.no_category or false;&lt;br /&gt;
&lt;br /&gt;
	if shader_doc._getBoolean(ignore_errors) then&lt;br /&gt;
		return &#039;&#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local error_str = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: &#039; .. error_str .. &#039;&amp;lt;/strong&amp;gt;&#039;;&lt;br /&gt;
	if error_category ~= &#039;&#039; and not shader_doc._getBoolean( no_category ) then&lt;br /&gt;
		error_str = &#039;[[Category:&#039; .. error_category .. &#039;]]&#039; .. error_str;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return error_str;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper Function to interpret boolean strings&lt;br /&gt;
]]&lt;br /&gt;
function shader_doc._getBoolean( boolean_str )&lt;br /&gt;
	local boolean_value;&lt;br /&gt;
&lt;br /&gt;
	if type( boolean_str ) == &#039;string&#039; then&lt;br /&gt;
		boolean_str = boolean_str:lower();&lt;br /&gt;
		if boolean_str == &#039;false&#039; or boolean_str == &#039;no&#039; or boolean_str == &#039;0&#039;&lt;br /&gt;
				or boolean_str == &#039;&#039; then&lt;br /&gt;
			boolean_value = false;&lt;br /&gt;
		else&lt;br /&gt;
			boolean_value = true;&lt;br /&gt;
		end&lt;br /&gt;
	elseif type( boolean_str ) == &#039;boolean&#039; then&lt;br /&gt;
		boolean_value = boolean_str;&lt;br /&gt;
	else&lt;br /&gt;
		error( &#039;No boolean value found&#039; );&lt;br /&gt;
	end&lt;br /&gt;
	return boolean_value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return shader_doc;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dpndpnn&amp;diff=1095</id>
		<title>Shadow Generations Shaders - BlendDetail dpndpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_BlendDetail_dpndpnn&amp;diff=1095"/>
		<updated>2025-08-22T20:12:30Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = BlendDetail_dpndpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_compute_instancing, no_transparent_layer, no_punch_through_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses &lt;br /&gt;
* [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] in a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]]&lt;br /&gt;
* Vertex alpha to blend between two sets of [[Hedgehog Engine 2 - Textures#Albedo|albedo]] and [[Hedgehog Engine 2 - Textures#PRM|PRM]] textures&lt;br /&gt;
&lt;br /&gt;
It is essentially a combination of the {{ShaderLink|Shadow Generations|Blend_dpndpn}} and {{ShaderLink|Shadow Generations|Detail_dpnn}} shaders.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
=== Vertex alpha blending ===&lt;br /&gt;
&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=The shader has 3 &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture slots: Only &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; are used, with &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; left unused.&lt;br /&gt;
Yet, to be able to specify a texture for the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; slot, a material must have 3 texture slots, even if the slot for &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; is empty.&lt;br /&gt;
&amp;lt;br/&amp;gt;In a similar vein, the shader has the &amp;lt;code&amp;gt;enable_multi_tangent_space&amp;lt;/code&amp;gt; feature, but never makes use of it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Speculation:&amp;lt;/b&amp;gt;&lt;br /&gt;
What likely happened here is that the developers used the code from {{ShaderLink|Shadow Generations|Blend_dpndpn}} as a base and then added in the detail normal map logic from {{ShaderLink|Shadow Generations|Detail_dpnn}} but accidentally pasted it over the previous normal map code, leaving just the detail normal map code behind.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,N/A,,Unused___;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
normal,2,3,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[2]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpnn&amp;diff=1094</id>
		<title>Shadow Generations Shaders - Detail dpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpnn&amp;diff=1094"/>
		<updated>2025-08-22T19:58:58Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Simplified detail normal map documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] in a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]].&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:ShadowGenerations Detail dpnn example.jpg|How &amp;lt;code&amp;gt;Detail_dpnn&amp;lt;/code&amp;gt; is used for cliffs in Rail Canyon to blend in detail normals when the camera is closer to the surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Template:ShaderLink&amp;diff=1093</id>
		<title>Template:ShaderLink</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Template:ShaderLink&amp;diff=1093"/>
		<updated>2025-08-22T19:44:48Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Fixed newline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;[[{{{game|{{{1}}}}}} Shaders - {{{shader|{{{2}}}}}}|{{{shader|{{{2}}}}}}]]&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
        &amp;quot;game&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Game&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Which game this shader belongs to&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;shader&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Shader&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The name of the shader&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
This template is primarily intended to be used with the [https://en.wikipedia.org/wiki/Template:For_loop for loop] template.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
{{ShaderLink&lt;br /&gt;
| game=Shadow Generations&lt;br /&gt;
| shader=Common_dpn&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ShaderLink|Shadow Generations|Common_dpn}}&lt;br /&gt;
&lt;br /&gt;
{{ShaderLink|Shadow Generations|Common_dpn}} {{ShaderLink|Shadow Generations|Common_dpn}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpnbdpn&amp;diff=1092</id>
		<title>Shadow Generations Shaders - Blend dpnbdpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpnbdpn&amp;diff=1092"/>
		<updated>2025-08-22T19:42:15Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpnbdpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_punch_through_layer, no_noise, no_compute_instancing, multi_tangent&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced PBR shader that lets you blend between two sets of textures using vertex alpha and a mask texture.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of the vertex alpha multiplied by the &amp;lt;code&amp;gt;transparency&amp;lt;/code&amp;gt; textures red channel.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| multi tangent =&lt;br /&gt;
When enabled, the second set of tangents will be used to [[Normal_mapping#Tangent_Space|unpack]] the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the blended together diffuse texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
transparency,0,3,&lt;br /&gt;
Mask,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor),,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:ShadowGenerations Blend dpnbdpn example.jpg|How &amp;lt;code&amp;gt;Blend_dpnbdpn&amp;lt;/code&amp;gt; is used for the Ship in the metal overlord boss fight to make use of already existing textures&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpndpn&amp;diff=1091</id>
		<title>Shadow Generations Shaders - Blend dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Blend_dpndpn&amp;diff=1091"/>
		<updated>2025-08-22T19:41:58Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Blend_dpndpn&lt;br /&gt;
| sbo = model=2, no_transparent_layer, no_punch_through_layer, no_noise, no_compute_instancing, multi_tangent&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced PBR shader that lets you blend between two sets of textures using vertex alpha.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior =&lt;br /&gt;
This shader has two sets of PBR textures:&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;specular[1]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shader uses a &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; to [[Texture Blending#Interpolation|interpolate]] from the first set of textures to second one.&lt;br /&gt;
&amp;lt;br/&amp;gt;This &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; consists of just the vertex alpha.&lt;br /&gt;
&lt;br /&gt;
* For the &amp;lt;code&amp;gt;specular&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is used as is.&lt;br /&gt;
* For the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; textures, the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt; is multiplied by the &amp;lt;code&amp;gt;diffuse[1]&amp;lt;/code&amp;gt; texture alpha.&lt;br /&gt;
&lt;br /&gt;
| multi tangent =&lt;br /&gt;
When enabled, the second set of tangents will be used to [[Normal_mapping#Tangent_Space|unpack]] the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the blended together diffuse texture color&lt;br /&gt;
* Alpha is used as the basis for the &amp;lt;b&amp;gt;blend factor&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
First [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,;&lt;br /&gt;
&lt;br /&gt;
diffuse,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
Second [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
Multiplied into the vertex alpha (blend factor)\, but &amp;lt;b&amp;gt;only&amp;lt;/b&amp;gt; for when blending the two diffuse textures!;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
First [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
Second [[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
First [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Second [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_multi_tangent_space,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:ShadowGenerations Blend dpndpn example.jpg|How &amp;lt;code&amp;gt;Blend_dpndpn&amp;lt;/code&amp;gt; is used to transition from the bridge to the grass&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_Detail_dpnn_example.jpg&amp;diff=1090</id>
		<title>File:ShadowGenerations Detail dpnn example.jpg</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_Detail_dpnn_example.jpg&amp;diff=1090"/>
		<updated>2025-08-22T19:20:07Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Justin113D uploaded a new version of File:ShadowGenerations Detail dpnn example.jpg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example for how the Detail_dpnn shader is used in Shadow Generations&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1089</id>
		<title>Shadow Generations Shaders - Detail dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1089"/>
		<updated>2025-08-22T19:11:17Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added gallery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend in a set of detail textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate &lt;br /&gt;
* from the first set of textures&lt;br /&gt;
* to the first set of texture with the second set of texture blended into them.&lt;br /&gt;
&lt;br /&gt;
Each of the second textures is blended into the first differently:&lt;br /&gt;
&lt;br /&gt;
{{{!}} Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Texture property&lt;br /&gt;
! blend method&lt;br /&gt;
{{!}}- &lt;br /&gt;
{{!}} Albedo&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Transparency&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Specular&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Roughness&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Metallic&lt;br /&gt;
{{!}} Addition; Remaps the detail metallic to a range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; beforehand&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Ambient Occlusion&lt;br /&gt;
{{!}} Multiplication&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal&lt;br /&gt;
{{!}} Uses [[Texture Blending#Normal blending|normal blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
Detail color__,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
Detail PRM,,&lt;br /&gt;
Detail Smoothness,&lt;br /&gt;
Detail Metallic,&lt;br /&gt;
Detail Ambient Occlusion;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the second set of textures,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:ShadowGenerations Detail dpndpn example.jpg|How &amp;lt;code&amp;gt;Detail_dpndpn&amp;lt;/code&amp;gt; is used in the Mephiles boss arena to add details when the camera is close to the floor&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_Detail_dpndpn_example.jpg&amp;diff=1088</id>
		<title>File:ShadowGenerations Detail dpndpn example.jpg</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_Detail_dpndpn_example.jpg&amp;diff=1088"/>
		<updated>2025-08-22T19:10:07Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example for how the Detail_dpndpn shader is used in Shadow Generations&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1087</id>
		<title>Shadow Generations Shaders - Detail dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1087"/>
		<updated>2025-08-22T18:16:55Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend in a set of detail textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate &lt;br /&gt;
* from the first set of textures&lt;br /&gt;
* to the first set of texture with the second set of texture blended into them.&lt;br /&gt;
&lt;br /&gt;
Each of the second textures is blended into the first differently:&lt;br /&gt;
&lt;br /&gt;
{{{!}} Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Texture property&lt;br /&gt;
! blend method&lt;br /&gt;
{{!}}- &lt;br /&gt;
{{!}} Albedo&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Transparency&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Specular&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Roughness&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Metallic&lt;br /&gt;
{{!}} Addition; Remaps the detail metallic to a range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; beforehand&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Ambient Occlusion&lt;br /&gt;
{{!}} Multiplication&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal&lt;br /&gt;
{{!}} Uses [[Texture Blending#Normal blending|normal blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
Detail color__,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
Detail PRM,,&lt;br /&gt;
Detail Smoothness,&lt;br /&gt;
Detail Metallic,&lt;br /&gt;
Detail Ambient Occlusion;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the second set of textures,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Texture_Blending&amp;diff=1086</id>
		<title>Texture Blending</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Texture_Blending&amp;diff=1086"/>
		<updated>2025-08-22T18:10:03Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Texture Blending =&lt;br /&gt;
&lt;br /&gt;
This page documents the different ways two textures can be blended.&lt;br /&gt;
&lt;br /&gt;
== Interpolation ==&lt;br /&gt;
&lt;br /&gt;
Interpolation, specifically &amp;lt;b&amp;gt;linear interpolation&amp;lt;/b&amp;gt; (or &amp;quot;lerping&amp;quot;) uses a &amp;quot;blend factor&amp;quot; parameter to decide which of two textures should be more visible.&lt;br /&gt;
&amp;lt;br/&amp;gt; When &amp;quot;Interpolating from &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&amp;quot; then &lt;br /&gt;
* &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; will be 100% visible when &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; &lt;br /&gt;
* &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; will be 100% visible when &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; &lt;br /&gt;
* &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; will be 50% visible, and &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; will be 50% visible when &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; will be 25% visible, and &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; will be 75% visible when &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
and so fourth.&lt;br /&gt;
&lt;br /&gt;
Textures that provide a blend factor are usually referred to as &amp;quot;masks&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:LinearInterpolationExample.png|frame|center|alt=An example of how linear interpolation is used to blend two textures together|thumb|An example of how linear interpolation is used to blend two textures together]]&lt;br /&gt;
&lt;br /&gt;
As you can see, this behavior is basically like using the mask texture as the second images alpha channel, and then overlaying them.&lt;br /&gt;
&lt;br /&gt;
=== Smoothstep ===&lt;br /&gt;
&lt;br /&gt;
Usually &amp;quot;interpolating&amp;quot; refers to &amp;quot;linearly interpolating&amp;quot;, but there are non-linear ways to interpolate between two textures too.&lt;br /&gt;
&lt;br /&gt;
The most common non-linear way to interpolate is by using &amp;quot;smooth Hermite interpolation&amp;quot; (often referred to as just &amp;quot;smoothstep&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 90%; margin: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width: 30%&amp;quot;|[[File:SmoothstepGraph.png|256px|center|A graph with a linear and a smoothstep curve]]&lt;br /&gt;
|style=&amp;quot;width: 30%&amp;quot;|[[File:SmoothstepGradientComparison.png|256px|center]]&lt;br /&gt;
|style=&amp;quot;width: 30%&amp;quot;|[[File:SmoothstepGradientComparison Spherical.png|256px|center]]&lt;br /&gt;
|-&lt;br /&gt;
|A graph with a linear and a smoothstep curve&lt;br /&gt;
|A linear gradient and the same gradient used as the blend factor when interpolating from black to white using smoothstep&lt;br /&gt;
|A spherical gradient and the same gradient used as the blend factor when interpolating from black to white using smoothstep&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Directional blending ===&lt;br /&gt;
Directional blending involves using the [[Normal_mapping#What_are_normals?|normal directions]] of a model and a &amp;quot;target direction&amp;quot; to then calculate the angle between those two directions and using that as the blending factor for interpolate between two textures.&lt;br /&gt;
&lt;br /&gt;
* When the target direction points in the same direction as the models normal direction, then the blending factor is 1&lt;br /&gt;
* The closer the models normal direction rotates away from the target direction, the closer the blending factor gets to 0&lt;br /&gt;
* At a 90° difference, the blending factor reaches 0&lt;br /&gt;
* Below 90°, the blending factor turns negative (reaching -1 at 180°), but this value gets rounded up to 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:DirectionalBlending.png|center|frame|Directional blending in action]]&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
The blend factor can also be altered by various variables that game-shaders usually make use of:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: auto&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;Bias&amp;lt;/b&amp;gt;&lt;br /&gt;
|Used to shift the blend factor closer to either end, where &lt;br /&gt;
* 0.5 does not change the factor at all&lt;br /&gt;
* 1 shifts it completely to 1&lt;br /&gt;
* 0 shifts it completely to 0&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;Blend limit&amp;lt;/b&amp;gt;&lt;br /&gt;
| Limits the blend factor to a value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;Blend intensity&amp;lt;/b&amp;gt;&lt;br /&gt;
| Changes how quickly the blend factor reaches a value of 1; &amp;lt;br/&amp;gt;Works similar to the bias, where 0.5 is the unchanging &amp;quot;center&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;Blend offset&amp;lt;/b&amp;gt;&lt;br /&gt;
| A value added after all other parameters that moves the &amp;quot;starting point&amp;quot; of the factor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{notice&lt;br /&gt;
|type=warn&lt;br /&gt;
|content=This variable-model has been based off how Shadow Generations directional blend shaders work&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Directional blending examples using &amp;lt;code&amp;gt;m03_rockcliff01_sy1.material&amp;lt;/code&amp;gt; from Shadow Generations&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|[[File:DirectionalBlendingExamples.png|frame|center]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;33%&amp;quot;|The two diffuse textures being blended with the default directional blend factor&lt;br /&gt;
|width=&amp;quot;33%&amp;quot;|Using an intensity of 0.9 to change the blend factor&lt;br /&gt;
|width=&amp;quot;33%&amp;quot;|Using a normal map to change the normal directions and make the directional blend factor more varying&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Distance blending ===&lt;br /&gt;
By using the distance between the camera and the surface to render as the blend factor, you can blend between textures depending on how far away the camera is.&lt;br /&gt;
&lt;br /&gt;
Usually when doing this, a range is specified before which the blend factor is 0 and after which it is 1, e.g. starting to blend a texture in when 100 units away and making it fully visible at 50 units.&lt;br /&gt;
&lt;br /&gt;
== Normal map blending ==&lt;br /&gt;
This is used to combine two normal maps:&lt;br /&gt;
&lt;br /&gt;
[[File:NormalMapBlending.png|center|frame|Two normals maps being blended together]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; width=&amp;quot;778px&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! The math behind&lt;br /&gt;
|-&lt;br /&gt;
| Normal maps are combined like this using a simple function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;hlsl&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
float3 BlendNormals(float3 a, float3 b)&lt;br /&gt;
{&lt;br /&gt;
    a += float3(0, 0, 1);&lt;br /&gt;
    b *= float3(-1, -1, 1);&lt;br /&gt;
&lt;br /&gt;
    return a * dot(a, b) / a.z - b;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Detail blending ==&lt;br /&gt;
Detail textures are used to add extra detail to a color texture, usually used with with [[#Distance Blending|distance blending]].&lt;br /&gt;
&lt;br /&gt;
A detail textures default color is a perfect gray (RGB values of 0.5, or #808080), at which the color texture is applied to will not change. Colors darker than this gray will darken the main texture, and lighter ones will brighten it.&lt;br /&gt;
&lt;br /&gt;
[[File:DetailBlendExample.png|frame|center|&amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;w13_dtd_floor02_dfsp_y_mm1_abd&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;w13_dtd_floor02_dfsp_y_mm1_detail_abd&amp;lt;/code&amp;gt; from Shadow Generations being combined using detail blending]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; width=&amp;quot;778px&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! The math behind&lt;br /&gt;
|-&lt;br /&gt;
| A detail texture is blended into a main texture using this function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;hlsl&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
float3 BlendDetail(float3 main, float3 detail)&lt;br /&gt;
{&lt;br /&gt;
	float3 positive = detail * main * 2;&lt;br /&gt;
	float3 negative = 1 - (1 - detail) * ((1 - main) * 2);&lt;br /&gt;
	bool3 check = main &amp;lt; 0.5;&lt;br /&gt;
	&lt;br /&gt;
	return check ? positive : negative;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1085</id>
		<title>Shadow Generations Shaders - Detail dpndpn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpndpn&amp;diff=1085"/>
		<updated>2025-08-22T18:09:25Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpndpn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to blend in a set of detail textures.&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpnn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate &lt;br /&gt;
* from the first set of textures&lt;br /&gt;
* to the first set of texture with the second set of texture blended into them.&lt;br /&gt;
&lt;br /&gt;
Each of the second textures is blended into the first differently:&lt;br /&gt;
&lt;br /&gt;
{{{!}} Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}}+&lt;br /&gt;
! Texture property&lt;br /&gt;
! blend method&lt;br /&gt;
{{!}}- &lt;br /&gt;
{{!}} Albedo&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Transparency&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Specular&lt;br /&gt;
{{!}} Not blended&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Roughness&lt;br /&gt;
{{!}} Uses [[Texture Blending#Detail blending|detail blending]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Metallic&lt;br /&gt;
{{!}} Addition; Remaps the detail metallic to a range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; beforehand&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Ambient Occlusion&lt;br /&gt;
{{!}} Multiplication&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} Normal&lt;br /&gt;
{{!}} Uses [[Texture Blending#Normal blending|normal blending]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
Detail albedo,&lt;br /&gt;
Detail color__,;&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
specular,1,2,&lt;br /&gt;
Detail PRM,,&lt;br /&gt;
Detail Smoothness,&lt;br /&gt;
Detail Metallic,&lt;br /&gt;
Detail Ambient Occlusion;&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
Detail [[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the second set of textures,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpnn&amp;diff=1084</id>
		<title>Shadow Generations Shaders - Detail dpnn</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Shadow_Generations_Shaders_-_Detail_dpnn&amp;diff=1084"/>
		<updated>2025-08-22T17:22:08Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: Added gallery and RFL variable names&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Shader Documentation&lt;br /&gt;
| game = Shadow Generations&lt;br /&gt;
| shader name = Detail_dpnn&lt;br /&gt;
| sbo = model=2, no_noise, no_transparent_layer&lt;br /&gt;
&lt;br /&gt;
| overview = &lt;br /&gt;
An advanced [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader that uses [[Texture Blending#Distance blending|distance blending]] to [[Texture Blending#Normal map blending|blend]] in a detail [[Hedgehog Engine 2 - Textures#Normal map|normal map]].&lt;br /&gt;
&lt;br /&gt;
| related shaders = &lt;br /&gt;
Blend_dpndpn,&lt;br /&gt;
Blend_dpnbdpn,&lt;br /&gt;
BlendDetail_dndnd,&lt;br /&gt;
BlendDetail_dpndpnn,&lt;br /&gt;
Detail_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpn,&lt;br /&gt;
DirectionBlend_dpndpnn,&lt;br /&gt;
DirectionBlend_dpnndpn,&lt;br /&gt;
DistanceBlend_dpn&lt;br /&gt;
&lt;br /&gt;
| behavior = &lt;br /&gt;
Uses [[Texture Blending#Distance blending|distance blending]] to interpolate&lt;br /&gt;
* from the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture&lt;br /&gt;
* to the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; textures [[Texture Blending#Normal map blending|blended]] together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shader uses &amp;lt;code&amp;gt;detailDistance&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;detailFadeRange&amp;lt;/code&amp;gt; from the stage RFL to determine the detail range.&lt;br /&gt;
&lt;br /&gt;
| vertex colors =&lt;br /&gt;
* Color is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture color&lt;br /&gt;
* Alpha is multiplied into the &amp;lt;code&amp;gt;diffuse&amp;lt;/code&amp;gt; texture alpha&lt;br /&gt;
&lt;br /&gt;
| textures =&lt;br /&gt;
diffuse,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],&lt;br /&gt;
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,&lt;br /&gt;
[[Opacity|Opacity]];&lt;br /&gt;
&lt;br /&gt;
specular,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#PRM|PRM]],&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; &amp;lt;br/&amp;gt;Gets multiplied by 0.25,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,&lt;br /&gt;
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];&lt;br /&gt;
&lt;br /&gt;
normal,0,0,&lt;br /&gt;
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]]_,,;&lt;br /&gt;
&lt;br /&gt;
normal,1,2,&lt;br /&gt;
Detail [[Hedgehog Engine 2 - Textures#Normal map|Normal map]],&lt;br /&gt;
[[Normal_mapping|Normal map direction]] that is [[Texture Blending#Normal map blending|blended]] into the &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt; texture based on camera distance_,,;&lt;br /&gt;
&lt;br /&gt;
| parameters =&lt;br /&gt;
&lt;br /&gt;
DetailFactor,&lt;br /&gt;
UV scale for the &amp;lt;code&amp;gt;normal[1]&amp;lt;/code&amp;gt; texture,,,;&lt;br /&gt;
&lt;br /&gt;
| features =&lt;br /&gt;
is_compute_instancing,&lt;br /&gt;
is_use_tex_srt_anim,&lt;br /&gt;
enable_alpha_threshold,&lt;br /&gt;
is_use_gi_prt,&lt;br /&gt;
is_use_gi_sg,&lt;br /&gt;
is_use_gi,&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;4&amp;quot; widths=&amp;quot;400px&amp;quot; heights=&amp;quot;300px&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:ShadowGenerations Detail dpnn example.jpg|How &amp;lt;code&amp;gt;Detail_dpnn&amp;lt;/code&amp;gt; is used for cliffs in Rail Canyon to blend in detail normals when the camera is closer to the surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=File:ShadowGenerations_Detail_dpnn_example.jpg&amp;diff=1083</id>
		<title>File:ShadowGenerations Detail dpnn example.jpg</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=File:ShadowGenerations_Detail_dpnn_example.jpg&amp;diff=1083"/>
		<updated>2025-08-22T17:20:00Z</updated>

		<summary type="html">&lt;p&gt;Justin113D: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example for how the Detail_dpnn shader is used in Shadow Generations&lt;/div&gt;</summary>
		<author><name>Justin113D</name></author>
	</entry>
</feed>