Game Development Reference
In-Depth Information
for (UserData data : UserData.data) {
shadowBatch.render(data.getInstance());
}
shadowBatch.end();
shadowLight.end();
. . .
// draw the modelBatch
}
@Override
public void dispose() {
. . .
shadowBatch.dispose();
shadowLight.dispose();
}
The shadowLight object is an object of DirectionalShadowLight and shadowBatch
is ModelBatch with a depth shader. The model instances are rendered using
shadowBatch to simulate the shadows near the actual model instances.
Here is the screenshot of the scene with shadows enabled:
 
Search WWH ::




Custom Search