|
|
@@ -26,18 +26,6 @@ float4 Sample(sampler2D map, float2 texCoord)
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
-float2 EncodeDepth(float depth)
|
|
|
-{
|
|
|
- depth *= 255.0;
|
|
|
- return float2(floor(depth) / 255.0, frac(depth));
|
|
|
-}
|
|
|
-
|
|
|
-float DecodeDepth(float2 depth)
|
|
|
-{
|
|
|
- const float2 dotValues = float2(1.0, 1.0 / 255.0);
|
|
|
- return dot(depth, dotValues);
|
|
|
-}
|
|
|
-
|
|
|
float3 DecodeNormal(float4 normalInput)
|
|
|
{
|
|
|
float3 normal;
|