You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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