Eevee: SSR: Making ray count a define rather than an uniform.
authorClément Foucault <foucault.clem@gmail.com>
Wed, 13 Sep 2017 13:29:13 +0000 (15:29 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Wed, 13 Sep 2017 13:29:38 +0000 (15:29 +0200)
commit9abacf38fd4f3b0de4b6d9a4644b9cb1155482c9
treea7c4caf1b08d7c5b30e0601281b23b8af4700e16
parent71c1bd1bd870712e27d0d56ca525cf2dbc848639
Eevee: SSR: Making ray count a define rather than an uniform.

The branching introduced by the uniform caused problems on mesa + AMD in the resolve stage.
This patch create one shader per sample count without branching.
This improves performance of a single ray per pixel case (3.0ms against 3.6ms in my testing)
source/blender/draw/engines/eevee/eevee_effects.c
source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl