-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 overrideRenderingFillMode property to Mesh #13708
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13708/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/13708/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/13708/merge#BCU1XR#0 |
Nice! That seems to work perfectly in my playground test case: https://playground.babylonjs.com/?snapshot=refs/pull/13708/merge#WX0F9G#2 That being said. In my forum post use case I do clone the mesh and change index buffer to special index buffer to render ngon wireframes. Material is shared, but geometry as a whole is not. However at least in my use case the override is only used for rendering so I have no complaints what-so-ever about this getting merged in a simplified render only form. :) |
@Popov72 any thoughts ? |
I think we can merge this PR and see if there are other needs in the future? |
Hmm.. I just noticed that you moved the fillMode assingment inside That might be a problem? Right now:
If this is kept as "render only" override, then it likely should be applied outside |
It is more a bug in the previous implementation as it should use the requested fill mode and not force triangle which might even not fit with the content. (let s not that this might also be a problem with the override today but I prefer to wait for a REAL usage rather than introducing more code if it is never even used)
Good catch, fixed in the latest push and checked in the code base. |
Supersedes #13688
As discussed in forum thread here: https://forum.babylonjs.com/t/add-mesh-overridematerialfillmode/39475/
cc @MiikaH to review
The main difference is use the override only within the rendering scope as the flag is only used as a visual tool. It also fixes some of the scene override levels inconsistencies.