mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
Scale TileSize with internal resolution
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#include "GPU3D_Compute.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "OpenGLSupport.h"
|
||||
|
||||
@ -50,6 +51,8 @@ bool ComputeRenderer::CompileShader(GLuint& shader, const std::string& source, c
|
||||
shaderSource += std::to_string(ScreenHeight);
|
||||
shaderSource += "\n#define MaxWorkTiles ";
|
||||
shaderSource += std::to_string(MaxWorkTiles);
|
||||
shaderSource += "\n#define TileSize ";
|
||||
shaderSource += std::to_string(TileSize);
|
||||
|
||||
shaderSource += ComputeRendererShaders::Common;
|
||||
shaderSource += source;
|
||||
@ -310,6 +313,10 @@ void ComputeRenderer::SetRenderSettings(int scale, bool highResolutionCoordinate
|
||||
ScreenWidth = 256 * ScaleFactor;
|
||||
ScreenHeight = 192 * ScaleFactor;
|
||||
|
||||
TileSize = std::min(8 * (1 << (ScaleFactor / 5)), 32);
|
||||
CoarseTileW = CoarseTileCountX * TileSize;
|
||||
CoarseTileH = CoarseTileCountY * TileSize;
|
||||
|
||||
TilesPerLine = ScreenWidth/TileSize;
|
||||
TileLines = ScreenHeight/TileSize;
|
||||
|
||||
|
Reference in New Issue
Block a user