diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-06-26 21:37:41 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-06-26 22:04:53 +0300 |
commit | 0394c04a7f0301803a5084ee5a5cb2f294d5de70 (patch) | |
tree | 9e58f018dd66f95175e5e6f40b1be6acca5b1b1e /source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_geom.glsl | |
parent | daf02baaeaaf8f0a7c68ae236a2d0782c08aea2f (diff) |
Eevee: Add Planar reflection blurring.
This method is very cheap and inaccurate. This will fill the gap untill better model is supported.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_geom.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_geom.glsl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_geom.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_geom.glsl new file mode 100644 index 00000000000..40b04c986f3 --- /dev/null +++ b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_geom.glsl @@ -0,0 +1,24 @@ + +layout(triangles) in; +layout(triangle_strip, max_vertices=3) out; + +in int instance[]; +in vec2 vPos[]; + +flat out float layer; + +void main() { + gl_Layer = instance[0]; + layer = float(instance[0]); + + gl_Position = vec4(vPos[0], 0.0, 0.0); + EmitVertex(); + + gl_Position = vec4(vPos[1], 0.0, 0.0); + EmitVertex(); + + gl_Position = vec4(vPos[2], 0.0, 0.0); + EmitVertex(); + + EndPrimitive(); +}
\ No newline at end of file |