Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
33381d6
update action to allow deploying other branches
cdhanna Aug 28, 2025
20f2bf8
2dshader tutorial
cdhanna Aug 30, 2025
827d325
Merge branch 'main-monogame'
cdhanna Aug 30, 2025
8499c83
edits to toc
cdhanna Aug 30, 2025
dbfe09a
restore missing chapter 4.
cdhanna Aug 31, 2025
a84df78
pass to remove all contractions
cdhanna Aug 31, 2025
9c4143d
tracking: 2.1
cdhanna Aug 31, 2025
eb08554
tracking 3.1
cdhanna Aug 31, 2025
cb91fd0
tracking 3.2
cdhanna Aug 31, 2025
d623455
tracking 3.3
cdhanna Aug 31, 2025
2b1b856
tracking 3.4
cdhanna Aug 31, 2025
c27012b
tracking 3.5
cdhanna Aug 31, 2025
8093200
tracking 3.6
cdhanna Aug 31, 2025
9dfa203
tacking 3.7
cdhanna Aug 31, 2025
00a7f5e
tracking 3.8
cdhanna Aug 31, 2025
1398f3f
update submodules
cdhanna Sep 1, 2025
aaebb02
struggling with submodules
cdhanna Sep 1, 2025
3fc677a
restore inside submodule
cdhanna Sep 1, 2025
414f8a3
copying premake step from main repo
cdhanna Sep 1, 2025
0c9437d
restore mg stuff
cdhanna Sep 1, 2025
b59721e
Merge branch 'main' into main
SimonDarksideJ Sep 1, 2025
9be7a65
Merge branch 'main' into main
SimonDarksideJ Sep 1, 2025
dafd0fc
Merge branch 'main' into main
SimonDarksideJ Sep 1, 2025
60d7a86
Fixed SpriteBatch xref, no such item in the MonoGame API called "Spri…
SimonDarksideJ Sep 1, 2025
463baec
Merge branch 'main-monogame'
cdhanna Sep 3, 2025
ff17275
adding gif support to docfx file
cdhanna Sep 3, 2025
7cdb033
submodules up to dev
cdhanna Sep 3, 2025
287c92d
build
cdhanna Sep 4, 2025
1068ddf
steal more build stuff from main repo
cdhanna Sep 4, 2025
baf71f0
add public folder to resources
cdhanna Sep 4, 2025
ff26e43
playing around with sitemap
cdhanna Sep 4, 2025
10ef1b4
use rel link
cdhanna Sep 4, 2025
71d61e9
fix toc; add hot reload at runtime message
cdhanna Sep 5, 2025
1336eb4
standardizing media link formatting
cdhanna Sep 5, 2025
7f3045c
extracted snippets and highlighted 02
cdhanna Sep 5, 2025
8ef191c
highlighting 03
cdhanna Sep 5, 2025
a9a0fa8
highlight 04
cdhanna Sep 5, 2025
eaba03a
tracking 4.1
cdhanna Sep 6, 2025
99142e6
tracking 5.1; overview gif
cdhanna Sep 6, 2025
c8a7cca
tracking 5.2; removed restatement of intro
cdhanna Sep 6, 2025
b4faa2c
tracking 5.3; mgcb pic, admonishments, minor typos
cdhanna Sep 6, 2025
f3003f8
tracking 5.4; some highlighting
cdhanna Sep 6, 2025
4d83827
tracking 5.5; note about auto shader parameter
cdhanna Sep 6, 2025
3bf0f4b
tracking 5.6
cdhanna Sep 6, 2025
bc7032d
tracking 5.7; smoothstep admonishment and top bold
cdhanna Sep 6, 2025
a12bc08
more code snippet updates in chapter 5
cdhanna Sep 6, 2025
aeee225
tracking 5.8; gradient textures in horizontal table
cdhanna Sep 6, 2025
215a3bc
more chapter 5 highlighting
cdhanna Sep 6, 2025
dc5e7c7
more code highlights for chapter 5
cdhanna Sep 7, 2025
8570b10
tracking 5.9
cdhanna Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 53 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,67 @@ jobs:
- name: Clone Repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: recursive
fetch-depth: 0

- name: Show submodule status
run: git submodule status

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Setup Android Dependencies
uses: monogame/monogame-actions/install-android-dependencies@v1

- name: Setup DotNet on linux/Windows
if: runner.environment == 'github-hosted' && (runner.os == 'Linux' || runner.os == 'windows')
run: |
dotnet workload install android

- name: Setup DotNet on MacOS
if: runner.environment == 'github-hosted' && runner.os == 'macos'
run: |
dotnet workload install android macos ios

- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1.0.2

- name: Setup Premake5
uses: abel0b/setup-premake@v2.4
with:
version: "5.0.0-beta2"
version: "5.0.0-beta2"

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'

- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@523828e49cd4afabce369c39c7ee6543a2b7a735
with:
vulkan-query-version: 1.3.283.0
vulkan-use-cache: true

- name: Disable Annotations
run: echo "::remove-matcher owner=csc::"

- name: Setup Wine
uses: monogame/monogame-actions/install-wine@v1

- name: Install Fonts
uses: monogame/monogame-actions/install-fonts@v1

- name: Build
working-directory: external/MonoGame
run: |
dotnet run --project build/Build.csproj -- --target=Default
env:
DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT: 1 # android compilation is failing randomly due to downloads from microsofts website during it

- name: Restore dotnet tools
run: dotnet tool restore
Expand All @@ -55,4 +105,5 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

uses: actions/deploy-pages@v4
23 changes: 23 additions & 0 deletions articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,29 @@ items:
href: tutorials/building_2d_games/26_publish_to_itch/index.md
- name: "27: Conclusion and Next Steps"
href: tutorials/building_2d_games/27_conclusion/index.md
- name: 2D Shaders
href: tutorials/advanced/2d_shaders/index.md
items:
- name: "01: Introduction"
href: tutorials/advanced/2d_shaders/01_introduction/index.md
- name: "02: Hot Reload"
href: tutorials/advanced/2d_shaders/02_hot_reload/index.md
- name: "03: The Material Class"
href: tutorials/advanced/2d_shaders/03_the_material_class/index.md
- name: "04: Debug UI"
href: tutorials/advanced/2d_shaders/04_debug_ui/index.md
- name: "05: Transition Effect"
href: tutorials/advanced/2d_shaders/05_transition_effect/index.md
- name: "06: Color Swap Effect"
href: tutorials/advanced/2d_shaders/06_color_swap_effect/index.md
- name: "07: Sprite Vertex Effect"
href: tutorials/advanced/2d_shaders/07_sprite_vertex_effect/index.md
- name: "08: Light Effect"
href: tutorials/advanced/2d_shaders/08_light_effect/index.md
- name: "09: Shadow Effect"
href: tutorials/advanced/2d_shaders/09_shadows_effect/index.md
- name: "10: Next Steps"
href: tutorials/advanced/2d_shaders/10_next_steps/index.md
- name: Console Access
href: console_access.md
- name: Help and Support
Expand Down
31 changes: 31 additions & 0 deletions articles/tutorials/advanced/2d_shaders/01_introduction/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "Chapter 01: Getting Started"
description: "Prepare your project and get ready"
---

Welcome to the advanced 2D shaders tutorial! Before we dive into writing complex effects, this first chapter will make sure you are ready to go. We will get the starting project set up and take a quick look at the technical foundation of how shaders work with MonoGame's `SpriteBatch`.

## 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:
> [The final chapter's source code](https://github.com/MonoGame/MonoGame.Samples/tree/3.8.4/Tutorials/learn-monogame-2d/src/24-Shaders/)

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 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](../02_hot_reload/index.md)
Loading