-
Notifications
You must be signed in to change notification settings - Fork 83
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
Fix alpha screenshots with certain post processing effects #183
Fix alpha screenshots with certain post processing effects #183
Conversation
Why have it in KK at all if it will always fail since that file doesn't exist in Unity 5.6? You could exclude it like in EC. You don't need to reference the assembly at all if it might not exist. Instead you could use Type.GetType to get the types to disable instead and see if you get a null or not. |
If you use the PostProcessing Plugin on KK the runtime will exist though, KK and EC just don't ship with the runtime. I'm also unaware of any PostProcessing plugins on EC so I excluded it completely there. I also tried using Considering this code only runs once you make a screenshot, this seemed like the most simple and readable solution |
I see, didn't know about the KK plugin including it. I'll take a look at it later to see if I can simplify it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be working fine while being a bit faster and hopefully cleaner. If you can confirm that this version works for you I'll merge the PR.
I confirmed it working on both KK and KKS, both with and without PPE installed (including runtime in KK) and it works without problems. Thanks! |
Certain post processing effects create issues with alpha screenshots (e.g. bloom making the whole screenshot transparent). This PR just extends the functionality that already seems to be there for the in-game effects.
All games except KK and EC come with the post processing runtime by default and this should just work. For KK I added the post processing runtime as a reference so it is able to compile. But the code it setup such that it falls back to the default behavior if the post processing runtime does not exist
For EC I just excluded it at compile time.
I tested it on both KK and KKS, with and without having the runtime.dll manually installed.