diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-04-27 23:27:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-05-01 19:11:21 +0300 |
commit | e868b459bb8efc35012b2364762f3d25d96b8b0d (patch) | |
tree | eb2c0e9909a3a4ea5225f6b537f8b7fbdf51d832 /source/blender/nodes/shader/nodes/node_shader_tex_environment.c | |
parent | 2f100c13ee14cc6876423d1ac39ef9c565fb8987 (diff) |
Eevee: World nodetree gpumaterial compatibility.
- Unify GPUMaterial creation (world/mesh).
- Support for multiple shader variations (not used for now).
- Convert GPUInputs to DRWUniforms to be used with the draw manager.
- Nodetree Update is not supported. The only way to refresh the shaders is to change render engine.
- Cleanup in GPUPass.
- Add new temporary Node Compatibility type. Compatibility types should be removed in the future.
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_tex_environment.c')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_environment.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c index 2f8f95b0675..e090f26ab6b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c @@ -69,8 +69,10 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeE if (type == GPU_MATERIAL_TYPE_MESH) in[0].link = GPU_builtin(GPU_VIEW_POSITION); - else + else if (type == GPU_MATERIAL_TYPE_WORLD) GPU_link(mat, "background_transform_to_world", GPU_builtin(GPU_VIEW_POSITION), &in[0].link); + else + GPU_link(mat, "environment_default_vector", &in[0].link); } node_shader_gpu_tex_mapping(mat, node, in, out); |