Cleanup renderer code

This commit is contained in:
Wojtek Figat
2021-06-07 11:56:04 +02:00
parent dfee74ad1f
commit cc47cb85e4
17 changed files with 92 additions and 195 deletions

View File

@@ -182,8 +182,8 @@ void MultiScaler::Filter(const FilterMode mode, GPUContext* context, const int32
// Prepare
Data data;
data.TexelSize.X = 1.0f / width;
data.TexelSize.Y = 1.0f / height;
data.TexelSize.X = 1.0f / (float)width;
data.TexelSize.Y = 1.0f / (float)height;
auto cb = _shader->GetShader()->GetCB(0);
context->UpdateCB(cb, &data);
context->BindCB(0, cb);
@@ -219,8 +219,8 @@ void MultiScaler::DownscaleDepth(GPUContext* context, int32 dstWidth, int32 dstH
// Prepare
Data data;
data.TexelSize.X = 2.0f / dstWidth;
data.TexelSize.Y = 2.0f / dstHeight;
data.TexelSize.X = 2.0f / (float)dstWidth;
data.TexelSize.Y = 2.0f / (float)dstHeight;
auto cb = _shader->GetShader()->GetCB(0);
context->UpdateCB(cb, &data);
context->BindCB(0, cb);