Improved Bloom Effect
This commit is contained in:
parent
03d99ea28e
commit
777c2f6256
3 changed files with 7 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ namespace SM.Base.PostEffects
|
||||||
{
|
{
|
||||||
public class BloomEffect : PostProcessEffect
|
public class BloomEffect : PostProcessEffect
|
||||||
{
|
{
|
||||||
private static BezierCurve _defaultCurve = new BezierCurve(Vector2.UnitY, new Vector2(0.32f, 1), new Vector2(0.432f, 0), new Vector2(1,0));
|
private static BezierCurve _defaultCurve = new BezierCurve(Vector2.UnitY, Vector2.Zero, new Vector2(0.2f, 0f), new Vector2(1,0));
|
||||||
|
|
||||||
private const float _defaultTextureScale = .75f;
|
private const float _defaultTextureScale = .75f;
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace SM.Base.PostEffects
|
||||||
private BezierCurve _weightCurve ;
|
private BezierCurve _weightCurve ;
|
||||||
private float[] _weights;
|
private float[] _weights;
|
||||||
|
|
||||||
public int Iterations = 1;
|
public int Iterations = 8;
|
||||||
public float Threshold = .8f;
|
public float Threshold = .8f;
|
||||||
public float Power = 1;
|
public float Power = 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace SM_TEST
|
||||||
DrawObject2D box = new DrawObject2D();
|
DrawObject2D box = new DrawObject2D();
|
||||||
scene.Objects.Add(box);
|
scene.Objects.Add(box);
|
||||||
|
|
||||||
DrawText text = new DrawText(font, "Text");
|
DrawText text = new DrawText(font, "Test Text");
|
||||||
text.Transform.Position.Set(50, 0);
|
text.Transform.Position.Set(50, 0);
|
||||||
text.Transform.Size.Set(2);
|
text.Transform.Size.Set(2);
|
||||||
scene.Objects.Add(text);
|
scene.Objects.Add(text);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,10 @@ namespace SM_TEST
|
||||||
|
|
||||||
public override void Initialization()
|
public override void Initialization()
|
||||||
{
|
{
|
||||||
_bloom = new BloomEffect(hdr: true);
|
_bloom = new BloomEffect(hdr: true)
|
||||||
|
{
|
||||||
|
Threshold = .8f,
|
||||||
|
};
|
||||||
|
|
||||||
MainFramebuffer = CreateWindowFramebuffer();
|
MainFramebuffer = CreateWindowFramebuffer();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue