mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-26 06:46:56 -04:00
color management
This commit is contained in:
parent
842df2bd6c
commit
10bf68b928
13 changed files with 401 additions and 59 deletions
|
|
@ -33,6 +33,7 @@ struct wlr_gles2_pixel_format {
|
|||
};
|
||||
|
||||
struct wlr_gles2_tex_shader {
|
||||
// attribute locations
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint invert_y;
|
||||
|
|
@ -40,6 +41,11 @@ struct wlr_gles2_tex_shader {
|
|||
GLint alpha;
|
||||
GLint pos_attrib;
|
||||
GLint tex_attrib;
|
||||
GLuint color_table;
|
||||
GLint color_enable;
|
||||
|
||||
// source components
|
||||
const GLchar *head, *util, *main;
|
||||
};
|
||||
|
||||
struct wlr_gles2_renderer {
|
||||
|
|
@ -110,4 +116,20 @@ void pop_gles2_marker(void);
|
|||
#define PUSH_GLES2_DEBUG push_gles2_marker(_WLR_FILENAME, __func__)
|
||||
#define POP_GLES2_DEBUG pop_gles2_marker()
|
||||
|
||||
// color engine
|
||||
|
||||
void color_engine_setup(void);
|
||||
GLuint color_build_lut(struct wlr_color_config *input, struct wlr_color_config *output);
|
||||
void color_convert(struct wlr_color_config *ic, struct wlr_color_config *oc, const float input[static 4], float output[static 4]);
|
||||
|
||||
#define COLOR_LUT_SIZE 64
|
||||
|
||||
/**
|
||||
* Ignore half a texel near every edge because those
|
||||
* areas are not interpolated. See GPU Gems 2, Ch. 24 for details.
|
||||
*
|
||||
* offset = (0.5 / COLOR_LUT_SIZE)
|
||||
*/
|
||||
#define COLOR_OFFSET "0.007813"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue