Blender Git Loki
Git Commits -> Revision e7ea1ae
Revision e7ea1ae by Mai Lavelle (master) September 2, 2016, 02:45 (GMT) |
Cycles microdisplacement: Improved automatic bump mapping Object coordinates can now be used in the displacement shader and will give correct results, where as before bump mapping was calculated from the displace positions and resulted in incorrect shading. This works by evaluating the shader in two parts, first bump then surface, and setting the shader state to match what it would be if the surface was undisplaced for the bump shader evaluation. Currently only `P` is set as if undisplaced, but other shader variables could be set as well, such as `I` or `time`. Since these aren't set to anything meaningful for displacement I left them out of this patch, we can decide what to do with them separately. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156 |
Commit Details:
Full Hash: e7ea1ae78c84904864c17248b1b22b1e6c11acc9
Parent Commit: 62aecbd
Lines Changed: +181, -52
1 Added Path:
/intern/cycles/kernel/svm/svm_bump.h (+54, -0) (View)
13 Modified Paths:
/intern/cycles/kernel/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/kernel_types.h (+9, -8) (Diff)
/intern/cycles/kernel/osl/osl_globals.h (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.cpp (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.h (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_shader.cpp (+41, -0) (Diff)
/intern/cycles/kernel/svm/svm.h (+7, -0) (Diff)
/intern/cycles/kernel/svm/svm_types.h (+6, -1) (Diff)
/intern/cycles/render/graph.cpp (+2, -21) (Diff)
/intern/cycles/render/osl.cpp (+14, -11) (Diff)
/intern/cycles/render/shader.cpp (+2, -0) (Diff)
/intern/cycles/render/svm.cpp (+41, -11) (Diff)
/intern/cycles/render/svm.h (+1, -0) (Diff)
/intern/cycles/kernel/kernel_types.h (+9, -8) (Diff)
/intern/cycles/kernel/osl/osl_globals.h (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.cpp (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.h (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_shader.cpp (+41, -0) (Diff)
/intern/cycles/kernel/svm/svm.h (+7, -0) (Diff)
/intern/cycles/kernel/svm/svm_types.h (+6, -1) (Diff)
/intern/cycles/render/graph.cpp (+2, -21) (Diff)
/intern/cycles/render/osl.cpp (+14, -11) (Diff)
/intern/cycles/render/shader.cpp (+2, -0) (Diff)
/intern/cycles/render/svm.cpp (+41, -11) (Diff)
/intern/cycles/render/svm.h (+1, -0) (Diff)