mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add AMD FSR2 CI build job and adjust jitter offset sign
This commit is contained in:
parent
a12126cc7e
commit
96f7728227
2 changed files with 107 additions and 2 deletions
|
|
@ -4323,9 +4323,11 @@ void Renderer::dispatchAmdFsr2() {
|
|||
L"FSR2_Output", FFX_RESOURCE_STATE_UNORDERED_ACCESS);
|
||||
|
||||
// Camera jitter is stored as NDC projection offsets; convert to render-pixel offsets.
|
||||
// AMD jitter convention is opposite our projection offset sign in Vulkan space.
|
||||
const float jitterSign = static_cast<float>(envIntOrDefault("WOWEE_FSR2_JITTER_SIGN", -1));
|
||||
glm::vec2 jitterNdc = camera->getJitter();
|
||||
desc.jitterOffset.x = jitterNdc.x * 0.5f * static_cast<float>(fsr2_.internalWidth);
|
||||
desc.jitterOffset.y = jitterNdc.y * 0.5f * static_cast<float>(fsr2_.internalHeight);
|
||||
desc.jitterOffset.x = jitterSign * jitterNdc.x * 0.5f * static_cast<float>(fsr2_.internalWidth);
|
||||
desc.jitterOffset.y = jitterSign * jitterNdc.y * 0.5f * static_cast<float>(fsr2_.internalHeight);
|
||||
desc.motionVectorScale.x = static_cast<float>(fsr2_.internalWidth);
|
||||
desc.motionVectorScale.y = static_cast<float>(fsr2_.internalHeight);
|
||||
desc.renderSize.width = fsr2_.internalWidth;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue