diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-06-17 01:08:03 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-06-19 11:47:56 +0300 |
commit | 3e4b9d2b5a6479ef71cdedf980bcd714f4f94d56 (patch) | |
tree | 52e63a7ebc87562638a778446540023645050001 /source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | |
parent | 5c67ac2236581532c4ce13448db457d33dd4e863 (diff) |
Eevee: Initial implementation of planar reflections.
Still pretty barebone: No roughness support, No normal distortion support.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index 16168320453..5ea74f38e83 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -24,6 +24,25 @@ struct ProbeData { #define p_atten_fac attenuation_fac_type.x #define p_atten_type attenuation_fac_type.y +struct PlanarData { + vec4 plane_equation; + vec4 clip_vec_x_fade_scale; + vec4 clip_vec_y_fade_bias; + vec4 clip_edges; + vec4 facing_scale_bias; + mat4 reflectionmat; /* transform world space into reflection texture space */ +}; + +#define pl_plane_eq plane_equation +#define pl_normal plane_equation.xyz +#define pl_facing_scale facing_scale_bias.x +#define pl_facing_bias facing_scale_bias.y +#define pl_fade_scale clip_vec_x_fade_scale.w +#define pl_fade_bias clip_vec_y_fade_bias.w +#define pl_clip_pos_x clip_vec_x_fade_scale.xyz +#define pl_clip_pos_y clip_vec_y_fade_bias.xyz +#define pl_clip_edges clip_edges + struct GridData { mat4 localmat; ivec4 resolution_offset; |