Skip to content

Commit b78dc90

Browse files
authored
Merge pull request CommunalHelper#259 from earthwise01/fg-cloudscape
Allow adding cloudscapes as foreground stylegrounds
2 parents db7b270 + 05a22ba commit b78dc90

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Loenn/effects/cloudscape.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local cloudscape = {}
22

33
cloudscape.name = "CommunalHelper/Cloudscape"
44
cloudscape.canBackground = true
5-
cloudscape.canForeground = false
5+
cloudscape.canForeground = true
66

77
cloudscape.fieldInformation = {
88
bgColor = {

src/Backdrops/Cloudscape/Cloudscape.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ public override void Render(Scene scene)
469469
Engine.Graphics.GraphicsDevice.SetRenderTarget(buffer);
470470
Engine.Graphics.GraphicsDevice.Clear(sky);
471471
Engine.Graphics.GraphicsDevice.BlendState = BlendState.AlphaBlend;
472+
Engine.Graphics.GraphicsDevice.RasterizerState = RasterizerState.CullNone;
472473

473474
EffectParameterCollection parameters = CommunalHelperGFX.CloudscapeShader.Parameters;
474475

@@ -505,8 +506,7 @@ public override void Render(Scene scene)
505506
// present onto RT
506507
Engine.Instance.GraphicsDevice.SetRenderTarget(rt);
507508

508-
BackdropRenderer renderer = level.Background;
509-
renderer.StartSpritebatch(blend);
509+
Renderer.StartSpritebatch(blend);
510510
switch (ZoomBehavior)
511511
{
512512
case ZoomBehaviors.StaySame:
@@ -516,7 +516,7 @@ public override void Render(Scene scene)
516516
Draw.SpriteBatch.Draw(buffer, Vector2.Zero, Color.White * BufferAlpha);
517517
break;
518518
}
519-
renderer.EndSpritebatch();
519+
Renderer.EndSpritebatch();
520520
}
521521

522522
public override void Ended(Scene scene)

0 commit comments

Comments
 (0)