Jump to content

Sprite and shader help...


Recommended Posts

Im having issues with a custom shader and what I want to do with it. Let me explain.


I'm trying to use a shader to draw my very simple sprites, but have not been able to get things working right.


First, my game is 800x600.  The sprite is nothing (ex: test = game.add.sprite(0, 0); ). I set a width and height on it. Then I add a filter.


The filter draws a cell looking object. You can see it and the code here.


What I need is for the "cell" to be where the sprite is and the size of the sprite. How can I do this?



After Thoughts... Would it be better to just use an animated sprite? The reason Im using a shader is because at certain points of the game, I would need to scale the size of the sprite while keeping the line thickness the same.  is there a better way than using a shader? If so, how?


Thanks for the help.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...