Shadows work (?)

This commit is contained in:
andreja6
2018-10-26 19:43:46 -07:00
parent e83a67ade2
commit 948835df98

View File

@@ -1241,12 +1241,7 @@ void Demo::onGraphics(RenderDevice* rd) {
}
*/
rd->setAmbientLightColor(Color3::black());
rd->setDepthTest(RenderDevice::DEPTH_LEQUAL);
rd->disableDepthWrite();
rd->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
rd->setBlendFunc(RenderDevice::BLEND_ONE, RenderDevice::BLEND_ONE);
rd->pushState();
if (GLCaps::supports_GL_ARB_shadow()) {
rd->configureShadowMap(1, lightMVP, shadowMap);
}
@@ -1258,7 +1253,7 @@ void Demo::onGraphics(RenderDevice* rd) {
//((PartInstance*)dataModel->children[0]->children[0])->debugPrintVertexIDs(rd,fntdominant,-cameraController.getCoordinateFrame().rotation);
rd->afterPrimitive();
rd->popState();
if(g_selectedInstances.size() > 0)
{
for(size_t i = 0; i < g_selectedInstances.size(); i++)