mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Fixed pixelNormal in ssao_compute.cs.hlsl
This commit is contained in:
parent
c4748f584f
commit
01c2db8bbd
2 changed files with 2 additions and 3 deletions
|
@ -164,7 +164,7 @@ float3 reconstructCSPosition( float2 S, float z )
|
|||
{
|
||||
float4 P;
|
||||
P.z = z;// * 2.0 - 1.0;
|
||||
P.xy = ( S * rpWindowCoord.xy );// * 2.0 - 1.0;
|
||||
P.xy = ( S * rpWindowCoord.xy ) * 2.0 - 1.0;
|
||||
P.w = 1.0;
|
||||
|
||||
float4 csP;
|
||||
|
|
|
@ -209,8 +209,7 @@ void main( uint3 globalId : SV_DispatchThreadID )
|
|||
#endif
|
||||
|
||||
// RB: pixelNormal is already in view space but it has to be negated to look correct which is weird
|
||||
pixelNormal = -normalize( pixelNormal );
|
||||
//pixelNormal = normalize( float3( pixelNormal.x, 1.0 - pixelNormal.y, -pixelNormal.z ) );
|
||||
pixelNormal = -normalize( pixelNormal * 2.0 - 1.0 );
|
||||
//pixelNormal = normalize( mul( float4( pixelNormal, 0 ), g_Ssao.matWorldToView ).xyz );
|
||||
|
||||
float2 pixelClipPos = WindowToClip( pixelPos );
|
||||
|
|
Loading…
Reference in a new issue