How to transform BoundingShapes to screen space ?

This topic is 1667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hello .

I am trying to implement a tiled deferred shading pipeline . Where I am sticking is to find out what lights affect a given tile ?

I read a paper that said we have to generate AABBs of lights in screen space . So Let's say I have my AABB in World space .

Should I just transform 8 vertices of the box to screen space and recalculate the AABB in screen space ?

And another question how is it possible to transform a sphere bounding shape to screen space ?

Edited by BlackBrain

Share on other sites

Sorry to post again. For my first question only a yes or no is enough . No one can help me ?

Share on other sites

1) Yes.

2) For the sphere, you may want to calculate its AABB and then goto 1

Share on other sites

Yep the typical solution is to project the corners of the original bounding shape, then take their min/max to get a new 2D bounding rectangle.

As mentioned by Giallanon, it's common to convert spheres into cubes and then just use this method.

Another option is that you can project a 3D sphere to a 2D ellipse, shown here: http://www.iquilezles.org/www/articles/sphereproj/sphereproj.htm

Share on other sites

Hi,

Firstly, could I ask the OP what paper he is reading? I didn't actually find anything on the tile based deferred system whilst hunting around the internet about a year back and it's something I wish I knew more about (past the BF3 powerpoint presentation)

Secondly, I recently did a "Tile Based Forward Renderer" for my final year project at uni and found the book: GPU Pro 4 to be extreamly handy (2 chapters on the system, one from the guys at AMD). Theres also some very useful source code on the AMD website (they call it Forward+).

My system (and the AMD system) did these light (bounding spheres) to tile intersection tests in view space.

Share on other sites

Thanks every one .

Dbowler92 , if u have done tiled forward shading so the deferred one would't be a big deal to you.

1) Generate G-buffer as usual

2) Split the screen into some tiles (for example 32*32 tiles in pixel)

3) Assig every tile the lights that has an effect on it .

4) either draw a fulscreen quad or in compute shader . Foreach tile iterate through all lights assigned to it and perform the lighting using the G-buffer .

You may find this helpful : https://software.intel.com/en-us/articles/deferred-rendering-for-current-and-future-rendering-pipelines

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 11
• 26
• 10
• 11
• 9
• Forum Statistics

• Total Topics
633721
• Total Posts
3013537
×