Timm Bäder
f729cbb760
gl renderer: Fix text color pre-multiplication
2018-01-04 12:20:27 +01:00
Timm Bäder
4abbf929ad
gl renderer: Remove some unused uniforms from shader
2017-12-29 05:48:42 +01:00
Timm Bäder
2bc10fa365
gl renderer: draw all outset shadows
...
Instead of falling back to cairo for most of them.
2017-12-29 05:48:40 +01:00
Timm Bäder
7a2d30323e
gl renderer: try doing outset box shadows
...
Still fall back in cases we can't handle that way.
2017-12-21 19:12:33 +01:00
Timm Bäder
d211f42091
gl renderer: Remove unused vertex shader
2017-12-21 19:12:32 +01:00
Timm Bäder
a83037c440
gl renderer: Implement cross fade nodes
2017-12-21 19:12:32 +01:00
Timm Bäder
bed03aa319
gl renderer: Fix linear gradient shader color calculation
...
This fixes both the wrong headerbar color and the broken border color in
of the circular button in the widget-factory.
2017-12-21 19:12:32 +01:00
Timm Bäder
eb221ff305
gl renderer: Only take glyph texture alpha into account
...
This way, we can use the very same coloring program to draw text shadows
of fonts with colored glyphs.
2017-12-21 19:12:32 +01:00
Timm Bäder
64400e82b5
gl renderer: Default to 0px clip and border radius
...
Finally fix the division by 0 in the clip code.
2017-12-21 19:12:32 +01:00
Timm Bäder
2d3e87da46
gl renderer: Try to fix border rendering
2017-12-21 19:12:32 +01:00
Timm Bäder
fd0b7caa7c
gl renderer: Fix shadow shader
...
We need to take the alpha of the shadow color into account as well.
2017-12-21 19:12:32 +01:00
Timm Bäder
3b7cfd068b
gl renderer: Implement simple border nodes
2017-12-21 19:12:31 +01:00
Timm Bäder
e95b356465
gl renderer: Implement simple shadow nodes
2017-12-21 19:12:31 +01:00
Timm Bäder
8c9e203458
gl renderer: Fix inset shadow offset calculation
2017-12-21 19:12:31 +01:00
Timm Bäder
47c4bf5be0
gl renderer: Implement unblurred outset shadows
2017-12-21 19:12:31 +01:00
Timm Bäder
5c7838e168
gl renderer: Rework program creation
...
Make sure all uniform names have to match between the shader names and
the _location integers we save in every Program struct.
2017-12-21 19:12:31 +01:00
Timm Bäder
388157b995
gl renderer: Implement unblurred inset shadows
2017-12-21 19:12:31 +01:00
Timm Bäder
6a1a70c677
gl renderer: Implement blur nodes
2017-12-21 19:12:31 +01:00
Timm Bäder
f4304336ea
gl renderer: Don't pass MVP to shaders
...
We already pass both modelview and projection matrix individually.
2017-12-21 19:12:30 +01:00
Timm Bäder
4cf2a482ea
gl: Add glyph cache
...
Based on the one used by the vulkan renderer
2017-12-21 19:12:30 +01:00
Timm Bäder
9b400134d5
gl renderer: Remove unused shaders
2017-12-21 19:12:30 +01:00
Timm Bäder
33aa61ef2c
gl renderer: Save clip in every node
2017-12-21 19:12:30 +01:00
Timm Bäder
24e69bb877
gl renderer: Implement rounded clip nodes
...
mostly a proof of concept
2017-12-21 19:12:30 +01:00
Timm Bäder
4aa3f51016
test-render-nodes: Add color matrix test
2017-12-21 18:25:52 +01:00
Timm Bäder
6bce14bee2
Rework the GL renderer
2017-12-21 18:25:52 +01:00
Benjamin Otte
9048d40bc2
vulkan: Fix mask shader to premultiply color
...
The inColor wasn't premultiplied, so the resulting colors were wrong
with translucent borders.
2017-12-02 16:21:58 +01:00
Benjamin Otte
abc8d61730
vulkan: Fix border shader to premultiply color
...
The inColor wasn't premultiplied, so the resulting colors were wrong
with translucent borders.
2017-12-02 16:21:58 +01:00
Benjamin Otte
e1572e003a
vulkan: No need to redefine gl_PerVertex
...
The compiler has those predefined, so use them.
2017-10-24 01:29:28 +02:00
Benjamin Otte
e4dbff6bfc
vulkan: Delete unused shaders
...
These have been renamed to .frag/.vert, apparently the originals weren't
deleted.
2017-10-24 01:29:28 +02:00
Matthias Clasen
b564dd853c
Avoid super-luminous pixels
...
The color-matrix shader was creating pixels with r,g,b > a in
some cases, which leads to unexpected test failures. In particular
this as visible the opacity render node test for opacity 0.
2017-10-19 15:16:54 +02:00
Matthias Clasen
76aa237cce
Fix blendmode shader
...
My reading of the spec formulas was imperfect.
2017-10-08 21:12:22 -04:00
Matthias Clasen
5577fde990
vulkan: Rename blend pipeline to texture
...
This is what it does, and the name blend is easily
confused with blend-mode.
2017-09-29 23:08:09 -04:00
Matthias Clasen
485470511f
vulkan: Update the outset-shadow fragment shaders
...
These were missing the blur-radius parameter that is written
by the vertex shader, causing Vulkan validation to complain.
2017-09-26 18:24:52 -04:00
Matthias Clasen
3c98b90fc6
vulkan: Implement nonseparable blendmodes
...
This is a directly-from-the-spec, unoptimized implementation.
2017-09-23 09:16:58 -04:00
Matthias Clasen
d61f6ff393
vulkan: Implement blend modes
...
This is another example for a 2-texture shader.
So far, only separable blend modes are implemented.
The implementation is not optimized, with an
if-else cascade in the shader.
2017-09-23 01:59:50 -04:00
Matthias Clasen
a75d995bd4
vulkan: Implement crossfade
...
This is the first shader using two textures. It almost works.
2017-09-22 22:16:10 -04:00
Matthias Clasen
9a1460218c
vulkan: Quiet another validation warning
...
It complains if a vertex shader has an out that is not matched
to an in of the fragment shader.
2017-09-21 12:05:00 -04:00
Matthias Clasen
b0e8d8483d
More work on text nodes
...
This commit takes several steps towards rendering text
like we want to.
The creation of the cairo surface and texture is moved
to the backend (in GskVulkanRenderer). We add a mask
shader that is used in the next text pipeline to use
the texture as a mask, like cairo_mask_surface does.
There is a separate color text pipeline that uses the
already existing blend shaders to use the texture as
a source, like cairo_paint does.
The text node api is simplified to have just a single
offset, which determines the left end of the text baseline,
like all our other text drawing APIs.
2017-09-10 14:36:26 -04:00
Patrick Griffis
a55b57caff
build: Improve vulkan resource handling
...
This fixes the proper dependencies getting set up for generating
the shaders and only the necessary things getting rebuilt on
resources changing in gsk.
2017-09-05 15:18:56 -04:00
Matthias Clasen
7bb5b8df0b
A somewhat working blur shader
...
This is a very direct implementation of a Gaussian blur,
without any optimizations.
2017-09-04 23:32:31 -04:00
Matthias Clasen
86c0c243a0
Add rules to regenerate all shader variants
...
We were missing rules to build the clip variants of
the shaders.
2017-09-03 19:58:41 -04:00
Emmanuele Bassi
4904491b77
build: Move Vulkan shader handling to its own directory
...
Spooky action at a distance is not really allowed in Meson, so the rules
to generate the SPV files should go in their own directory.
Tested by: Rico Tzschichholz <ricotz@ubuntu.com>
2017-08-15 17:07:21 +01:00
Timm Bäder
fbada8e758
glrenderer: Handle color nodes
2017-03-31 09:50:39 +02:00
Benjamin Otte
ee9828d49c
vulkan: Fix copy/paste error
2017-01-18 16:46:04 +01:00
Benjamin Otte
12637195de
vulkan: Add compiled shaders
...
I forgot to include them when adding the shaders.
2017-01-18 16:42:01 +01:00
Benjamin Otte
cde933ebd9
vulkan: Compute right size for outset shadow
...
We were emitting the box and not the shadow box as the rectangle. So we
didn't draw any shadows. Oops.
2017-01-18 16:39:27 +01:00
Benjamin Otte
bd24ca5b18
vulkan: Add support for unblurred box-shadow
2017-01-18 04:13:56 +01:00
Benjamin Otte
6bec7aae89
vulkan: Generate clip shaders from same source
...
Instead of having 3 different shaders for the different clipping
versions, just have one shader and use a preprocessor define to use
different clip functions.
That preprocessor define is set in the Makefile.
Also use foo.frag and foo.vert as the file extensions instead of using
foo.frag.glsl and foo.vert.glsl, as that's what glslc suggests as
extension.
2017-01-17 06:17:55 +01:00
Benjamin Otte
3768c676c6
vulkan: Add clip.vert.glsl
...
Implement clipping the same way as in the last commit for the
fragment shaders.
2017-01-17 06:17:55 +01:00
Benjamin Otte
cf65443fb3
vulkan: Add a clip.frag.glsl include
...
This include is supposed to handle clipping for the different clipping
methods.
So far, we only use it in the rounded rect cases.
2017-01-17 06:17:55 +01:00