Shadowy Chickens
Yes I have a chicken obsession.
Implementing shadows is a good way to make a 3D scene stand out, and really feel like the world has some depth to it. Here's a handful of shaders for doing that!
This extension is, once again, based on my Luminous Chickens 3D lighting library, so if you've used that, it should look very similar.
Works on Windows, Linux, OperaGX, HTML5, and probably everything else.
What's Included
- All of the stuff which Luminous Chickens includes: light types, ambient light, fog, etc.
- Editable shadow parameters:
- Shadowmap resolution
- Shadow bias
- Shadow brightness
- Shadow filtering
- Shadowmap edge feathering
- Chickens
- A demo project
Documentation
can be found here.
Performance
Real-time shadowmapping is a bit more expensive than regular 3D lighting, owing to the need for the scene to be rendered from the perspective of the shadowmap. Bear this in mind, as well as the fact that you're allowed to skip rendering fine details to the shadowmap, or render objects at a lower level of detail.
Vertex Formats
Like most 3D-games-in-GameMaker shaders, these 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. (If you're at a level where you know how to use this stuff, that probably won't be too hard for you.)
How They Work
I've made an extensive tutorial series on my YouTube channel about 3D lighting effects in GameMaker. This includes four videos about toon shaders, plus a large number of others.
- Shadowmapping Setup
- Shadowmapping Implementation
- Surface formats make shadowmapping in GameMaker easier
Obviously, these are not beginner-level subjects. These (and others) would also be helpful to watch.
- 3D in GameMaker Studio 2 (full playlist)
- - - - - -
- 3D Directional Lights
- 3D Point Lights
- Fragment Shader Lighting (vs vertex shader)
- 3D Spot Lights
- 3D Spot Lights (advanced stuff)
- Surface Formats in GameMaker
Price
It's $5. If you pledge to (in past or present tense) my Patreon for a lifetime total of $5 or more, send me a message there and I'll give you a key.
If you don't want to pay, you can also learn how to write these things yourself via the YouTube links above - they're free, and probably more useful in the long run.
Repository
N/A this time.
Credits
- The chicken icon and walking sprite was created by @alemunin
- The skybox and 3D meshes in the demo were created by the excellent synty studios
- The planet image maps came from somewhere on NASA's Jet Propulsion Laboratory gallery
Other Relevant Projects
I've made a bunch of other things for 3D in Gamemaker that you might be interested in:
- Collisions
- Basic 3D lighting
- Toon shading
- Terrain editor
- 3D model converter
- Better D3D emulation
Purchase
In order to download this shader you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.