Skip to content

Commit

Permalink
Add TOON_SHADER_HOOK_RAMP_BRIGHTNESS
Browse files Browse the repository at this point in the history
  • Loading branch information
Delt06 committed Jul 7, 2022
1 parent b997c92 commit 2099885
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public enum CustomToonShaderHookType
TOON_SHADER_CUSTOM_CBUFFER,
TOON_SHADER_HOOK_FORWARD_PASS_V2F,
TOON_SHADER_HOOK_VERTEX_OUTPUT,
TOON_SHADER_HOOK_RAMP_BRIGHTNESS,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@

// TOON_SHADER_HOOK_VERTEX_INPUT
// TOON_SHADER_HOOK_VERTEX_OUTPUT

// TOON_SHADER_HOOK_FRAGMENT_ALBEDO
// TOON_SHADER_HOOK_RAMP_BRIGHTNESS

#include "Packages/com.deltation.toon-shader/Assets/DELTation/ToonShader/Shaders/ToonShaderInput.hlsl"
#include "Packages/com.deltation.toon-shader/Assets/DELTation/ToonShader/Shaders/ToonShaderForwardPass_AppData.hlsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ inline half get_brightness(const half4 position_cs, const half3 normal_ws, const
brightness = min(brightness, brightness * ao_factor.directAmbientOcclusion);
#endif

#ifdef TOON_SHADER_HOOK_RAMP_BRIGHTNESS
TOON_SHADER_HOOK_RAMP_BRIGHTNESS
#endif

return get_ramp(brightness);
}

Expand Down

0 comments on commit 2099885

Please sign in to comment.