Blender Git Loki
Git Commits -> Revision 685c94e
Revision 685c94e by Clément Foucault (greasepencil-object, greasepencil-refactor, temp-gpencil-eval) December 21, 2019, 00:21 (GMT) |
GPencil: Refactor: Use normal approximation for lighting We compute the normal using the bounding box size and the view vector to the center of the bounding box. We then scale the normal w.r.t. the BBox size and transform it back to world space. This gives us a flat normal for objects without depth and a rotating normal for object that are not. This will also be used for correct depth mixing. |
Commit Details:
Full Hash: 685c94eacb3453758066759ea8aab32956c11c5b
Parent Commit: c549212
Lines Changed: +57, -3
6 Modified Paths:
/source/blender/draw/engines/gpencil/gpencil_cache_utils.c (+36, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_draw_data.c (+2, -1) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.h (+4, -0) (Diff)
/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl (+13, -2) (Diff)
/source/blender/draw/engines/gpencil/gpencil_draw_data.c (+2, -1) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.h (+4, -0) (Diff)
/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl (+13, -2) (Diff)