Postprocessing/FX: Fix incorrect pixel size uniforms

This commit is contained in:
Stenzek 2024-06-14 00:38:08 +10:00
parent 277147199e
commit d51b880052
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -1683,7 +1683,7 @@ bool PostProcessing::ReShadeFXShader::Apply(GPUTexture* input, GPUTexture* final
case SourceOptionType::InternalNormPixelSize: case SourceOptionType::InternalNormPixelSize:
{ {
const float value[2] = { const float value[2] = {
(static_cast<float>(final_width) / static_cast<float>(orig_width)) / static_cast<float>(target_height), (static_cast<float>(final_width) / static_cast<float>(orig_width)) / static_cast<float>(target_width),
(static_cast<float>(final_height) / static_cast<float>(orig_height)) / static_cast<float>(target_height)}; (static_cast<float>(final_height) / static_cast<float>(orig_height)) / static_cast<float>(target_height)};
std::memcpy(dst, value, sizeof(value)); std::memcpy(dst, value, sizeof(value));
} }
@ -1700,7 +1700,7 @@ bool PostProcessing::ReShadeFXShader::Apply(GPUTexture* input, GPUTexture* final
case SourceOptionType::NativeNormPixelSize: case SourceOptionType::NativeNormPixelSize:
{ {
const float value[2] = { const float value[2] = {
(static_cast<float>(final_width) / static_cast<float>(native_width)) / static_cast<float>(target_height), (static_cast<float>(final_width) / static_cast<float>(native_width)) / static_cast<float>(target_width),
(static_cast<float>(final_height) / static_cast<float>(native_height)) / static_cast<float>(target_height)}; (static_cast<float>(final_height) / static_cast<float>(native_height)) / static_cast<float>(target_height)};
std::memcpy(dst, value, sizeof(value)); std::memcpy(dst, value, sizeof(value));
} }