captainkidd5 / InstancedShader

A simple instanced shader for Monogame with integrated lighting and fog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This shows the bread and butter for model instancing in Monogame.

It's an incomplete example as much of the other code is fairly dispersed across my main game project, but this shows the important logic and should help get you started.

showcase

It includes support for up to 20 lights (specular/ambient) and fog.

Fog is currently pretty scuffed so I strongly welcome pull requests to get it ironed out!

Note that you will need to create a content pipeline extensions and use the code from InstancedModelProcessor.cs Then, when adding your assets in the content pipeline choose .FBX importer and the InstancedModelProcessor for the processor.

About

A simple instanced shader for Monogame with integrated lighting and fog

License:MIT License


Languages

Language:C# 56.4%Language:HLSL 43.6%