Upload project file

This commit is contained in:
Misaki
2024-08-15 17:00:11 +09:00
parent 684c51a8c0
commit e441bb7911
162 changed files with 63084 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
float StepAntiAliasing(float x, float y)
{
float v = x - y;
return saturate(v / (fwidth(v)+HALF_MIN));//fwidth(x) = abs(ddx(x) + ddy(x))
}
float Remap(float In, float2 InMinMax, float2 OutMinMax)
{
return OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
}
float3 ToonMaping(float3 x)
{
x = x * (2.51 * x + 0.03) / (x * (2.43 * x + 0.59) + 0.14);
return x;
}
float3 GetSmoothedWorldNormal(float2 uv, float3x3 t_tbn)
{
float3 normal = float3(uv, 0);
normal.z = sqrt(1.0 - saturate(dot(normal.xy, normal.xy)));
return mul(normal, t_tbn);
}