Jump to content
  • Advertisement
  • entries
    422
  • comments
    1540
  • views
    490901

I cheated

Sign in to follow this  
jollyjeffers

124 views

I solved my Z-Fighting issue by cheating. I got bored of chasing down hacks to solve it properly, so I just removed the Z-Fill pass and got the engine to re-clear the depth buffer for each rendering pass. Works perfectly and it didn't seem to dent the performance.


(click to enlarge)


The above screenshot shows three directional lights (red, green and blue) on the same scene I've used before. Lights are additively combined, but no tone mapping is applied.

Although, one thing to note if you look at the above screenshot - it's using 112mb 928kb 352b of VRAM. Which is kinda ridiculous given that scene.

But it makes for a convenient example of why resource pooling is a good idea. For the sake of keeping the code trivial each of the models is represented by it's own class which contains a private copy of all it's resources. Those 4 containers are identical, yet 4 copies reside in memory. Now that's a bit of a problem when they each occupy over 16mb of VRAM [oh]

I think my tasks for tomorrow might include a better set of models (with smaller textures [lol]) and to allow the lights to be customized. Then I can drop in the HDRI and get something cool looking [grin]
Sign in to follow this  


7 Comments


Recommended Comments

Quote:
Memory virtualization for the win!


Quote:
Graphics cards with more VRAM for the win!


Both??

DX10 is for the former, right?

Share this comment


Link to comment
Quote:
Pipo DeClown for the win!
Only if the clown impresses me with an awesome debug tool thingy [grin]

Quote:
Quote:
Memory virtualization for the win!
Quote:
Graphics cards with more VRAM for the win!
Both??
Why not, in some respects they'd complement each other!

Quote:
DX10 is for the former, right?
Yup, Windows Vista views the GPU as a shared resource, thus you get shared/virtualized memory. Although, it is possible that large-VRAM cards might become a tidy speed up in the same way that adding regular RAM is now. I'd hope it's unlikely, but if a 128mb VRAM card ended up with lots of virtualization/swapping in and out of VRAM then replacing it with a 256/512mb VRAM card might make a big difference simply due to the reduced amount of paging...

Jack

Share this comment


Link to comment
Are you using some kind of normal mapping there..? If so, how're
you calculating the tangent space?

It's nice to see your progress on this, keep it up :)

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!