|
|
|
|
|
|
// ------------------------------------------------------------------ |
|
|
|
// Debug pass |
|
|
|
// ------------------------------------------------------------------ |
|
|
|
//TODO |
|
|
|
Pass |
|
|
|
{ |
|
|
|
Name "Debug" |
|
|
|
Tags{ "LightMode" = "DebugViewMaterial" } |
|
|
|
|
|
|
|
Cull[_CullMode] |
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
|
|
|
|
#pragma vertex VertDefault |
|
|
|
#pragma fragment Frag |
|
|
|
|
|
|
|
#define SHADERPASS SHADERPASS_DEBUG_VIEW_MATERIAL |
|
|
|
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Material.hlsl" |
|
|
|
|
|
|
|
|
|
|
|
//Generated code : Begin |
|
|
|
#{LitTemplate|useDataInput:{.*}|needFragInput:{.*}} |
|
|
|
void GetVaryingsDataDebug(uint paramId, FragInput input, inout float3 result, inout bool needLinearToSRGB) |
|
|
|
{ |
|
|
|
result = float3(1,0,1); //TODO |
|
|
|
} |
|
|
|
//Generated code : End |
|
|
|
|
|
|
|
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPassDebugViewMaterial.hlsl" |
|
|
|
|
|
|
|
ENDHLSL |
|
|
|
} |
|
|
|
|
|
|
|
// ------------------------------------------------------------------ |
|
|
|
// Extracts information for lightmapping, GI (emission, albedo, ...) |
|
|
|
|
|
|
// ------------------------------------------------------------------ |
|
|
|
// Depth only |
|
|
|
// ------------------------------------------------------------------ |
|
|
|
//TODO |
|
|
|
Pass |
|
|
|
{ |
|
|
|
Name "ShadowCaster" |
|
|
|
Tags{ "LightMode" = "ShadowCaster" } |
|
|
|
|
|
|
|
Cull[_CullMode] |
|
|
|
|
|
|
|
ZWrite On ZTest LEqual |
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
|
|
|
|
#pragma vertex VertDefault |
|
|
|
#pragma fragment Frag |
|
|
|
|
|
|
|
#define SHADERPASS SHADERPASS_DEPTH_ONLY |
|
|
|
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Material.hlsl" |
|
|
|
|
|
|
|
//Generated code : Begin |
|
|
|
#{LitTemplate|useDataInput:{opacity}|needFragInput:{}} |
|
|
|
//Generated code : End |
|
|
|
|
|
|
|
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPassDepthOnly.hlsl" |
|
|
|
|
|
|
|
ENDHLSL |
|
|
|
} |
|
|
|
|
|
|
|
// ------------------------------------------------------------------ |
|
|
|
// forward pass |
|
|
|
|
|
|
Name "Forward" // Name is not used |
|
|
|
Tags{ "LightMode" = "Forward" } // This will be only for transparent object based on the RenderQueue index |
|
|
|
|
|
|
|
Blend[_SrcBlend][_DstBlend] |
|
|
|
ZWrite[_ZWrite] |
|
|
|
Cull[_CullMode] |
|
|
|
//TODO |
|
|
|
//Blend[_SrcBlend][_DstBlend] |
|
|
|
//ZWrite[_ZWrite] |
|
|
|
//Cull[_CullMode] |
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
|
|
|
|
|
|
|
// TEMP until pragma work in include |
|
|
|
// #include "../../Lighting/Forward.hlsl" |
|
|
|
#pragma multi_compile LIGHTLOOP_SINGLE_PASS |
|
|
|
#pragma multi_compile SHADOWFILTERING_FIXED_SIZE_PCF |
|
|
|
//#pragma multi_compile SHADOWFILTERING_FIXED_SIZE_PCF |
|
|
|
|
|
|
|
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/Lighting.hlsl" |
|
|
|
|
|
|
|