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

RenderTarget.canvas nested rendering #32

Closed
rayzchen opened this issue Apr 9, 2022 · 2 comments · Fixed by #37
Closed

RenderTarget.canvas nested rendering #32

rayzchen opened this issue Apr 9, 2022 · 2 comments · Fixed by #37
Labels
Type: Bug Something isn't working
Projects
Milestone

Comments

@rayzchen
Copy link
Collaborator

rayzchen commented Apr 9, 2022

If RenderTarget.canvas is true, it may try to render itself in PreRender. Whether this is wanted or not, there needs to be a limit to the depth of recursion.

@rayzchen rayzchen added the Type: Bug Something isn't working label Apr 12, 2022
@rayzchen rayzchen added this to To do soon in PyUnity Apr 12, 2022
@rayzchen rayzchen added this to the 0.9.0 milestone Apr 12, 2022
@rayzchen
Copy link
Collaborator Author

rayzchen commented Apr 12, 2022

One suggestion is instead of rendering all Canvases per camera, assign a canvas to a single camera and then render only that canvas. Nesting canvases also allows for some basic merging of canvas rendering (for example, camera A renders canvases A and B while camera B only renders B). More complex set operations could be handled in other ways.

However a problem arises when the RenderTarget's source is set to a camera which renders the canvas it is inside, which still has this issue.

@rayzchen
Copy link
Collaborator Author

Merged

@rayzchen rayzchen moved this from To do soon to Done in PyUnity Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant