public void DrawObjShadows(List <Rectangle> objects, LightData pointLight) { GD.SetRenderTarget(ObjShadowTarg); Tuple <GradVertex[], int[]> geom; if (pointLight.LightType == LightType.ROOM) { geom = ShadowGeometry.GenerateObjShadows(objects.Where(x => x.Intersects(pointLight.LightBounds)).ToList(), pointLight); } else { geom = ShadowGeometry.GenerateObjShadows(objects, pointLight); } DrawShadows(geom, 1, pointLight); }
public void DrawObjShadows(List <Rectangle> objects, LightData pointLight) { GD.SetRenderTarget(ObjShadowTarg); if (WorldConfig.Current.UltraLighting) { Draw3DObjShadows(pointLight, true); } else { Tuple <GradVertex[], int[]> geom; if (pointLight.LightType == LightType.ROOM) { geom = ShadowGeometry.GenerateObjShadows(objects.Where(x => x.Intersects(pointLight.LightBounds)).ToList(), pointLight); } else { geom = ShadowGeometry.GenerateObjShadows(objects, pointLight); } GD.BlendState = MaxBlendGreen; DrawShadows(geom, 1, pointLight); } }