Add blend modes to renderer.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[ParticleEmitterSettings]
|
||||
|
||||
MaxParticles = 1024
|
||||
EmitRadius = 128
|
||||
EmitRadius = 3
|
||||
LifeTime = 0.5
|
||||
Direction = { x = 0.0, y = 1.0 }
|
||||
LinearVelocity = 980.0
|
||||
|
||||
@@ -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