Hello Guest

Author Topic: Transparent shaders and GrabPass  (Read 3032 times)

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Transparent shaders and GrabPass
« 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:





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!
« Last Edit: November 10, 2014, 10:40:12 am by TekuStudios »
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.