Fix wireframe depth gradient on Vulkan
This commit is contained in:
BIN
Binary file not shown.
@@ -149,6 +149,9 @@ float4 PS_Wireframe(float4 SvPosition : SV_Position) : SV_Target0
|
||||
{
|
||||
// Depth-based gradient
|
||||
float alpha = saturate(SvPosition.w * UNITS_TO_METERS_SCALE * 0.1f);
|
||||
#if VULKAN
|
||||
alpha = 1 - alpha;
|
||||
#endif
|
||||
return lerp(ColorNear, ColorFar, alpha);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user