Add blend modes to renderer.
This commit is contained in:
@@ -74,6 +74,8 @@ public class TestGame : Game
|
||||
|
||||
private void DrawEmitter(ParticleEmitter emitter)
|
||||
{
|
||||
Renderer.BeginBlended(Voile.Rendering.BlendMode.BlendAdd);
|
||||
|
||||
for (int i = 0; i < emitter.Particles.Length; i++)
|
||||
{
|
||||
var particle = emitter.Particles[i];
|
||||
@@ -83,6 +85,8 @@ public class TestGame : Game
|
||||
Renderer.SetTransform(emitter.OriginPosition + particle.Position, Vector2.Zero);
|
||||
Renderer.DrawCircle(16f * particle.Scale, color);
|
||||
}
|
||||
|
||||
Renderer.EndBlended();
|
||||
}
|
||||
|
||||
private ParticleSystem? _particleSystem;
|
||||
|
||||
Reference in New Issue
Block a user