Commit Graph

4 Commits

Author SHA1 Message Date
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
c7d899c535 vulkan: Move push constants into their own header
This is the first step towards easing maintenance of the Vulkan shaders
by moving common code into headers.
2017-01-17 06:17:55 +01:00
Benjamin Otte
af917c4ade vulkan: Handle linear gradients
Note: We interpolate premultiplied colors as per the CSS spec. This i
different from Cairo, which interpolates unpremultiplied.

So in testcases with translucent gradients, it's actually Cairo that is
wrong.
2016-12-26 17:22:02 +01:00