Object isolation effect [SOLVED]

Advanced Color Grading for Unity Pro
TheTaulier
Posts: 5
Joined: Wed Mar 12, 2014 4:43 pm

Re: Object isolation effect [SOLVED]

Post by TheTaulier »

- Does only happen with UFPS?
No, I tried with and without every third party tool that I use in my project, and this bug is always there as long as anti-aliasing is used.
- Is this with or without Stereo? (oculus?)
I do not use VR or any specific display.
- Are you using deferred mode?
The bug aformentioned happens with forward lighting. Deferred lighting creates another bug where color grading doesn't work at all.
- Is this on Windows or Mac?
My computer is using Windows 7 64 bits. The project is built in x86.
User avatar
Diogo Teixeira
Posts: 124
Joined: Sat Aug 10, 2013 12:34 am

Re: Object isolation effect [SOLVED]

Post by Diogo Teixeira »

Thanks for the response.

In the meantime, I've stumbled into a similar problem related to Dynamic Masks in DX11. Also only happens when AA is enabled.

Let me get back to you soon.
Research & Development at Amplify Creations
User avatar
Diogo Teixeira
Posts: 124
Joined: Sat Aug 10, 2013 12:34 am

Re: Object isolation effect [SOLVED]

Post by Diogo Teixeira »

OK, I believe I found it.

I wasn't resetting the target RenderTexture at the end of RenderColorMask.OnPostRender(). I assumed (wrongly) that Unity would handle it.

Try adding the following line at the end of RenderColorMask.OnPostRender (in Scripts/RenderColorMask.cs):

Code: Select all

void OnPostRender()
{
	...

	RenderTexture.active = null;
}
This should take care of it. Please let me know if this works for you.

I've attached a package containing this fix and some adjustments to Mask texel offset alignment that might cause other issues.
Attachments
AmplifyColorMaskSample_AAFIX.unitypackage
Fix for AA issues in DX11 and possible other platform/driver combination
Fix for mask texel offset alignment issues
(3.26 KiB) Downloaded 359 times
Research & Development at Amplify Creations
TheTaulier
Posts: 5
Joined: Wed Mar 12, 2014 4:43 pm

Re: Object isolation effect [SOLVED]

Post by TheTaulier »

Problem solved. Once again, thanks for the quick answer !
Post Reply