Blender Git Loki
Git Commits -> Revision 4b606da
Revision 4b606da by Mai Lavelle (temp-cycles-microdisplacement) August 18, 2016, 16:20 (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. |
Commit Details:
Full Hash: 4b606da5a6021fe9f20a1bdeeeea7d923abf6fcb
Parent Commit: f84e760
Lines Changed: +181, -52
1 Added Path:
/intern/cycles/kernel/svm/svm_bump.h (+53, -0) (View)
13 Modified Paths:
/intern/cycles/kernel/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/kernel_types.h (+10, -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 (+10, -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)