Jump to content

  • Log In with Google      Sign In   
  • Create Account


Sparse Virtual Textures - Is there a way/hack to save that extra geometry pass?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Sock5   Members   -  Reputation: 162

Like
0Likes
Like

Posted 25 March 2013 - 08:45 AM

The way I understood it, for this rendering technique you need to first draw the scene at a smaller framebuffer(1/10th to 1/20th of the main resolution) where in the pixel shader you only render: mip level, U, V, texture ID, then read it back to CPU, render scene with the info from the previous frame's "small framebuffer" while on another CPU core analyzing this one and streaming + decompressing the required textures for the next frame.However what if you implement heavy hardware tessellation?This means you would be doing tessellation a minimum of 3 times each frame for each mesh(1 for the small framebuffer, 1 for the "main" pass and 1 for the RSM later).I thought about using stream out, but if I want to go crazy like 1 poly per pixel mesh density, the stream out would become a huge bottleneck?Is there some clever way to save an extra geometry pass?


>removed<


Sponsor:

#2 MJP   Moderators   -  Reputation: 10637

Like
0Likes
Like

Posted 25 March 2013 - 10:33 AM

If your level geometry is static and your camera movement is restricted, you can always pre-compute the pages that will be visible for a given camera location.



#3 Vilem Otte   Crossbones+   -  Reputation: 1374

Like
0Likes
Like

Posted 25 March 2013 - 01:17 PM

Actually you *just* need to determine what pages of textures you need, you don't even have to render anything before main scene, and just guess them by distance (this is advantage, when you need to render F.e. stuff behind player (reflective wall?!)) - of course you can use a lot more complicated heuristics to decide which pages you need to load (you can also shoot some rays, etc.). So basically you *don't* need geometry pass.

 

Also using some better heuristics can eliminate problems when you can quickly rotate around, or such - though I know this isn't much of a problem for fast HDD.

 

Of course there are disadvantages, you'll effectively hold data that you don't need for actual (respectively next) frame - so it's a trade-off, you save geometry pass, but you most likely will need more memory to store the data.


Edited by Vilem Otte, 25 March 2013 - 01:18 PM.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com


#4 Pachanoi   Members   -  Reputation: 594

Like
0Likes
Like

Posted 25 March 2013 - 09:37 PM

If you are targeting d3d11, you can store your page visibility list in a RWStructuredBuffer<int>.  All you need is the page ID, which is easy to compute from the UV coords.  In my engine I store this as an array of all pages, and increment the corresponding page index in the pixel shader in the geometry pass.  This also gives you the number of pixels that use each page, which you can use to prioritize the page streaming.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS