diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-20 04:01:07 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-23 14:49:35 +0300 |
commit | b129ea843a7332ddd96554a8c59be379dabf2210 (patch) | |
tree | 8555be190fb59f9eab84b2de2c5a89731e349a0d /source/blender/gpu/shaders | |
parent | 4a5ee1a5a2adc8032cf710357081d3a1e3fcad95 (diff) |
Cycles: change material output displacement to vector.
Previously only scalar displacement along the normal was supported,
now displacement can go in any direction. For backwards compatibility,
a Displacement node will be automatically inserted in existing files.
This will make it possible to support vector displacement maps in the
future. It's already possible to use them to some extent, but requires
a manual shader node setup. For tangent space maps the right tangent
may also not be available yet, depends on the map.
Differential Revision: https://developer.blender.org/D3015
Diffstat (limited to 'source/blender/gpu/shaders')
-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 b89317da84a..b54bd213b74 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -3823,7 +3823,7 @@ void node_displacement(float height, float dist, vec3 N, out vec3 result) /* output */ -void node_output_material(vec4 surface, vec4 volume, float displacement, out vec4 result) +void node_output_material(vec4 surface, vec4 volume, vec3 displacement, out vec4 result) { result = surface; } |