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

[Feature Request] Allow baking in URP/HDRP #8

Open
hybridherbst opened this issue Feb 26, 2020 · 4 comments
Open

[Feature Request] Allow baking in URP/HDRP #8

hybridherbst opened this issue Feb 26, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request waiting Currently not possible to implement

Comments

@hybridherbst
Copy link

While there's no error, baking results look broken when a Scriptable Render Pipeline is active while baking. My guess is that the depth format is different, but haven't really looked into it - workaround is to disable any SRP, switch material to "Standard" and bake in that mode, then switch back.

Would be cool as a workflow to be able to bake while URP / HDRP are active.

@Fewes
Copy link
Owner

Fewes commented Mar 12, 2020

I recently started using URP myself, so I will commit to adding support to that at the very least. Stay tuned!

@Fewes Fewes self-assigned this Mar 12, 2020
@Fewes Fewes added the enhancement New feature or request label Mar 12, 2020
@Fewes
Copy link
Owner

Fewes commented Mar 13, 2020

After investigating this, it seems adding URP support is currently not possible, as Camera.Render and Camera.RenderWithShader are not supported, with no replacement existing. I've made a thread on the Unity Forum for this topic which you can follow if you are interested on how it might develop: https://forum.unity.com/threads/replacement-for-camera-render-camera-renderwithshader.845854/

@Fewes Fewes added the waiting Currently not possible to implement label Mar 13, 2020
@hybridherbst
Copy link
Author

hybridherbst commented Mar 13, 2020

I replied on the forums with what the replacement for RenderWithShader is (Renderer Features). You could also make your own if you don't want to use the built-in RenderObjects, because then you could directly have the texture grab in the feature.

I'm not sure why that page states Camera.Render is not supported - I think I'm using that on URP just fine. Note that URP docs are notoriously incomplete and outdated...

@Fewes
Copy link
Owner

Fewes commented Mar 15, 2020

From testing I am pretty confident that Camera.Render is not working in URP. I could not get it to output anything to my target texture, regardless of texture format or shader replacement setup.
I'm guessing the best way to support URP would be to bundle a custom Renderer Feature with BNAO but I'm a little unsure if it's possible to set up the camera completely from script. Might take a look at it in the future but I'll leave it open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting Currently not possible to implement
Projects
None yet
Development

No branches or pull requests

2 participants