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:
authorDalai Felinto <dfelinto@gmail.com>2017-08-25 12:25:53 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-08-25 12:47:38 +0300
commit0e29a97813d2a2df77afe64d49d1683687ed37ab (patch)
tree1ff67b3ea43ed685bd2fda70df790ec7e30a24f3 /source/blender/gpu/shaders
parent9e762693db15f815e93714ac018083676bc908f7 (diff)
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.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl2
1 files changed, 1 insertions, 1 deletions
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
}