temporal aa hotfix

This commit is contained in:
turanszkij
2019-05-17 12:59:36 +01:00
parent 3d7b69e3a7
commit 68789d7c91
5 changed files with 5 additions and 3 deletions
+1 -2
View File
@@ -3748,8 +3748,7 @@ void UpdatePerFrameData(float dt)
temporalAAJitterPrev = temporalAAJitter;
temporalAAJitter.x = jitter * (halton.x * 2 - 1) / (float)GetInternalResolution().x;
temporalAAJitter.y = jitter * (halton.y * 2 - 1) / (float)GetInternalResolution().y;
GetCamera().Projection.m[2][0] = temporalAAJitter.x;
GetCamera().Projection.m[2][1] = temporalAAJitter.y;
GetCamera().jitter = temporalAAJitter;
}
else
{
+2
View File
@@ -933,6 +933,8 @@ namespace wiSceneSystem
void CameraComponent::UpdateCamera()
{
XMStoreFloat4x4(&Projection, XMMatrixPerspectiveFovLH(fov, width / height, zFarP, zNearP)); // reverse zbuffer!
Projection.m[2][0] = jitter.x;
Projection.m[2][1] = jitter.y;
XMVECTOR _Eye = XMLoadFloat3(&Eye);
XMVECTOR _At = XMLoadFloat3(&At);
+1
View File
@@ -730,6 +730,7 @@ namespace wiSceneSystem
XMFLOAT4X4 View, Projection, VP;
Frustum frustum;
XMFLOAT4X4 InvView, InvProjection, InvVP;
XMFLOAT2 jitter;
void CreatePerspective(float newWidth, float newHeight, float newNear, float newFar, float newFOV = XM_PI / 3.0f);
void UpdateCamera();
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates
const int minor = 26;
// minor bug fixes, alterations, refactors, updates
const int revision = 27;
const int revision = 28;
long GetVersion()
Binary file not shown.