[Bf-blender-cvs] [987c6da6c0d] master: Eevee: Fix volumetric shaders compilation error

Clément Foucault noreply at git.blender.org
Tue May 14 19:59:13 CEST 2019


Commit: 987c6da6c0dd7b4f8c64561c030d4c381f2725c5
Author: Clément Foucault
Date:   Tue May 14 19:58:26 2019 +0200
Branches: master
https://developer.blender.org/rB987c6da6c0dd7b4f8c64561c030d4c381f2725c5

Eevee: Fix volumetric shaders compilation error

===================================================================

M	source/blender/gpu/shaders/gpu_shader_material.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 6a3d6c3b142..94770aa2ebf 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -3376,11 +3376,11 @@ void node_output_world(Closure surface, Closure volume, out Closure result)
 #endif /* VOLUMETRICS */
 }
 
-#ifndef VOLUMETRICS
 /* TODO : clean this ifdef mess */
 /* EEVEE output */
 void world_normals_get(out vec3 N)
 {
+#ifndef VOLUMETRICS
 #  ifdef HAIR_SHADER
   vec3 B = normalize(cross(worldNormal, hairTangent));
   float cos_theta;
@@ -3398,8 +3398,12 @@ void world_normals_get(out vec3 N)
 #  else
   N = gl_FrontFacing ? worldNormal : -worldNormal;
 #  endif
+#else
+  generated_from_orco(vec3(0.0), N);
+#endif
 }
 
+#ifndef VOLUMETRICS
 void node_eevee_specular(vec4 diffuse,
                          vec4 specular,
                          float roughness,



More information about the Bf-blender-cvs mailing list