Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to set transparency sort policy per-camera #169

Closed
wants to merge 2 commits into from

Conversation

TaaTT4
Copy link
Contributor

@TaaTT4 TaaTT4 commented Dec 31, 2020

See: https://forums.ogre3d.org/viewtopic.php?p=549934#p549934

I set "sort by euclidean distance, without considering the bounding sphere radius" as a default policy. In my opinion, it's the best sorting policy for 3D scenes with perspective cameras (the main OGRE usage scenario). In fact, the same policy is used as a default by other engines as well. If this choice is too strict or monocratic, I can add a static Camera::setDefaultSortMode method to set the default sorting policy for cameras created from now on (similar to what has been done for MovableObject and Renderable).

darksylinc added a commit that referenced this pull request Jan 4, 2021
Setting can be controlled by directly altering Camera::mSortMode

See: https://forums.ogre3d.org/viewtopic.php?p=549934#p549934

Based on #169 by user TaaTT4
@darksylinc
Copy link
Member

Implemented manually to maximize performance concerns (it's a hot spot function).

However this PR was very relevant to understand what was required to do both in code and from a user perspective. Thanks!!!

@darksylinc darksylinc closed this Jan 4, 2021
@TaaTT4 TaaTT4 deleted the feature/transparency_sort branch January 4, 2021 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants