Page 2 of 2

Re: Object isolation effect [SOLVED]

Posted: Tue Apr 15, 2014 12:28 pm
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.

Re: Object isolation effect [SOLVED]

Posted: Tue Apr 15, 2014 1:39 pm
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.

Re: Object isolation effect [SOLVED]

Posted: Tue Apr 15, 2014 2:16 pm
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.

Re: Object isolation effect [SOLVED]

Posted: Tue Apr 15, 2014 2:30 pm
by TheTaulier
Problem solved. Once again, thanks for the quick answer !