diff options
author | clayjohn <claynjohn@gmail.com> | 2019-05-23 09:21:57 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2019-05-23 09:21:57 -0700 |
commit | 2abe7deae8cbb5932ed35d9bc937e0913a454c5c (patch) | |
tree | 426708c029d21f117854e0e55179e36345f531b8 /drivers/gles2/rasterizer_scene_gles2.h | |
parent | a940b4cf640930b2decb356d395ac4cd89beefaf (diff) | |
download | redot-engine-2abe7deae8cbb5932ed35d9bc937e0913a454c5c.tar.gz |
fix no depth test and render_priority sorting
Diffstat (limited to 'drivers/gles2/rasterizer_scene_gles2.h')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.h b/drivers/gles2/rasterizer_scene_gles2.h index d805984dca..bd1a61688c 100644 --- a/drivers/gles2/rasterizer_scene_gles2.h +++ b/drivers/gles2/rasterizer_scene_gles2.h @@ -603,12 +603,10 @@ public: struct SortByReverseDepthAndPriority { _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const { - uint32_t layer_A = uint32_t(A->sort_key >> SORT_KEY_PRIORITY_SHIFT); - uint32_t layer_B = uint32_t(B->sort_key >> SORT_KEY_PRIORITY_SHIFT); - if (layer_A == layer_B) { + if (A->priority == B->priority) { return A->instance->depth > B->instance->depth; } else { - return layer_A < layer_B; + return A->priority < B->priority; } } }; |