Jump to content

Shadow Generations Shaders - DistanceBlend_dpn

From HedgeDocs

Return to shaders list

Overview

Shader Behavior Overview
Shader model:

   [2] Standard (PBR)
Does not support:

An advanced PBR shader that uses distance blending to blend between 3 sets of textures.

Related shaders

Behavior

This shader uses distance blending to blend between 3 sets of PBR textures:

  • diffuse, diffuse[1] and diffuse[2]
  • normal, normal[1] and normal[2]
  • The specular texture counts as 3 different textures, each color channel containing the smoothness for a different set.

The specular factor is the same for every set, and the ambient occlusion from the specular texture only gets used for the first set, while the second and third sets don't receive any ambient occlusion.

The shaders DistanceBlend parameter determines at which distance to blend to each texture set:

  • X and Y are used to blend to the second set of textures
  • Z and W are used to blend to the third set of textures

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't be visible at all.

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 First albedo color First opacity
diffuse 1 Any Albedo Second albedo color Second opacity
diffuse 2 Any Albedo Third albedo color Third opacity
specular 0 0 N/A First smoothness factor Second smoothness factor Third smoothness factor Ambient Occlusion
normal 0 2 Normal map First normal map direction N/A N/A
normal 1 Any Normal map Second normal map direction N/A N/A
normal 2 Any Normal map Third normal map direction N/A N/A

Parameters

Name

X

Y

Z

W

DistanceBlend First distance center First fade range Second distance center Second fade range
DetailFactor UV scale for the
  • diffuse[1] texture
  • normal[1] texture
  • specular texture
    (only for sampling the second smoothness factor)
UV scale for the
  • diffuse[2] texture
  • normal[2] texture
  • specular texture
    (only for sampling the third smoothness factor)
N/A N/A
PBRFactor Specular factor N/A N/A N/A

Technical

Shader Features
is_use_tex_srt_anim
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.