diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl')
| -rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl index 2e166a4b..c13e2368 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl @@ -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); }
\ No newline at end of file |
