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() public KavTestGame()
{ {
graphics = new GraphicsDeviceManager(this); graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = 1280; graphics.PreferredBackBufferWidth = 1600;
graphics.PreferredBackBufferHeight = 720; graphics.PreferredBackBufferHeight = 900;
graphics.PreferMultiSampling = false; graphics.PreferMultiSampling = false;
Content.RootDirectory = "Content"; Content.RootDirectory = "Content";
@ -246,17 +246,37 @@ namespace KavTest
// toonShadeRuinsModel // toonShadeRuinsModel
// )); // ));
for (var i = 0; i < 1; i++) var lightEntity = WorldBuilder.CreateEntity();
{ WorldBuilder.SetComponent(
var start = RandomHelper.RandomVector3(-5, 5); 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( // for (var i = 0; i < 1; i++)
new Transform3D(start.ToXNAVector(), Quaternion.Identity, new Vector3(0.1f, 0.1f, 0.1f)), // {
RandomHelper.RandomColor(), // var start = RandomHelper.RandomVector3(2, 5);
1f,
RandomHelper.RandomLoop(start, -15, 15, 3, 10) // 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(); var ambientLightEntity = WorldBuilder.CreateEntity();

View File

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