Deferred Chickens
A downloadable shaders
Welcome to what's essentially the culmination of everything related to 3D rendering that I've ever done in GameMaker!
Why?
Deferred rendering ("deferred shading") has some advantages over regular forward rendering in certain games. The main ones are:
- Scenes with a lot of complex, overlapping geometry becomes more efficient to render because lighting is only calculated on objects that are on screen, and not on fragments that would be overdrawn or overshaded during the rendering process
- Point and spot lights can easily be calculated on only the parts of the scene that they affect, meaning you can handle completely silly numbers of them at playable frame rates
Also, it's fun.
What's Included
- Lighting from the three basic light types (directional, point, spot/cone)
- Normal maps
- Specular highlights
- Fog
- Shadows
- Cartoon effects (light quantization, outlines)
- Support for ludicrous numbers of lights
- Support for additional render passes (eg for transparent objects)
Documentation
github documentation tba, there's currently featherdoc comments in all of the scripts; I'll write a sample project soon™
How all of this stuff works
So for those of you who don't know me, I make videos explaining GameMaker stuff. If I were to list out all of the videos relevant to this one the list would be like a hundred items long, so here's the 3D playlist instead. The deferred rendering playlist is particularly important.
Editing the Shaders
If you want to add more materials, you'll want to edit (or duplicate) one of the three main shaders to make things look the way you want:
- shd_cluck_deferred_gbuff: writes data to the geometry buffer. For efficiency purposes, don't do expensive lighting calculations here, but can be useful if you want to apply effects to textures pre-lighting.
- shd_cluck_deferred_lighting: where lighting calculations and accumulation takes place. See the impractical numbers of 3D lights video for more information. You probably don't need to edit this unless you're doing something weird with lights.
- shd_cluck_deferred_material: where all other screen-space effects go: toon quantization, outlines, light blending, other things that don't belong anywhere else.
Price
This one's $20. If you pledge to (in past or present tense) my Patreon for a lifetime total of $20 or more, send me a message there and I'll give you a key.
This asset also contains all of the code for Cartoon Chickens and Shadow Chickens.
You can also hire me to work on this stuff in your game directly.
Alternatively, you can also learn how to write these things yourself via the YouTube links above for free.
Repository
N/A this time.
Credits
- The chicken icon and walking sprite was created by @alemunin
- The skybox and most of the 3D meshes in the demo were created by the excellent synty studios
- The treasure chest is from mastachez on opengameart
Purchase
In order to download this shaders you must purchase it at or above the minimum price of $20 USD. You will get access to the following files: