Hello Guest

Author Topic: shader question  (Read 3155 times)

morsix

  • Newbie
  • *
  • Posts: 1
    • View Profile
shader question
« on: December 02, 2013, 04:34:39 am »
I'm new to Unity and 2D Toolkit, and I have a question regarding doing a texture mapped cutout of a sprite.. is it possible to make a black/white "map" of which parts the of the 2d toolkit sprite should draw and be able to apply that as a material?

Anything I try it failing to "stick" when I try and set a material in the collection.. always reverts back to the atlas..

I've never tried anything before so I don't know if I'm going in the right direction or not..

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: shader question
« Reply #1 on: December 02, 2013, 06:17:47 pm »
WRT material in the atlas - that is expected, and required for multiple atlas spanning and multiple material support per atlas. If its for a specific sprite in an atlas, you can try the multiple material feature (http://www.2dtoolkit.com/docs/latest/tutorial/multiple_materials_in_a_sprite_collection.html).

It is possible to do that clipping thing, check this sample here - it doesn't do exactly that (its a rectangular cutout instead), but you could use it as a basis for your experiments.
http://2dtoolkit.com/forum/index.php?topic=1306.0