2D Toolkit Forum

2D Toolkit => Support => Topic started by: TekuStudios on November 03, 2014, 07:13:42 pm

Title: Transparent shaders and GrabPass
Post by: TekuStudios on November 03, 2014, 07:13:42 pm
Hi everyone,

We are trying to handle a semitransparent plane to work with 2d toolkit sprites (but the same happens with unity transparent/diffuse shader). In the example, the plane “cut” the sprites whatever we do. We are using a shader that “GrabPasses” the current scene using the proper Queue=”Transparent+1” to get painted the sprites in _GrabTexture. Later, we “mix” that texture with other process to make a water “feel” such as distortion and so on. (No Zwrite on flags)

We have tried out changing GrabPass tags, using a pre Pass with a “green” texture with 0.5f alpha value to check what is being rendered in _GrabTexture with GrabPass and this is the result:

(http://i61.tinypic.com/14474b9.jpg)

(http://i61.tinypic.com/s6kffr.jpg)

As you can see, the Sprite, transparent shader is not correctly drawn(the green plane is semitransparent and doesn't draw a piece of the heart).

If anyone could help us, we'll really appreciate it. Love is in the air as you can see.

Thank you!