You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
As I said, it's a little hard to explain. Basically we're looking
on a 3D scene that only looks 2D. the shadows aren't 2D shadows
but 3D boxes and plains. The camera is above the scene, looking
down on the ground. Each wall (all the black rectangles in the
game) and door has a 3D box or plain attached to it starting at
the ground, going up beyond the camera. So actually DBPs 3D
functionality is doing all the work that would usually be done
with something like raycasting in a shader.
After DBP renders this 3D scene (with black backdrop and perfectly
white, non-shaded objects) to an image, I use a simple pixel
shader to turn this image into the shadow effect you see in the
game. It's not simply a semi-transparent black overlay though,
as it might seem on the first look - it completely covers the
screen at this point with a rendering of the level *before*
dynamic objects are rendered. Hence you see guards etc. only
when they are in your field of view.
All this also explains why the game has certain problems with
different screen resolutions. In this case the 3D camera
responsible for rendering the shadows needs to be repositioned
to make sure it's FOV is perfectly aligned with the 2D rendering
of the scene. However, it seems as if my attempts to do so were
not successful yet.
Login to post a reply