TileMaps and Shaders #3201
Unanswered
FunFetched
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I'm attempting to implement a vertex shader that will modify the vertices of a TileMap according to a 3D projection in order to create a 2.5D effect. While I have it in a working state, I'm having a problem with the number of draw calls. Without the shader, there's just 1, but when I use the shader, my 40x40 TileMap explodes it to over 900! I thought that since I'm not doing anything particulary fancy in my shader (no conditional branching, etc.) and the images are all from the same texture, that this shouldn't be a problem, but maybe I'm misunderstanding something.
My current implementation uses TIleMap's predraw event like so:
I thought this would result in only one additional draw call, since it applies to the "entire" TileMap, but I guess I missed something. Any ideas?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions