Examples_3/Unit_Tests/src/10_ScreenSpaceReflections/Shaders/FSL/SSSR_Common.h
float3 InvProjectPosition(float3 origin, float4x4 mat)
{
    origin.y = (1 - origin.y);
    origin.xy = 2 * origin.xy - 1;
    float4 projected = mul(float4(origin, 1), mat);
    projected.xyz /= projected.w;
    return projected.xyz;
}
// Mat must be able to transform origin from screen space to a linear space.
Mat must be able to transform origin from screen space to a linear space.
Mat must be able to transform origin from screen space to a linear space .
float3 InvProjectPosition(float3 origin, float4x4 mat)
{
    origin.y = (1 - origin.y);
    origin.xy = 2 * origin.xy - 1;
    float4 projected = mul(float4(origin, 1), mat);
    projected.xyz /= projected.w;
    return projected.xyz;
}
float3 InvProjectPosition ( float3 origin , float4x4 mat ) { origin . y = ( 1 - origin . y ) ; origin . xy = 2 * origin . xy - 1 ; float4 projected = mul ( float4 ( origin , 1 ) , mat ) ; projected . xyz /= projected . w ; return projected . xyz ; }
Mat must be able to transform origin from screen space to a linear space.
Mat must be able to transform origin from screen space to a linear space .