Improved map rendering, shops, light bugfix, junction boxes wont break as easily

This commit is contained in:
Regalis
2015-07-27 23:45:20 +03:00
parent 4238301ad3
commit 7155f1cef0
37 changed files with 472 additions and 300 deletions

View File

@@ -76,13 +76,11 @@ namespace Subsurface.Lights
foreach (LightSource light in lights)
{
if (light.Color.A < 0.01f || light.Range < 0.01f) continue;
if (!MathUtils.CircleIntersectsRectangle(light.Position, light.Range, viewRect)) continue;
//clear alpha to 1
ClearAlphaToOne(graphics, spriteBatch);
ClearAlphaToOne(graphics, spriteBatch);
if (!MathUtils.CircleIntersectsRectangle(light.Position, light.Range, viewRect)) continue;
//draw all shadows
//write only to the alpha channel, which sets alpha to 0
graphics.RasterizerState = RasterizerState.CullNone;