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 for generating LODs and shadow mesh in PrimitiveMesh #94097

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 8, 2024

This can improve rendering performance with complex meshes, particularly SphereMesh, CapsuleMesh and TorusMesh.

This is disabled by default to ensure meshes are created as quickly as possible (and to avoid breaking custom shaders that displace vertices).

Preview

Look at the primitive count in the top-right corner of the editor.

LOD/shadow mesh disabled

LOD/shadow mesh disabled

LOD/shadow mesh enabled

LOD/shadow mesh enabled

LOD/shadow mesh enabled (Mesh LOD Threshold = 4 pixels)

LOD/shadow mesh enabled (Mesh LOD Threshold = 4 pixels)

@Calinou Calinou added this to the 4.x milestone Jul 8, 2024
@Calinou Calinou requested a review from a team as a code owner July 8, 2024 20:26
@Calinou Calinou force-pushed the primitivemesh-add-generate-lod-shadow-mesh branch from 051c911 to 8959e3b Compare July 8, 2024 20:27
@Calinou Calinou force-pushed the primitivemesh-add-generate-lod-shadow-mesh branch from 8959e3b to b5a1ec7 Compare July 9, 2024 00:53
This can improve rendering performance with complex meshes, particularly
SphereMesh, CapsuleMesh and TorusMesh.

This is disabled by default to ensure meshes are created as quickly
as possible (and to avoid breaking custom shaders that displace
vertices).
@Calinou Calinou force-pushed the primitivemesh-add-generate-lod-shadow-mesh branch from b5a1ec7 to afd634a Compare July 9, 2024 22:10
@clayjohn
Copy link
Member

I'm not sure about this. We really need a use case before implementing something like this. Otherwise we are adding bloat for no benefit.

The original proposal is asking for a tessellated mesh resource, that's not what this does. And this doesn't allow the user to do what they are asking to do either.

I would wait until a user asks for this with a real use-case before going forward with this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement support for LOD generation in PrimitiveMesh
3 participants