Hello Guest

Author Topic: Making tk2dsprite be affected by transparent overlay  (Read 3037 times)

arvz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Making tk2dsprite be affected by transparent overlay
« on: October 19, 2014, 03:03:09 pm »
So I've got a tk2dsprite which has a tk2d/BlendVertexColor shader, and over it is a texture on a quad which has transparency that is basically designed to "Darken" the tk2dsprite under it as well as add some other graphical effect, currently I have it on Transparent/Diffuse shader, but no matter what shader I use the tk2dsprite is not being affected by the texture quad overlay at all.

I feel like I need to either use a different shader for the tk2dsprite or the quad, or make a small tweak to the current shaders. I have little understanding of Shaders unfortunately.

Appreciate any advice

Thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Making tk2dsprite be affected by transparent overlay
« Reply #1 on: October 24, 2014, 07:23:18 pm »
you need to make sure teh other sprite is drawn after the bg one. For a darken effect you will need a shader that performs multiply blend.