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

Bake sometimes outputs garbage results #2

Open
Fewes opened this issue Aug 19, 2019 · 4 comments
Open

Bake sometimes outputs garbage results #2

Fewes opened this issue Aug 19, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Fewes
Copy link
Owner

Fewes commented Aug 19, 2019

Unknown why. Might be an issue with using temporary RenderTextures. Restarting usually fixes it.

@Fewes Fewes added the bug Something isn't working label Aug 19, 2019
@Fewes Fewes self-assigned this Aug 19, 2019
@hybridherbst
Copy link

Oh, maybe it's related to something I observed - note that when using RenderTexture.GetTemporary, the state of the texture you get is not defined (specifically: it's not guaranteed to be clear or have a clear alpha channel).
I've switched to "regular" creation of RenderTextures for everything non-realtime and didn't have "sometimes garbage results" with baking since then.

@Fewes
Copy link
Owner Author

Fewes commented Aug 21, 2019

I've switched to using non-temp RTs now (e53c829) and the issue seems to have gone away. Thanks for the feedback!

@Fewes Fewes closed this as completed Aug 21, 2019
@hybridherbst
Copy link

Might be worth opening a bug report with Unity to get some insight into this too! It's not good that RT.GetTemporary (which was advertised as a faster alternative to the "regular way") creates undefined results.

@Fewes
Copy link
Owner Author

Fewes commented Aug 21, 2019

I'm still seeing this issue sometimes, might have to do with how I try to clear and reuse the RT instead of allocating a new one. Need to do some more testing before I can count this as solved it seems.

@Fewes Fewes reopened this Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants