diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-22 14:14:08 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-22 14:14:08 +0400 |
commit | 08c1408f82e26f53de3780c0ccc7b4fbc43220e6 (patch) | |
tree | c40247dd7639a30d47a525d3217719462a4429b2 /source/blender/gpu | |
parent | 28a08e7ae641cb05ddfcc39c4d9e9f2fc8ce20aa (diff) |
Fix T41068: 3D viewport shading - Material or Window vs. Rendered
Checked with Brecht, Cycles indeed expects generated to be in 0..1 space
instead of -1..1 as it is in BI.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 2 |
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 fe0c7c2b715..3866ec2b8ae 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -2317,7 +2317,7 @@ void node_tex_coord(vec3 I, vec3 N, mat4 viewinvmat, mat4 obinvmat, out vec3 generated, out vec3 normal, out vec3 uv, out vec3 object, out vec3 camera, out vec3 window, out vec3 reflection) { - generated = attr_orco; + generated = attr_orco * 0.5 + vec3(0.5, 0.5, 0.5); normal = normalize((obinvmat*(viewinvmat*vec4(N, 0.0))).xyz); uv = attr_uv; object = (obinvmat*(viewinvmat*vec4(I, 1.0))).xyz; |