mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +00:00
LibSoftGPU: Make input in PixelQuad generic
Previously we would store vertex color and texture coordinates in separate fields in PixelQuad. To make them accessible from shaders we need to store them as a completely generic array of floats.
This commit is contained in:
parent
49139d5f4e
commit
c008b6ce18
3 changed files with 45 additions and 14 deletions
|
@ -24,6 +24,14 @@ static constexpr int MAX_TEXTURE_SIZE = 2048;
|
|||
static constexpr float MAX_TEXTURE_LOD_BIAS = 2.f;
|
||||
static constexpr int SUBPIXEL_BITS = 4;
|
||||
|
||||
static constexpr int NUM_SHADER_INPUTS = 64;
|
||||
|
||||
// Verify that we have enough inputs to hold vertex color and texture coordinates for all fixed function texture units
|
||||
static_assert(NUM_SHADER_INPUTS >= 4 + GPU::NUM_TEXTURE_UNITS * 4);
|
||||
|
||||
static constexpr int SHADER_INPUT_VERTEX_COLOR = 0;
|
||||
static constexpr int SHADER_INPUT_FIRST_TEXCOORD = 4;
|
||||
|
||||
// See: https://www.khronos.org/opengl/wiki/Common_Mistakes#Texture_edge_color_problem
|
||||
// FIXME: make this dynamically configurable through ConfigServer
|
||||
static constexpr bool CLAMP_DEPRECATED_BEHAVIOR = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue