Use a different CoarseTileCountY with size 32 tiles

This commit is contained in:
FireNX70
2024-06-10 20:15:05 +02:00
parent fbf2809828
commit 7433388beb
3 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,8 @@ bool ComputeRenderer::CompileShader(GLuint& shader, const std::string& source, c
shaderSource += std::to_string(MaxWorkTiles);
shaderSource += "\n#define TileSize ";
shaderSource += std::to_string(TileSize);
shaderSource += "\nconst int CoarseTileCountY = ";
shaderSource += std::to_string(CoarseTileCountY) + ";";
shaderSource += ComputeRendererShaders::Common;
shaderSource += source;
@ -314,6 +316,7 @@ void ComputeRenderer::SetRenderSettings(int scale, bool highResolutionCoordinate
ScreenHeight = 192 * ScaleFactor;
TileSize = std::min(8 << (ScaleFactor / 5), 32);
CoarseTileCountY = TileSize < 32 ? 4 : 6;
CoarseTileW = CoarseTileCountX * TileSize;
CoarseTileH = CoarseTileCountY * TileSize;

View File

@ -165,7 +165,7 @@ private:
int TileSize;
static constexpr int CoarseTileCountX = 8;
static constexpr int CoarseTileCountY = 4;
int CoarseTileCountY;
int CoarseTileW;
int CoarseTileH;

View File

@ -340,7 +340,6 @@ const uint ResultAttrStart = ResultDepthStart+ScreenWidth*ScreenHeight*2;
const char* Common = R"(
const int CoarseTileCountX = 8;
const int CoarseTileCountY = 4;
const int CoarseTileW = (CoarseTileCountX * TileSize);
const int CoarseTileH = (CoarseTileCountY * TileSize);