A downloadable shader

Buy Now$3.99 USD or more

This is a shader asset for GameMaker Studio 2 (GMS2) that transforms a texture according to a perspective transformation, creating an effect similar to old Mode7 SNES games (F-Zero, Super Mario Kart, Chrono Trigger).

Requires intermediate knowledge of GML (GameMaker Language) and GLSL (GL Shader Language) to use effectively!

Features:

  • Commented code: Both shader and objects are fully commented and it should be easy to make wanted adjustments.
  • Includes 2 shaders: one for single texture transformation, one for an infinite plane of the same texture!
  • Includes functions necessary for sprite billboarding to make 

Controls:

  • WASD+QE moves the player object around.
  • X-C changes the height of the horizon
  • V-B changes the horizontal scaling
  • N-M changes the distance of the camera to the point of reference (shown by a car sprite) (not available in demo).
  • F-G changes the scale of the plane. Should be the size of the square texture for 1:1 translation of coordinates (not available in demo).
  • R resets the position of the player and the values of the shader.

If you like this shader or have found an issue with the code, leave a comment or reach out to me on Twitter. Check out my tools and games on itch.io!

Purchase

Buy Now$3.99 USD or more

In order to download this shader you must purchase it at or above the minimum price of $3.99 USD. You will get access to the following files:

Mode7Shader.yyz 43 kB

Download demo

Download
Mode7Example.zip 2 MB

Comments

Log in with itch.io to leave a comment.

can we add Trees? I mean a vertical item?

It should be possible to make billboarded sprites. That's how the car in the demo is made. But to get proper projection, the relative position of an object to the camera would have to be calculated first. There's some code already in the shader package you can buy but I didn't implement any billboarded sprites (other than the player).

(+1)

epic