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>2017-07-24 16:36:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-07-24 16:36:22 +0300
commitc5f4342692b10110200e3494a1e9412e75270c10 (patch)
tree8f3b47d2133aa0c4685d99b8cd779706cb72ba17 /source/blender/gpu/shaders
parentf6c60ffcadc0e3ea2d14c48e96120010751ae53c (diff)
Eevee: SSR: Small fixes
- Encode normals for other opaque bsdf so they are not rejected by the normal facing test. - Early out non reflective surfaces. - Add small offset to raytrace to avoid self intersection. - Fix fallback probes not appearing.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index c2956011ffa..a7055d422f0 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2663,8 +2663,8 @@ void node_bsdf_diffuse(vec4 color, float roughness, vec3 N, out Closure result)
{
#ifdef EEVEE_ENGINE
vec3 L = eevee_surface_diffuse_lit(N, vec3(1.0), 1.0);
-
- result = Closure(L * color.rgb, 1.0, vec4(0.0), vec2(0.0), -1);
+ vec3 vN = normalize(mat3(ViewMatrix) * N);
+ result = Closure(L * color.rgb, 1.0, vec4(0.0), normal_encode(N, viewCameraVec), -1);
#else
/* ambient light */
vec3 L = vec3(0.2);
@@ -2945,7 +2945,7 @@ void node_emission(vec4 color, float strength, vec3 N, out Closure result)
#ifndef VOLUMETRICS
color *= strength;
#ifdef EEVEE_ENGINE
- result = Closure(color.rgb, color.a, vec4(0.0), vec2(0.0), -1);
+ result = Closure(color.rgb, color.a, vec4(0.0), normal_encode(N, viewCameraVec), -1);
#else
result = Closure(color.rgb, color.a);
#endif