OpenGL: When you mention forward rendering, does it only apply on how the light is render on a particular object regardless those objects are on screen or off screen?
-
-
Answer:
As I understand it, the term forward rendering is used to distinguish it from deferred rendering. (aka deferred shading) The computations which determine which parts of a surface are visible, are now usually faster and cheaper to perform than the texturing and lighting of those surfaces. Given that cost difference, it makes sense to only apply shading and lighting to those surfaces which appear in the final image, this avoids the wasted effort of lighting surfaces which are obscured. In deferred rendering solutions, an initial rendering pass is performed which resolves what is visible, and collates the positions, normals etc for each pixel in the frame. Having done that, a second pass applies the texturing and lighting to those visible pixels. Forward rendering is the old-school method, where all graphical primitives are rendered out, and shading calculations may be invested in surfaces which might ultimately be obscured at a later point. The right solution depends on the scene. The PowerVR GPUs which are used in mobile devices, implement deferred shading in hardware. The screen is rendered as a set of tiles. And in processing a tile, the processor first resolves visibility, before running fragment shaders on the visible sub-pixels. Don't confuse this with forward ray-tracing, where light rays are traced from the source and may eventually reach the virtual camera.
Glyn Williams at Quora Visit the source
Other answers
Offscreen primitives are irrelevant, both forward and deferred rendering are applied to primitives that are on screen. In the graphics pipeline, the clipping process determines which primitives are on screen and will be rasterized. Offscreen primitives are not rasterized, and fragment shaders are not executed for them. The difference is that deferred rendering only performs the most expensive lighting computations for (opaque) objects that are visible in z-depth. In forward rendering each fragment that passes the z-test will incur the complete lighting computation even if it is later obscured. This is why z-prepass and front to back rendering are important to cull the number of fragments. One motivation for this question may be the process of light selection. For both techniques, the set of lights must be selected. A light may be offscreen, but affects objects on screen. For forward based, lights are selected per primitive. But for deferred, generally the bounding boxes of each light are intersected within the current view frustum. The beauty of deferred is that you don't have to determine which light affects which primitive, since its is applied to the z-nearest per fragment components in the gbuffers. EDIT: I originally wrote that you needed primitive selection for deferred that was incorrect.
Calvin Hsu
Related Q & A:
- How To Get All Components Based On A Schema And From A Particular Publication?Best solution by Tridion
- How To Send a Complex Object to a Rest Web Service?Best solution by codeproject.com
- How to delete a particular line from a file?Best solution by Stack Overflow
- How to sort a particular page in gridview?Best solution by dotnetfox.com
- How do you download photos from a particular album on multiply.com?Best solution by rappler.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.