Jump to content
  • Advertisement
  • entries
  • comments
  • views

Whoa - Out of the Shadows, literally...

Sign in to follow this  


Whoa indeed - I can't believe it's been this long since my last Journal here... I seem to get no time to update anything beyond my own blog these days. Every single minute is spent 'dev-ing'...

Anyway - I thought I'd drop by and throw in my attempts at self-shadowing so far in Dominium. This is actually progress from two weeks ago, I'm having fun trying to capture the latest (and much better) results with FRAPS as I think I've managed to banjax it's interception of the frame buffer - ah well!

I've opted for the shadow-map approach, which I'm sure you're all familiar with - this is all relatively old-hat these days - but for anyone who's not... this viewer renders the ship from the point of view of the light source, and captures just the depth buffer information into a texture. It then makes that depth texture available to the 'proper in-game' shader when it renders the model, and works out whether each pixel in the final image is in shadow or not, by comparing the depth value against the one in the depth texture. If it's greater than the depth-texture, the pixel is lit, and vice versa.

Feel free to take a nose on Dominium's Youtube Channel

You get into a whole world of fun with z-fighting, and of course 'jaggies'... oddly, in this video it's using a 256x256 depth texture and the jaggies don't actually look too bad with a tiny bit of in-shader linear filtering.

Anyway, the current system is hitting a 2048x2048 depth texture (for testing) and using PCF as well. It looks great at a near-distance, but starts looking a little rough when closing in.

I've yet to get this in-game, the logic has been put in - but I'm not getting any depth texture output so I've clearly broken something somewhere... sigh. I just have to track it down!

Another update soon-ish-maybe-later smile.png
Sign in to follow this  

1 Comment

Recommended Comments

Doh! Fixed the youtube URL that I went on to inadvertently break!

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!