Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-11-08 21:17:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-08 21:20:40 +0300
commit4f114419137e76acde2d60d256d470c5a7a4232b (patch)
tree2ebba925659d9e4ece39cdcc5ff68f5908751e91 /source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl
parent9d12a5aa9e20c33c49bd86e956d0b3d5fbf6fd46 (diff)
Eevee: Add partial support for the Light Path Node
This makes it possible to tweak indirect lighting in the shader. Only a subset of the outputs is supported and the ray depth has not exactly the same meaning: Is Camera : Supported. Is Shadow : Supported. Is Diffuse : Supported. Is Glossy : Supported. Is Singular : Not supported. Same as Is Glossy. Is Reflection : Not supported. Same as Is Glossy. Is Transmission : Not supported. Same as Is Glossy. Ray Length : Not supported. Defaults to 1.0. Ray Depth : Indicate the current bounce when baking the light cache. Diffuse Depth : Same as Ray Depth but only when baking diffuse light. Glossy Depth : Same as Ray Depth but only when baking specular light. Transparent Depth : Not supported. Defaults to 0. Transmission Depth : Not supported. Same as Glossy Depth. Caveat: Is Glossy does not work with Screen Space Reflections but does work with reflection planes (when used with SSR or not). We have to render the world twice for that to work.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl
index 1666d766225..d26013ce132 100644
--- a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl
@@ -38,8 +38,16 @@ layout(std140) uniform common_block {
float prbLodPlanarMax;
/* Misc*/
int hizMipOffset;
+ int rayType;
+ float rayDepth;
};
+/* rayType (keep in sync with ray_type) */
+#define EEVEE_RAY_CAMERA 0
+#define EEVEE_RAY_SHADOW 1
+#define EEVEE_RAY_DIFFUSE 2
+#define EEVEE_RAY_GLOSSY 3
+
/* aoParameters */
#define aoDistance aoParameters[0].x
#define aoSamples aoParameters[0].y /* UNUSED */