Christian Hergert
a3fd46c516
glsl: tweak pre-processor to support Apple GLSL compiler
...
The Apple GLSL compiler cannot deal with empty pre-processor blocks such as
#if GSK_GLES
#elif GSK_LEGACY
2020-10-29 10:57:02 -07:00
Alexander Larsson
bacb3affb3
gl: Add some namespacing to the preamble symbols
...
This adds a gsk prefix to the stuff in the preamble, as we want to
avoid it conflicting with things in the main shader. Especially once
we start allow some customization of shaders.
2020-09-29 09:51:16 +02:00
Timm Bäder
52ae384bfd
gl shaders: unify frag coord handling
2020-05-10 09:30:15 +02:00
Timm Bäder
962e38c5c9
gl renderer: Shorten shaders a bit
2020-01-24 06:08:39 +01:00
Timm Bäder
685288216f
gl renderer: Move rect transformation to the vertex shader
...
No need to do this for every fragment.
2020-01-24 06:08:39 +01:00
Timm Bäder
c8fa1f19db
gl renderer: Transform rounded rect on the GPU
...
Change the RoundedRect struct we use in our shaders so we can transform
it using (affine) matrices.
2020-01-24 06:08:39 +01:00
Timm Bäder
c79c18f39c
gl renderer: Shuffle things around a bit
2020-01-07 17:27:16 +01:00
Timm Bäder
fdce30d3f8
gl renderer: Add some in/out compat glue to the shaders
...
so we can use _IN_ and _OUT_ and get the right things for
desktop/es/legacy GL.
2020-01-07 17:27:16 +01:00
Timm Bäder
1243174e53
gl renderer: Make RoundedRect work in gles
...
Which can't return struct types containing arrays. So let's revert to
the previous version but still send the rect along as a vec4[3];
2020-01-07 17:27:15 +01:00
Timm Bäder
cc909b160f
gl renderer: Rewrite shader builder
...
Use a unified approach to write both vertex and fragment shader in the
same file.
2020-01-07 17:27:15 +01:00