Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - iTris666

Pages: [1]
1
Support / Mixing a 2D mesh with sprites
« on: June 11, 2012, 05:51:04 pm »
Hi,

I'm trying to mix a 2D procedural mesh (on all vertices z == 0 ) and sprites. I try to have some sprites on front then my mesh then a lot of sprites behind.

The problem is that my mesh is always in front of all sprites even if the z value would place it between sprites.

First I tried with my own shader : a very simple shader with light off and blending a constant color.
Since it didn't work I tried with tk2D own BlendVertexColor shader, but the result is the same.

Strangely enough I can order 2 of my meshes by using the z value of their transform ( like I do with the sprites ), but the sprite will never be drawn on front of my mesh.

The sprites I use are either tk2DSprites or tk2DAnimatedSprites ( no sprite batcher ).

Any ideas on how to have my mesh z ordering respected ?

Pages: [1]