Skip to content

Fix rendering sprites on 3D models#4449

Closed
geckoxx wants to merge 2 commits intobevyengine:mainfrom
geckoxx:2d_on_3d
Closed

Fix rendering sprites on 3D models#4449
geckoxx wants to merge 2 commits intobevyengine:mainfrom
geckoxx:2d_on_3d

Conversation

@geckoxx
Copy link
Contributor

@geckoxx geckoxx commented Apr 10, 2022

Objective

  • Fixes Issues rendering sprites and 3D models in 0.6 at the same time #3902
  • Sprites are not renders on 2D models
  • After changing the render order only the result of the 2d pass is displayed if msaa is in use. Because with msaa the 2d and 3d render passes uses there own sampled_targets which then overrides the complete view. The ui render pass does not use msaa so it is not affected by this issue.

Solution

  • Change order to render 2d after 3d
  • Expand TextureCache through shared status
  • Use shared sampled_texture so that 2d and 3d render pass use the same sampled_texture

I don't now if this is the right or best solution.

Result on current main:
main

Result with order fix:
order_fix

Result with order fix and shared sampled target:
shared_texture

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Apr 10, 2022
@geckoxx geckoxx changed the title 2d on 3d Fix rendering sprites on 3D models Apr 10, 2022
@geckoxx
Copy link
Contributor Author

geckoxx commented Apr 10, 2022

It's not the right solution. Because for example the same sampled_texture is used in multiple windows which leads to incorrect rendering. And the Issue should be fixed with #3552

@geckoxx geckoxx closed this Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-Needs-Triage This issue needs to be labelled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues rendering sprites and 3D models in 0.6 at the same time

1 participant