mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-20 06:47:19 -04:00
render/gles2: unify fragment shader
Instead of having 3 different fragment shaders for textures and 1 more for quads, unify them all and compile different variants via a SOURCE constant. In the future, we will have more variant dimensions: pre-multiplied alpha on/off, color transformation, etc. It will become inpractical to have one file per combination. Weston has a similar approach: https://gitlab.freedesktop.org/wayland/weston/-/blob/main/libweston/renderer-gl/fragment.glsl
This commit is contained in:
parent
32d00984e1
commit
25d8151870
8 changed files with 91 additions and 77 deletions
|
|
@ -2,10 +2,7 @@ embed = find_program('./embed.sh', native: true)
|
|||
|
||||
shaders = [
|
||||
'common.vert',
|
||||
'quad.frag',
|
||||
'tex_rgba.frag',
|
||||
'tex_rgbx.frag',
|
||||
'tex_external.frag',
|
||||
'common.frag',
|
||||
]
|
||||
|
||||
foreach name : shaders
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue