Added stencil setup in UTSAPI;
Changed hair shadow length from screen space to world space;
This commit is contained in:
@@ -101,6 +101,20 @@ float SimpleNoise(float2 UV, float Scale)
|
||||
return t;
|
||||
}
|
||||
|
||||
float Dither(float In, float4 positionSS)
|
||||
{
|
||||
float2 uv = positionSS.xy;
|
||||
float DITHER_THRESHOLDS[16] =
|
||||
{
|
||||
1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0,
|
||||
13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0,
|
||||
4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0,
|
||||
16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0
|
||||
};
|
||||
uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4;
|
||||
return In - DITHER_THRESHOLDS[index];
|
||||
}
|
||||
|
||||
#define SampleRampSignalLine(texture, u) (SAMPLE_TEXTURE2D_LOD(texture, s_linear_clamp_sampler, float2(u, 0.5), 0))
|
||||
|
||||
// Exposure
|
||||
|
||||
Reference in New Issue
Block a user