Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 178

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 183

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 184

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 220

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 223

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 235

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 250

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 252

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 257

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 268

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 270

Deprecated: Function create_function() is deprecated in /var/www/laserbrainstudios.com/public_html/forum/Sources/Load.php on line 273

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /var/www/laserbrainstudios.com/public_html/forum/SSI.php on line 172
Laserbrain Studios » Shadows or no shadows?

Laserbrain Studios

Games Forum Blog Contact

Shadows or no shadows?

September 21st, 2011 by Christian Knudsen

I’m currently optimizing the map drawing code for Hostile Takeover‘s isometric engine. It’s basically all about minimizing the amount of tiles and layers that the code has to loop through each frame to check for stuff to draw – and also trying to minimize the amount of texture bindings for OpenGL. Anyway, as part of this, I tried disabling the wall shadows (which I originally added to create an ambient occlusion effect) to see if they had any substantial impact on the time it takes to draw a frame. They don’t really, which didn’t surprise me much, but the test has left me with doubt as to whether or not wall shadows should even be in the game.

The image on the left is with wall shadows, the image on the right is without:

Click to enlarge   Click to enlarge

On one hand, I think the wall shadows make the structures pop a bit more and make everything feel less flat. On the other, I can’t shake the feeling that the wall shadows make it seem as if the walls are floating ever so slightly above the ground. So I can’t decide if I should keep them in or discard them. What do you think?

By the way, the shadow for the “Hensley International” sign is also missing in the right-hand image. That’s just because I completely disabled environment shadows for this test. Stuff like that sign will have shadows – that much I’ve decided on. Of course, it might just be weird if walls don’t have shadows when everything else does…


This post has 3 Comments on the forums.