1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:17:45 +00:00

LibSoftGPU: Make output in PixelQuad generic

Same as with inputs, we define outputs as a generic array of floats.
This can later be expanded to accomodate multiple render targets or
vertex attributes in the case of a vertex shader.
This commit is contained in:
Stephan Unverwerth 2022-09-17 17:16:31 +02:00 committed by Andrew Kaster
parent c008b6ce18
commit bb28492af0
3 changed files with 40 additions and 10 deletions

View file

@ -32,6 +32,13 @@ 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;
static constexpr int NUM_SHADER_OUTPUTS = 4;
// Verify that we have enough outputs to hold the fragment's color
static_assert(NUM_SHADER_OUTPUTS >= 4);
static constexpr int SHADER_OUTPUT_FIRST_COLOR = 0;
// 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;