Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: slookdesign on January 20, 2017, 01:31:03 PM

Title: Custom Shaders Aren't Working with UI Panel Texture Masking
Post by: slookdesign on January 20, 2017, 01:31:03 PM
I have managed to get a custom additive version of "Unlit - Transparent Colored" to clip my sprites properly within a panel using the normal "Soft Clip" method.  My issue is that there are some cases in our project where I need to use Texture Masks for clipping, and sadly the sprites using "Unlit - Transparent Colored Additive" do not clip properly, nor do they seem to use "Blend SrcAlpha One", for the additive blending.

The only modifications that I have made to the 3 custom shaders is changing the name and the two lines with: "Blend SrcAlpha OneMinusSrcAlpha" to "Blend SrcAlpha One" for the additive effect as an overlay on my sprites.  I found the method on this forum.

I am curious if anyone has run into this issue as well?  It is sort of an edge-case.
Title: Re: Custom Shaders Aren't Working with UI Panel Texture Masking
Post by: ArenMook on January 23, 2017, 08:15:24 AM
You need to add a (TextureClip) version for them to be clipped using textures. Just search for that in the project to find the NGUI's shaders to use as an example.
Title: Re: Custom Shaders Aren't Working with UI Panel Texture Masking
Post by: slookdesign on January 24, 2017, 06:14:08 PM
Thank you very much, worked like a charm!