Commit Graph

10 Commits

Author SHA1 Message Date
Philip Rideout
561221fdc3 Rename PostProcessVertexInputs uv to normalizedUV. 2019-09-16 09:04:14 -07:00
Philip Rideout
8548afa231 Fix full-screen triangle winding and tex coords.
If you tried removing `culling: none` from any post-process materials,
everything would be fine in GL but Vulkan would be black because
our full-screen triangle was back-facing.

Continue reading only if you thrive in absurd situations.

- Metal and OpenGL define clip space as Y-up whereas Vulkan is Y-down.
- Metal and Vulkan define tex coords as Y-down whereas OpenGL is Y-up.
2019-09-16 09:04:14 -07:00
Ben Doherty
7c24a1bbaa Add custom vertex shaders for post-process materials (#1606) 2019-09-09 09:17:35 -07:00
Ben Doherty
82c7e4d988 Add new post-process functions (#1400) 2019-07-11 14:06:26 -07:00
Ben Doherty
b15abe9e5e Rename post-process generator functions (#1395) 2019-07-11 10:44:46 -07:00
Ben Doherty
725c978545 Remove yOffset uniform (#1382) 2019-07-10 15:30:00 -07:00
Ben Doherty
1aa4eff190 Fix post processing issue for Metal (#906) 2019-03-01 12:46:53 -08:00
Pixelflinger
8a6de4cff1 Fix fxaa offset (#868)
vertex shader interpolants are interpolated at pixel centers by the GPU,
but we were doing our own "pixel-center" adjustment, so we ended-up with
"vertex_uv" at a pixel corner instead of center.

with this change, the vertex shader always compute vertex_uv in
fractional texels and the conversion to texture coordinates is done
in the fxaa code.

The half-pixel adjustment is removed.

This leads to sharper looking images because in addition to shifting
everything by 0.5 pixels, this was essentially applying a box-filter
to the whole picture -- kind of like taking 1 mip level down.
2019-02-25 13:22:14 -08:00
Ben Doherty
7099682204 Metal driver implementation (#795) 2019-02-14 16:04:28 -08:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00