diff options
author | Kevin Buhr <buhr> | 2019-11-11 20:13:39 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-11-11 21:30:27 +0300 |
commit | 8c9e6f123a2b26cb6cc7585a49fb2a09bdeba09d (patch) | |
tree | 084c33b35e5a2b3d058e45a053aab548191deee6 /source | |
parent | a97cc5389ae8d9ca8cc76a959f7edf4d38c50b88 (diff) |
Fix T71461: Add IN_PLACE_INSTANCES to `part_prim` and `part_axis` object mode particle shaders
For `Particle Properties -> Viewport Display -> Display As` set to
circle/cross/axis, particle instances are associated with a single
resource handle (and, in particular, a single model matrix), so define
`IN_PLACE_INSTANCES` to get the right index for `ModelMatrix` and
`ModelInverseMatrix` in the shader.
Differential Revision: https://developer.blender.org/D6220
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 781c7e6a488..80793726afe 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -510,12 +510,13 @@ static void OBJECT_engine_init(void *vedata) NULL, datatoc_gpu_shader_flat_color_frag_glsl, datatoc_common_view_lib_glsl, - NULL); + "#define IN_PLACE_INSTANCES\n"); sh_data->part_axis = DRW_shader_create_with_lib(datatoc_object_particle_prim_vert_glsl, NULL, datatoc_gpu_shader_flat_color_frag_glsl, datatoc_common_view_lib_glsl, + "#define IN_PLACE_INSTANCES\n" "#define USE_AXIS\n"); sh_data->part_dot = DRW_shader_create_with_lib(datatoc_object_particle_dot_vert_glsl, |