diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_material.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 857db4f7f7c..a0c56e9ebf4 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -1,6 +1,8 @@ uniform mat4 ModelViewMatrix; +#ifndef PROBE_CAPTURE uniform mat4 ProjectionMatrix; +#endif uniform mat4 ModelViewMatrixInverse; uniform mat4 ProjectionMatrixInverse; uniform mat3 NormalMatrix; @@ -172,7 +174,7 @@ void color_to_blender_normal_new_shading(vec3 color, out vec3 normal) } #define M_PI 3.14159265358979323846 -#define M_1_PI 0.31830988618379069 +#define M_1_PI 0.318309886183790671538 /*********** SHADER NODES ***************/ @@ -2813,6 +2815,13 @@ void background_transform_to_world(vec3 viewvec, out vec3 worldvec) worldvec = (ModelViewMatrixInverse * co).xyz; } +#ifdef PROBE_CAPTURE +void environment_default_vector(out vec3 worldvec) +{ + worldvec = normalize(worldPosition); +} +#endif + void node_background(vec4 color, float strength, vec3 N, out vec4 result) { result = color * strength; |