diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-19 16:25:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-19 16:26:30 +0300 |
commit | e72dc667c4d3ef0b4a4c306dd6b12cae9d37287b (patch) | |
tree | ae19d0d25bf0ee2a42c27facaefbe261c8e97342 /source/blender/draw/modes/shaders | |
parent | 58e27cca97c4dc348949c2df8138ba08b17743fc (diff) |
Fix T61475 Particle edit does not render children if path step > 7
Gives 2 more bits to the segment count. Also subtract 1 because segment
count cannot be negative.
Diffstat (limited to 'source/blender/draw/modes/shaders')
-rw-r--r-- | source/blender/draw/modes/shaders/common_hair_lib.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/shaders/common_hair_lib.glsl b/source/blender/draw/modes/shaders/common_hair_lib.glsl index da86f7a7086..9cda44c8f42 100644 --- a/source/blender/draw/modes/shaders/common_hair_lib.glsl +++ b/source/blender/draw/modes/shaders/common_hair_lib.glsl @@ -46,8 +46,8 @@ void unpack_strand_data(uint data, out int strand_offset, out int strand_segment // strand_offset = (data & 0x1FFFFFFFu); // strand_segments = 1u << (data >> 29u); /* We only need 3 bits to store subdivision level. */ #else - strand_offset = int(data & 0x00FFFFFFu); - strand_segments = int(data >> 24u); + strand_offset = int(data & 0x003FFFFFu); + strand_segments = int(data >> 22u) + 1; #endif } |