Skip to content

Commit 9398c1d

Browse files
Added missing functions that caused shader graphs with types Eye, Fabric, Hair and StackLit to not compile when a debug mode is enabled. (#57)
1 parent 7f761a5 commit 9398c1d

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ void GetPBRValidatorDebug(SurfaceData surfaceData, inout float3 result)
246246
result = surfaceData.baseColor;
247247
}
248248

249+
float4 GetHeightMapDebug(SurfaceData surfaceData)
250+
{
251+
return float4(surfaceData.baseColor, 1);
252+
}
253+
249254
//-----------------------------------------------------------------------------
250255
// PreLightData
251256
//

com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/Fabric.hlsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ void GetPBRValidatorDebug(SurfaceData surfaceData, inout float3 result)
250250
result = surfaceData.baseColor;
251251
}
252252

253+
float4 GetHeightMapDebug(SurfaceData surfaceData)
254+
{
255+
return float4(surfaceData.baseColor, 1);
256+
}
257+
253258
//-----------------------------------------------------------------------------
254259
// PreLightData
255260
//

com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.hlsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ void GetPBRValidatorDebug(SurfaceData surfaceData, inout float3 result)
232232
result = surfaceData.diffuseColor;
233233
}
234234

235+
float4 GetHeightMapDebug(SurfaceData surfaceData)
236+
{
237+
return float4(surfaceData.diffuseColor, 1);
238+
}
239+
235240
//-----------------------------------------------------------------------------
236241
// PreLightData
237242
//

com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,10 @@ void GetPBRValidatorDebug(SurfaceData surfaceData, inout float3 result)
943943
result = surfaceData.baseColor;
944944
}
945945

946+
float4 GetHeightMapDebug(SurfaceData surfaceData)
947+
{
948+
return float4(surfaceData.baseColor, 1);
949+
}
946950

947951
//-----------------------------------------------------------------------------
948952
// PreLightData

0 commit comments

Comments
 (0)