Jump to content

Shadow Generations Shaders - Common dpnm: Difference between revisions

From HedgeDocs
Justin113D (talk | contribs)
Fixed UV channel usage for the normal texture
Justin113D (talk | contribs)
Used new gallery parameter
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Shadow Generations Shaders - Common_dpnm}}
{{Shader Documentation
[[Shadow Generations Shaders|Return to shaders list]]
| game = Shadow Generations
| shader name = Common_dpnm
| sbo = model=2, no_noise


A standard PBR shader, with an additional color mask texture. The color mask is used to overlay the diffuse parameter color over the diffuse texture color (after vertex colors were applied!).
| overview =
This is useful if you want to animate specific regions of a material.
A standard [[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)|PBR]] shader with an additional mask texture to apply a color decal.


=== Related shaders ===
| related shaders =  
* [[Shadow Generations Shaders - Common_dpn|Common_dpn]]
Common_dpn


== Behavior ==
| behavior =
The <code>diffuse [1]</code> texture is a mask that controls the visibility of the <code>diffuse</code> parameter color, which gets multiplied with the <code>diffuse</code> texture color.
<br/>This is useful if you want to animate specific regions of a material with a single color.


* Supports [[Hedgehog Engine 2 - Deferred Rendering|deferred rendering]]
| vertex colors =
* Supports compute instancing
* Color is multiplied into the <code>diffuse</code> texture color
* Supports [[Mesh Layers#Transparent|transparency blending]]
* Alpha is multiplied into the <code>diffuse</code> texture alpha
* Supports [[Mesh Layers#Punch-through|transparency clipping]]
* Uses the [[Hedgehog Engine 2 - Physically Based Rendering (PBR)|PBR lighting model]]
* Uses [[Hedgehog Engine 2 - Weather|weather effects]]
* Uses the default shading model
* Vertex colors, including alpha, get combined with the diffuse texture via multiplication. (Only if they are not already used for vertex animation textures)


== Textures ==
| textures =
diffuse,0,0,
[[Hedgehog Engine 2 - Textures#Albedo|Albedo]],
[[Hedgehog_Engine_2_-_Physically_Based_Rendering_(PBR)#Albedo|Albedo]] color__,
[[Opacity|Opacity]];


{| class="wikitable" width="100%"
diffuse,1,0,
|+
Mask,
! width=10% |Name
Controls the visibility of the <code>diffuse</code> parameter color,,,;
! width=1% |Index
!Info
|-
|<code>diffuse</code>
|0
|A standard [[Hedgehog Engine 2 - Textures#Albedo|albedo]] texture.


Uses alpha channel for transparency.
specular,0,0,
[[Hedgehog Engine 2 - Textures#PRM|PRM]],
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Specular|Specular]] factor\; <br/>Gets multiplied by 0.25,
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Smoothness|Smoothness]] factor,
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Metallic|Metallic]] factor,
[[Hedgehog Engine 2 - Physically Based Rendering (PBR)#Ambient Occlusion|Ambient Occlusion]];


Uses the 1st UV channel.
normal,0,0,
|-
[[Hedgehog Engine 2 - Textures#Normal map|Normal map]],
|<code>diffuse</code>
[[Normal_mapping|Normal map direction]]_,,;
|1
|A mask texture.


Uses the red channel to interpolate between the diffuse texture output (red=0) and the diffuse color (red=1).
| parameters =
diffuse, (RGB) Color multiplied with the sampled diffuse texture color based on <code>diffuse [1]</code>__,;


Uses the 1st UV channel.
| gallery =
|-
|<code>specular</code>
|0
|A standard [[Hedgehog Engine 2 - Textures#PRM|PRM]] texture.


Uses the 1st UV channel.
File:SXSG Common dpnm example.jpg{{!}}Using <code>Common_dpnm</code> to overlay a red color over a ground texture using the HedgeDocs logo
|-
|<code>normal</code>
|0
|A standard [[Hedgehog Engine 2 - Textures#Normal map|normal map]] texture.


Uses the 1st UV channel.
| features =
|}
is_compute_instancing,
is_use_tex_srt_anim,
enable_deferred_rendering,
enable_alpha_threshold,
is_use_gi_prt,
is_use_gi_sg,
is_use_gi


== Parameters ==
}}
 
{| class="wikitable" width="100%"
|+
! width=10% |Name
! X
! Y
! Z
! W
|-
|<code>diffuse</code>
|colspan="3"| (RGB) Color to be overlaid
| N/A
|}
 
== Technical ==
Uses the default vertex shader.
 
{| class="mw-collapsible mw-collapsed wikitable" width="300px"
|-
!Shader Features
|-
|<code>is_compute_instancing</code>
|-
|<code>is_use_tex_srt_anim</code>
|-
|<code>enable_deferred_rendering</code>
|-
|<code>enable_alpha_threshold</code>
|-
|<code>is_use_gi_prt</code>
|-
|<code>is_use_gi_sg</code>
|-
|<code>is_use_gi</code>
|}
 
== Gallery ==
<gallery perrow="4" widths="400px" heights="300px" mode="nolines">
File:SXSG Common dpnm example.jpg|Using Common_dpnm to overlay a red color over a ground texture using the Hedgedocs logo
</gallery>

Latest revision as of 20:45, 22 August 2025

Return to shaders list

Overview

Shader Behavior Overview
Shader model:

   [2] Standard (PBR)
Does not support:

A standard PBR shader with an additional mask texture to apply a color decal.

Related shaders

Behavior

The diffuse [1] texture is a mask that controls the visibility of the diffuse parameter color, which gets multiplied with the diffuse texture color.
This is useful if you want to animate specific regions of a material with a single color.

Vertex Colors

  • Color is multiplied into the diffuse texture color
  • Alpha is multiplied into the diffuse texture alpha

Material Inputs

Textures

Name

Index

UV Index

Kind

Red

Green

Blue

Alpha

diffuse 0 0 Albedo Albedo color Opacity
diffuse 1 0 Mask Controls the visibility of the diffuse parameter color N/A N/A N/A
specular 0 0 PRM Specular factor;
Gets multiplied by 0.25
Smoothness factor Metallic factor Ambient Occlusion
normal 0 0 Normal map Normal map direction N/A N/A

Parameters

Name

X

Y

Z

W

diffuse (RGB) Color multiplied with the sampled diffuse texture color based on diffuse [1] N/A

Gallery

Technical

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