The 2D Game: Tilemap shader tutorial video

Channel:
Subscribers:
675
Published on ● Video Link: https://www.youtube.com/watch?v=mjjIN-bRGXw



Category:
Tutorial
Duration: 0:30
4,177 views
8


This video shows the result generated by the Tilemap Shader described in the Tilemap Tutorial series of articles (http://www.the2dgame.com/index?page=articles&ref=ART4).

The effect shown on this video is a simple Tilemap drawn using one single rectangle primitive on the screen: The entire tilemap decoding, tile texture selection, drawing, is performed by the pixel shader.

This particular example just uses a small set of ugly 16x16 textures, but it would work as well for large detailed textures.

The same effect could be achieved in software (example: using SDL) at a serious CPU and memory bandwidth cost, or in traditional GPU way using batches of triangles but that would still not be as efficient: Assuming your graphic card has a basic shader support you can basically render a full tilemap on screen at virtually no CPU or GPU cost at all, leaving you with plenty of resources for the actual game play and effects.

The full source code is available on the last article of the series :)

You can learn more about The 2D Game at http://www.the2dgame.com







Tags:
tilemap
opengl
shader
tutorial
The 2D Game
game
programming