NeutrinoParticles.V1_2.MonoGame.DX
1.0.6
dotnet add package NeutrinoParticles.V1_2.MonoGame.DX --version 1.0.6
NuGet\Install-Package NeutrinoParticles.V1_2.MonoGame.DX -Version 1.0.6
<PackageReference Include="NeutrinoParticles.V1_2.MonoGame.DX" Version="1.0.6" />
<PackageVersion Include="NeutrinoParticles.V1_2.MonoGame.DX" Version="1.0.6" />
<PackageReference Include="NeutrinoParticles.V1_2.MonoGame.DX" />
paket add NeutrinoParticles.V1_2.MonoGame.DX --version 1.0.6
#r "nuget: NeutrinoParticles.V1_2.MonoGame.DX, 1.0.6"
#:package NeutrinoParticles.V1_2.MonoGame.DX@1.0.6
#addin nuget:?package=NeutrinoParticles.V1_2.MonoGame.DX&version=1.0.6
#tool nuget:?package=NeutrinoParticles.V1_2.MonoGame.DX&version=1.0.6
NeutrinoParticles.V1_2.MonoGame
MonoGame integration for NeutrinoParticles real-time particle effects (format v1.2).
Installation
DirectX (Windows/Xbox desktop):
dotnet add package NeutrinoParticles.V1_2.MonoGame.DX
OpenGL (cross-platform: Linux, macOS, mobile):
dotnet add package NeutrinoParticles.V1_2.MonoGame.GL
The core runtime (NeutrinoParticles.V1_2) is installed automatically as a dependency.
Choosing DX or GL
Pick one package for your build:
NeutrinoParticles.V1_2.MonoGame.DX— forMonoGame.Framework.WindowsDXprojects (Windows / Xbox desktop). Renders particles from a data texture read in the vertex shader (no per-frame CPU geometry).NeutrinoParticles.V1_2.MonoGame.GL— forMonoGame.Framework.DesktopGLprojects (Linux, macOS, mobile). Uses a vertex-attribute path for wider device support.
Both expose the same NeutrinoParticles.MonoGame API — your game code is identical either way. Match the package to the MonoGame framework your project already references.
Compatibility: target frameworks net452, netcoreapp3.1, net8.0-windows; built against MonoGame 3.8.0.1641.
Requirements
CS1.2 requires GraphicsProfile.HiDef — it uses float vertex attributes and a
32-bit index buffer, which are HiDef-only. Set the profile on your
GraphicsDeviceManager before the first frame; otherwise creating the Context
throws with a clear message.
public Game1()
{
var graphics = new GraphicsDeviceManager(this);
graphics.GraphicsProfile = GraphicsProfile.HiDef; // required by CS1.2
// ...
}
The default MonoGame project template uses GraphicsProfile.Reach, so this line
is easy to miss — the effect fails to initialize until you switch to HiDef.
Export Target in Editor
In the NeutrinoParticles Editor, set the export target to C# v1.2.
After export you get a .cs file (e.g. MyEffect.cs) containing the effect model class. Add this file to your C# project.
Quick Start
In your Game class:
public class Game1 : Game
{
private NeutrinoParticles.MonoGame.Context neutrinoContext_;
private NeutrinoParticles.MonoGame.ParticleEffect effect_;
protected override void LoadContent()
{
neutrinoContext_ = new NeutrinoParticles.MonoGame.Context(
GraphicsDevice,
texturesBasePath: "particles/",
generateNoise: true
);
var effectModel = new NeutrinoParticles.MonoGame.ParticleEffectModel(
neutrinoContext_,
new NeutrinoParticles.Effect_MyCoolEffect(),
Content
);
effect_ = new NeutrinoParticles.MonoGame.ParticleEffect(
effectModel,
position: new Vector3(400, 300, 0)
);
}
protected override void Update(GameTime gameTime)
{
effect_.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
effect_.Draw();
}
protected override void UnloadContent()
{
neutrinoContext_?.Shutdown();
}
}
Context Options
The Context constructor accepts:
new NeutrinoParticles.MonoGame.Context(
GraphicsDevice graphicsDevice,
string texturesBasePath = "", // prefix prepended to texture names referenced by exported effects
bool generateNoise = false, // build turbulence noise on construction (needed by effects that use it)
bool axisYGoesUp = false, // set true if your app's Y axis goes up (default: Y goes down)
bool useInstancing = false // GL only — see below
);
texturesBasePath— prepended to every texture path baked into the exported effect. Point it at where those textures live for yourContentManager(e.g."particles/"). It is a name prefix, not a filesystem path.useInstancing(GL backend only) — chooses how quad corners reach the GPU:false(default) — X4-replication: each particle record is expanded to 4 vertices on the CPU. Proven robust on stock DesktopGL.true— instancing: one shared 4-corner buffer + a per-instance record stream (DrawInstancedPrimitives), less vertex bandwidth. Opt-in until per-backend GL reliability is confirmed, so try it and verify on your target devices.
The DX backend ignores
useInstancing— it always uses the data-texture path.
Common Issues
- Crash on
Contextcreation (HiDef required): SetGraphicsDeviceManager.GraphicsProfile = GraphicsProfile.HiDefbeforeApplyChanges(). The default template usesReach, which CS1.2 does not support (see Requirements). - No particles visible: Check that the export target in the editor is set to C# v1.2. Verify
texturesBasePathpoints to the correct textures directory in your Content pipeline. - Turbulence not working: Set
generateNoise: truewhen creating the context.
HDR Bloom (optional add-on)
Add a scene-preserving HDR glow that matches the editor preview with the
NeutrinoParticles.V1_2.MonoGame.Bloom.DX / .GL add-on:
render the effect into an HDR RenderTarget2D, then ProcessBloom + RenderResult to the
backbuffer. Only particle colour above 1.0 glows. Requires GraphicsProfile.HiDef.
Documentation
Full documentation at neutrinoparticles.com.
License
Copyright (c) Yurii Miroshnyk. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.1 is compatible. |
| .NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.1
- MonoGame.Framework.WindowsDX (>= 3.8.0.1641)
- NeutrinoParticles.V1_2 (>= 1.1.0)
-
.NETFramework 4.5.2
- MonoGame.Framework.WindowsDX (>= 3.8.0.1641)
- NeutrinoParticles.V1_2 (>= 1.1.0)
-
net8.0-windows7.0
- MonoGame.Framework.WindowsDX (>= 3.8.0.1641)
- NeutrinoParticles.V1_2 (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.