You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm learning ScriptableRenderPass and this repository is a great material.
I'd really like to integrate this rendering technique to my game.
But I have a problem when I turned on Volume of Post-process Volume in the Demo scene.
(I also made Vignette --> Intensity to a large value so we can see the difference clearly)
When the distortion is used with post-process, we see the border of the distortion object, even at the position where it is not distorting its background. It looks as though the distortion object is making its background brighter.
I opened the Frame Debugger to investigate.
The 47th event, the _CameraColorTexture is as shown below:
The 73th event, _AfterPostProcessTexture is as follows:
The 75th event, _AfterPostProcessTexture is as follows:
It looks like the border color of the distortion objects come from _CameraColorTexture which is before applying post-process. It is no wonder as the injection point of the feature is set to BeforeRenderingPostProcessing and the DistortionPass.cs takes cameraData.renderer.cameraColorTarget as its source.
I tried various combination of Injection Point of the Distortion Feature and Event of Distortion Render Objects, but didn't get the expected result -- I'd like (1)the transparent red cube is rendered and nicely distorted (2)color of the pixels are post-processed after distortion.
Could you please suggest something so that the distortion works well with post-processing?
The text was updated successfully, but these errors were encountered:
Hi, thank you for expressing your interest and opening the issue. After a little bit of tinkering, the way I got it working is by enabling "Native RenderPass" and adding new injection point for Distortion Texture (AfterRenderingTransparents).
Here is the settings:
I wish I could elaborate more about the solution, but I do not have time to look into it right now. Hope this helps you to continue your research and I will be happy to see and read your findings, if any.
Thank you for the reply. I think I've done what you suggest, but it doesn't work. The distortion objects are all painted black with the setting. (Using Unity 2023)
Hmm... I don't know why it doesn't work. Your setting look correct to me -- blitting the full screen texture just after rendering transparent objects, and render the distortion objects using the texture before post-processing.
Well, probably my game (https://x.com/NekoBeko2024) doesn't necessarily need post-processing that changes color. I'll keep the previous version of the distortion effect.
Hi, I'm learning ScriptableRenderPass and this repository is a great material.
I'd really like to integrate this rendering technique to my game.
But I have a problem when I turned on Volume of Post-process Volume in the Demo scene.
(I also made Vignette --> Intensity to a large value so we can see the difference clearly)
When the distortion is used with post-process, we see the border of the distortion object, even at the position where it is not distorting its background. It looks as though the distortion object is making its background brighter.
I opened the Frame Debugger to investigate.
The 47th event, the _CameraColorTexture is as shown below:
![image](https://private-user-images.githubusercontent.com/535610/369656735-4b1e4a64-70e7-4183-af22-7899b588a8ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODIwMDMsIm5iZiI6MTczOTE4MTcwMywicGF0aCI6Ii81MzU2MTAvMzY5NjU2NzM1LTRiMWU0YTY0LTcwZTctNDE4My1hZjIyLTc4OTliNTg4YThhZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMDAxNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yYTM4M2QzMTJjZjEzZjExNzFmZmEyNGQ1MmRkYjU5ODQ1YWJlOTc3NGE5ZGM5YzA1NmYxYzliZjhhNWFmZGVhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.-WAXcxWu7uutf183LkyU6mQRtsAgLPOvC1o3-HPIERI)
The 73th event, _AfterPostProcessTexture is as follows:
![image](https://private-user-images.githubusercontent.com/535610/369656749-77f054ee-3fb4-417b-bc97-ff8ecfba7209.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODIwMDMsIm5iZiI6MTczOTE4MTcwMywicGF0aCI6Ii81MzU2MTAvMzY5NjU2NzQ5LTc3ZjA1NGVlLTNmYjQtNDE3Yi1iYzk3LWZmOGVjZmJhNzIwOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMDAxNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02Y2U4ZWVlMzUyMTc5NDA1MzE3YmRhZTM3NzFlNjBiZmIzYmVkODM5OGNiMTE5M2JmNjViMWUzZmFhYTI2MTMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.fME8Pg9S9ycFktj0veEc5PGxyHnXQdC_TlacKVEprjw)
The 75th event, _AfterPostProcessTexture is as follows:
![image](https://private-user-images.githubusercontent.com/535610/369657206-167d9968-f88f-4bfa-8c1a-7d3b51f0588b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODIwMDMsIm5iZiI6MTczOTE4MTcwMywicGF0aCI6Ii81MzU2MTAvMzY5NjU3MjA2LTE2N2Q5OTY4LWY4OGYtNGJmYS04YzFhLTdkM2I1MWYwNTg4Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMDAxNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NGU1ZjA0YzVhNTJhYTM3ZmIyZTA0ZjU2MmEzY2MwNmM0OTU4YjgwNzgxNjg2NmQ1YzNjNjk1YjEzZjM1MzIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.8y14BkgbQT-NB3i5kBRJcUrunwqOOBeqzOTpIykUMzk)
It looks like the border color of the distortion objects come from _CameraColorTexture which is before applying post-process. It is no wonder as the injection point of the feature is set to
BeforeRenderingPostProcessing
and the DistortionPass.cs takescameraData.renderer.cameraColorTarget
as its source.I tried various combination of Injection Point of the Distortion Feature and Event of Distortion Render Objects, but didn't get the expected result -- I'd like (1)the transparent red cube is rendered and nicely distorted (2)color of the pixels are post-processed after distortion.
Could you please suggest something so that the distortion works well with post-processing?
The text was updated successfully, but these errors were encountered: