mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-07 10:26:27 +00:00
Removed TEXTURETYPE_PALETTE_PIXELART
This doesn't make any sense since the pixel art algorithm uses a box filter to get an average pixel value which isn't possible with indexed textures.
This commit is contained in:
@@ -71,10 +71,9 @@ static const float TONEMAP_CHROME = 2;
|
||||
static const float TEXTURETYPE_RGB = 1;
|
||||
static const float TEXTURETYPE_RGB_PIXELART = 2;
|
||||
static const float TEXTURETYPE_PALETTE = 3;
|
||||
static const float TEXTURETYPE_PALETTE_PIXELART = 4;
|
||||
static const float TEXTURETYPE_NV12 = 5;
|
||||
static const float TEXTURETYPE_NV21 = 6;
|
||||
static const float TEXTURETYPE_YUV = 7;
|
||||
static const float TEXTURETYPE_NV12 = 4;
|
||||
static const float TEXTURETYPE_NV21 = 5;
|
||||
static const float TEXTURETYPE_YUV = 6;
|
||||
|
||||
static const float INPUTTYPE_UNSPECIFIED = 0;
|
||||
static const float INPUTTYPE_SRGB = 1;
|
||||
@@ -2600,15 +2599,7 @@ static void D3D12_SetupShaderConstants(SDL_Renderer *renderer, const SDL_RenderC
|
||||
|
||||
switch (texture->format) {
|
||||
case SDL_PIXELFORMAT_INDEX8:
|
||||
if (cmd->data.draw.texture_scale_mode == SDL_SCALEMODE_PIXELART) {
|
||||
constants->texture_type = TEXTURETYPE_PALETTE_PIXELART;
|
||||
constants->texture_width = texture->w;
|
||||
constants->texture_height = texture->h;
|
||||
constants->texel_width = 1.0f / constants->texture_width;
|
||||
constants->texel_height = 1.0f / constants->texture_height;
|
||||
} else {
|
||||
constants->texture_type = TEXTURETYPE_PALETTE;
|
||||
}
|
||||
constants->texture_type = TEXTURETYPE_PALETTE;
|
||||
constants->input_type = INPUTTYPE_UNSPECIFIED;
|
||||
break;
|
||||
case SDL_PIXELFORMAT_YV12:
|
||||
|
Reference in New Issue
Block a user