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:
@@ -44,10 +44,9 @@ static const float TEXTURETYPE_RGB_PIXELART = 2;
|
||||
static const float TEXTURETYPE_RGBA = 3;
|
||||
static const float TEXTURETYPE_RGBA_PIXELART = 4;
|
||||
static const float TEXTURETYPE_PALETTE = 5;
|
||||
static const float TEXTURETYPE_PALETTE_PIXELART = 6;
|
||||
static const float TEXTURETYPE_NV12 = 7;
|
||||
static const float TEXTURETYPE_NV21 = 8;
|
||||
static const float TEXTURETYPE_YUV = 9;
|
||||
static const float TEXTURETYPE_NV12 = 6;
|
||||
static const float TEXTURETYPE_NV21 = 7;
|
||||
static const float TEXTURETYPE_YUV = 8;
|
||||
|
||||
static const float INPUTTYPE_UNSPECIFIED = 0;
|
||||
static const float INPUTTYPE_SRGB = 1;
|
||||
@@ -159,10 +158,6 @@ float4 GetInputColor(PSInput input)
|
||||
} else if (texture_type == TEXTURETYPE_PALETTE) {
|
||||
float index = texture0.Sample(sampler0, input.v_uv).r * 255;
|
||||
rgba = texture1.Sample(sampler1, float2((index + 0.5) / 256, 0.5));
|
||||
} else if (texture_type == TEXTURETYPE_PALETTE_PIXELART) {
|
||||
float2 uv = GetPixelArtUV(input);
|
||||
float index = texture0.SampleGrad(sampler0, uv, ddx(input.v_uv), ddy(input.v_uv)).r * 255;
|
||||
rgba = texture1.Sample(sampler1, float2((index + 0.5) / 256, 0.5));
|
||||
} else if (texture_type == TEXTURETYPE_NV12) {
|
||||
float3 yuv;
|
||||
yuv.x = texture0.Sample(sampler0, input.v_uv).r;
|
||||
|
Reference in New Issue
Block a user