starting on point shadows

pull/1/head
cosmonaut 2020-10-19 03:02:31 -07:00
parent 896dc6676b
commit 3937004ad4
3 changed files with 34 additions and 13 deletions

2
Kav

@ -1 +1 @@
Subproject commit 06e552399600be4b706249bab54740eae4fd8e6b
Subproject commit 0a7698c315655bcabc3ef6d805bd1a4aee944e13

View File

@ -23,8 +23,8 @@ namespace KavTest
public KavTestGame()
{
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
graphics.PreferredBackBufferWidth = 1600;
graphics.PreferredBackBufferHeight = 900;
graphics.PreferMultiSampling = false;
Content.RootDirectory = "Content";
@ -246,17 +246,37 @@ namespace KavTest
// toonShadeRuinsModel
// ));
for (var i = 0; i < 1; i++)
{
var start = RandomHelper.RandomVector3(-5, 5);
var lightEntity = WorldBuilder.CreateEntity();
WorldBuilder.SetComponent(
lightEntity,
new Transform3DComponent(
new Transform3D(
new Vector3(0, 3, 3),
Quaternion.Identity,
new Vector3(0.1f, 0.1f, 0.1f)
)
)
);
WorldBuilder.SetComponent(
lightEntity,
new PointLightComponent(Color.Blue, 1000f)
);
WorldBuilder.SetComponent(
lightEntity,
new ModelComponent(cubeModel)
);
WorldBuilder.SendMessage(new LightBulbSpawnMessage(
new Transform3D(start.ToXNAVector(), Quaternion.Identity, new Vector3(0.1f, 0.1f, 0.1f)),
RandomHelper.RandomColor(),
1f,
RandomHelper.RandomLoop(start, -15, 15, 3, 10)
));
}
// for (var i = 0; i < 1; i++)
// {
// var start = RandomHelper.RandomVector3(2, 5);
// WorldBuilder.SendMessage(new LightBulbSpawnMessage(
// new Transform3D(start.ToXNAVector(), Quaternion.Identity, new Vector3(0.1f, 0.1f, 0.1f)),
// RandomHelper.RandomColor(),
// 5f,
// RandomHelper.RandomLoop(start, 2, 5, 3, 10)
// ));
// }
var ambientLightEntity = WorldBuilder.CreateEntity();

View File

@ -143,6 +143,7 @@ namespace KavTest.Renderers
camera,
ModelTransforms,
AmbientLight,
PointLights,
DirectionalLight(),
ReadComponent<SkyboxComponent>().Skybox
);