A downloadable Shader

Download NowName your own price

One in a while, one of the technical artists who I know will mention a shader that can automatically place snow, etc on the top-facing sides of rocks and buildings and stuff. So I decided to do it in GameMaker!

Supply a secondary texture (for snow, moss, whatever) to draw onto the 3D model, as well as a direction - snow will probably go on the top of a top of the model, while moss would go on the side - and draw using the shader. It's pretty simple. If you want to use it with another shader, like lighting, it's pretty easy to plug into your existing code.

What's Included

  • A shader
  • A demo
  • A demo for the Raspberry Pi (because of course I would)
  • The code for the demo

Vertex Formats

The shaders expect a 36-byte vertex format defined with a 3D position, a 3D normal, a 2D texture coordinate, and a 4D color. If your game builds vertex buffers with a different format, you will need to edit the attribute list in each shader. I won't do this for you; that's on you. Generally speaking, position/normal/texture/color is sufficient for just about everything and if you're using a vertex format besides that you probably already know to watch out for that.

How This Works

Dot products. Dot products make the world go 'round.




  • This probably would have been named "Penguin" if I hadn't already decided to use that for something else last year


N/A this time.


can be found here.


  • The chicken walking sprite was created by @alemunin
  • The rock meshes and snow texture in the demo were created by polyhaven.com
  • The moss texture was created by p0ss on opengameart.org
  • The skybox in the demo was created by Spiney
  • The iconigraphy is based on Snow by Loritas Aventura from the Noun Project
  • Download

    Download NowName your own price

    Click download now to get access to the following files:

    snowysnow.yymps 12 kB
    SnowySnowDemo.zip 8 MB
    SnowySnowDemo.yyz 6 MB
    SnowySnowDemoRaspi.zip 8 MB

    Leave a comment

    Log in with itch.io to leave a comment.