Tags

, , , , , , , , , , , , ,

Crackers! That’s what I forgot.

‘Sorry?’ said Arkwood, shaving a carrot.

‘Crackers. I forgot to buy…’

I asked him what he was doing to the carrot.

‘Nothing,’ he replied, defensively. ‘It is a simple Turkish, with a razor.’

Anyway, take a look at this. Put on the Oculus Rift virtual reality headset and feast your eyes on my OpenGL multiple lights. Learn OpenGL article Multiple lights has the breakdown.

I first apply directional light to my room full of containers, as per my post OpenGL directional light.

The directional light comes from above, leaving the underside of the cubes dark.

Next I add two point lights, as per my post OpenGL point light.

That’s really made an impact on the sides of the containers that are near and facing the point lights.

Finally I flick on a spotlight and go a wandering, as per my post OpenGL spotlight.

The circular light has really caught the side of the cube, courtesy of a flashlight attached to my head.

Bringing all those lights together in the fragment shader pours a ton of atmosphere into the room.

My C++ Microsoft Visual Studio application uses the Oculus SDK for Windows to send the ambient, diffuse and specular components of the Phong lighting model to the Rift.

‘It is a good room to commit blue murder in!’ Arkwood enthused, making stabbing motions with his whittled carrot.

‘What a waste!’ I cried, ‘Look how much peeling you’ve shaved off.’

Arkwood just smiled, jabbing the orange veg stick ever closer to my eyeball. It called for a sturdy knee, and a firm connection with his meat and two veg.

Ciao!

Advertisements