Creating reflections and shadows using stencil buffers