Chapter 01: Getting Started
Prepare your project and get ready
Welcome to the advanced 2D shaders tutorial! The goal of this series is to explore several concepts in MonoGame's 2D graphics capabilities, specifically with respect to shaders.
The Starting Code
This tutorial series builds directly on top of the final code from the Building 2D Games tutorial. It is essential that you start with this project.
Note
You can get the complete starting source code for this tutorial here: Chapter 27 source code from Building 2D Games tutorial
Once you have the code downloaded, open it in your IDE and run the DungeonSlime project to make sure everything is working correctly. You should see the title screen from the previous tutorial.
Project Structure
The solution is currently organized into two main projects:
DungeonSlime: The main game project. This contains our game logic and game-specific content.MonoGameLibrary: Our reusable class library. We will be adding new, generic helper classes here that could be used in any of your future MonoGame projects.
Most of our shader files (.fx) will be created in the Content/effects folder within the DungeonSlime project to start, and later within the MonoGameLibrary for shared effects.
What is Next
Now that our project is set up, we can get to work. The focus for the first several chapters will be to create a workflow for developing shaders in MonoGame. Once we have a hot-reload system, a class to manage the effects, and a debug UI ready, we will carry on and build up 5 effects. The effects will range from simple pixel shaders and vertex shaders up to rendering techniques. As we develop these shaders together, we will build an intuition for how to tackle shader development.
Continue to the next chapter, Chapter 02: Hot Reload.