add : unabomber scene
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef PORTAL_MEADOW_REGION_INCLUDED
|
||||
#define PORTAL_MEADOW_REGION_INCLUDED
|
||||
// Uniforms are supplied by each shader's UnityPerMaterial buffer.
|
||||
float MeadowRegionFade(float3 originalWS)
|
||||
{
|
||||
if (_MeadowRegion.w <= 0) return 1;
|
||||
float3 local = mul(_MeadowWorldToLocal, float4(originalWS, 1)).xyz;
|
||||
float distanceToEdge = _MeadowRegion.w - length(local.xz - _MeadowRegion.xz);
|
||||
clip(distanceToEdge);
|
||||
return saturate(distanceToEdge / max(_MeadowEdgeFade, 0.001));
|
||||
}
|
||||
float ClipMeadowRegion(float3 originalWS, float2 pixel)
|
||||
{
|
||||
float fade = MeadowRegionFade(originalWS);
|
||||
float threshold = frac(52.9829189 * frac(dot(floor(pixel), float2(0.06711056, 0.00583715))));
|
||||
clip(fade - threshold);
|
||||
return fade;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user