mes comandos per a Console

This commit is contained in:
2026-03-28 14:14:33 +01:00
parent 854a5f04b2
commit 71c7b8e553
6 changed files with 47 additions and 3 deletions

View File

@@ -924,6 +924,11 @@ namespace Rendering {
downscale_algo_ = std::max(0, std::min(algo, 2));
}
auto SDL3GPUShader::getSsTextureSize() const -> std::pair<int, int> {
if (ss_factor_ <= 1) { return {0, 0}; }
return {game_width_ * ss_factor_, game_height_ * ss_factor_};
}
// ---------------------------------------------------------------------------
// reinitTexturesAndBuffer — recrea scene_texture_, scaled_texture_ y
// upload_buffer_ con el factor oversample_ actual. No toca pipelines ni samplers.

View File

@@ -82,6 +82,9 @@ namespace Rendering {
// Selecciona algoritmo de downscale: 0=bilinear legacy, 1=Lanczos2, 2=Lanczos3
void setDownscaleAlgo(int algo) override;
// Devuelve las dimensiones de la textura de supersampling (0,0 si SS desactivado)
[[nodiscard]] auto getSsTextureSize() const -> std::pair<int, int> override;
private:
static auto createShaderMSL(SDL_GPUDevice* device,
const char* msl_source,