-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Regarding post-processing issues with custom pipelines. #16059
Comments
Did your inherited setting-pass call If you still have problem, please uploading a test project for reproducing it. |
Regarding the second issue, consider this scenario: |
Currently, we add post-processing by calling the insertPass function. The fundamental problem is actually because here obtains passes that contain all post-processing existing in the entire game. This array includes Bloom, Blur, and other passes added by default. Then checkEnable is called. It enters the getSetting function to check if the setting exists. The setting itself does not exist in the passContext.postProcess array. However, due to two points. First, here returns default. Thus causing here to become invalid. Second, here returns the processing of the entire game, rather than the current camera's processing. The combination of these two points produces this BUG. |
The default setting maybe confused, remove it is ok. |
You can make each camera have its own post processing by simply deleting the default. I've tested it in a custom engine. |
There is still a bug regarding post processing at this stage. It will cause the Android to show a white screen. I still don't know the reason. I will make a demo for you |
This demo is dual camera + dual post processing. One is bloom and the other is blur, any mixed colors rendered on screen. Everything works fine on web. After building Android, it will work normally for the first time or first few restarts. However, subsequent app launches will show a very unique white screen phenomenon. To make this demo work properly, make sure default is deleted in the custom engine. Similar to this PR . Otherwise the effect will be messy. No clue yet for the Android white screen issue. This demo can also be used to verify whether the default export causes the filtering to fail. I've raised this issue on GitHub and look forward to your feedback on it. |
Which backend did you use? gles or vulkan? |
gles |
Which device did you test? Can you try the vulkan backend, vulkan can be more stable. |
Let me try ,My device is a Huawei Mate 10. |
I have tried vivo s9, hornor 30 and oneplus 11. Maybe it's a device related problem? |
I deleted the cache and it seems the problem no longer occurs, so let's just leave it at that. Thanks again |
Regarding the issue I had in the previous demo where I needed to set the render texture size to be the same as the screen myself when using camera render textures, I suggest the engine help the user do this when the width and height of the render texture are both 0. Or you can add a setting for this in the render texture inspector. Of course it also works without adding this and letting users set it themselves, it's just more troublesome. This is just a suggestion. |
Thanks for the suggestion, we will consider it. |
Cocos Creator version
3.8
System information
ALL
Issue description
There are 2 issues, they are:
In the editor, when the global property of the post processing set on the screen is turned off, it is found that it cannot be turned off, and it is not persisted to the scene file. Restarting or switching scenes, the global property is always true.
Although the post processing part is added to the passContext in line 178 of the builder, when rendering later, it does not filter out the post processing flows that do not belong to the camera that is currently being rendered. This will lead to rendering errors, as the camera incorrectly uses post processing that does not belong to itself. renderer
I'm not sure if setting-pass is used to filter out illegal post processing, but forcing it to return default here will cause the filtering to fail.
Relevant error log output
No response
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: