deferred rendering

pull/1/head
cosmonaut 2020-08-22 18:31:59 -07:00
parent bf6b249b51
commit 6c49a46a57
3 changed files with 39 additions and 9 deletions

2
Kav

@ -1 +1 @@
Subproject commit cc491f1f5fd8e76c6277eac674a63b9ce42f6af8
Subproject commit 7d058402772ccdb2b9ac9d0879f9552ed70400bf

View File

@ -79,6 +79,36 @@ namespace KavTest
300f
));
WorldBuilder.SendMessage(new LightBulbSpawnMessage(
new Transform3D(new Vector3(5, 2, -5)),
Color.Blue,
300f
));
WorldBuilder.SendMessage(new LightBulbSpawnMessage(
new Transform3D(new Vector3(-5, -2, -5)),
Color.Red,
300f
));
WorldBuilder.SendMessage(new LightBulbSpawnMessage(
new Transform3D(new Vector3(-5, 2, 5)),
Color.Yellow,
300f
));
WorldBuilder.SendMessage(new LightBulbSpawnMessage(
new Transform3D(new Vector3(-5, 2, -10)),
Color.Orange,
300f
));
WorldBuilder.SendMessage(new LightBulbSpawnMessage(
new Transform3D(new Vector3(-10, 2, -5)),
Color.CornflowerBlue,
300f
));
var directionalLightEntity = WorldBuilder.CreateEntity();
WorldBuilder.SetComponent(directionalLightEntity, new Transform3DComponent(
new Transform3D(

View File

@ -95,20 +95,20 @@ namespace KavTest.Renderers
// );
// }
Renderer.Render(
Renderer.DeferredRender(
camera,
ModelTransforms,
PointLights,
DirectionalLights
);
foreach (var directionalLight in DirectionalLights)
{
Renderer.DepthRender(
ModelTransforms,
directionalLight
);
}
// foreach (var directionalLight in DirectionalLights)
// {
// Renderer.DepthRender(
// ModelTransforms,
// directionalLight
// );
// }
}
}
}