Unscale textureSize when resolution scaling is used (#2441)

* Unscale textureSize when resolution scaling is used

* Fix textureSize on compute

* Flag texture size as needing res scale values too
This commit is contained in:
gdkchan 2021-07-09 00:09:07 -03:00 committed by GitHub
parent b02719cf41
commit 59900d7f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 8 deletions

View file

@ -13,4 +13,14 @@
{
return ivec2(vec2(inputVec) * scale);
}
}
int Helper_TextureSizeUnscale(int size, int samplerIndex)
{
float scale = abs(fp_renderScale[1 + samplerIndex]);
if (scale == 1.0)
{
return size;
}
return int(float(size) / scale);
}