-
Notifications
You must be signed in to change notification settings - Fork 29
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
in Postprocess mode, the GPU crashes steadily #33
Comments
Thank you for investigating! Those are some really good points. I agree, setting the buffer size based on the screen size is not ideal. We should instead set it based on the current camera buffer size.
Though I wonder if we need more flexibility here and pass a RTHandle or something similar. Anyways, I will try and set up a pull request. 😊 But feel free to start one as well if you are up for it. |
I tried to work on it at #34, but it didn't quite fix the issue for me. Using the camera parameters is fine for URP and HDRP. But I can't get it to work with the Built-in pipeline. It works if only the scene view or only the game view is visible. But it breaks once multiple views are active at the same time. |
Alright, I can now offer a solution for the first issue, the frequent crashes you mentioned, with #40. |
After examining the issue, it turns out that the main cause is the failure to bind the new buffer to the clearStartOffsetBufferKernel after reallocating the buffer due to a change in screen size.
This issue can be simply resolved by binding the buffer before dispatching the kernel:
And, when I investigated this issue, I also discovered that the Screen.width value retrieved here changes frequently, because this variable refers to the current window , which could be the preview window, the editor window, and the game window.
It might be a better approach to bind an independent buffer for each camera?
Additionally, switching windows can causes the OIT effect to disappear, and I have not yet found the reason for this.
The text was updated successfully, but these errors were encountered: