[Bf-blender-cvs] [0e29a97813d] blender2.8: Eevee: Fix generated coordinates when no texture coordinates connected

Dalai Felinto noreply at git.blender.org
Fri Aug 25 11:48:41 CEST 2017


Commit: 0e29a97813d2a2df77afe64d49d1683687ed37ab
Author: Dalai Felinto
Date:   Fri Aug 25 11:25:53 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB0e29a97813d2a2df77afe64d49d1683687ed37ab

Eevee: Fix generated coordinates when no texture coordinates connected

Orco should behave the same if it comes from unconnected vec inputs, or
from the Texture Coordinate -> Generated node output.

Fixup for 11e7e0769a4c.

This is related to T52528. The coordinates are still different between
Eevee and Cycles, but at least it behaves consistent within itself.

In fact the shader should now be correct, but the orco attributes we are
passing the shader seems to be where the problem is. But it's to be
tackled separately.

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

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 2470b607b07..d4151e90257 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2472,7 +2472,7 @@ void generated_from_orco(vec3 orco, out vec3 generated)
 #ifdef VOLUMETRICS
 	generated = worldPosition;
 #else
-	generated = orco;
+	generated = orco * 0.5 + 0.5;
 #endif
 }



More information about the Bf-blender-cvs mailing list