Open NuroDev opened 4 years ago
Work on this feature had already begun prior to the projects initial unveiling but still requires some work in order to before it is ready to be used. Further research into how to correctly incorporate the feature into Vision needs to be explored further.
Could be worth researching some existing DirectX based projects on GitHub to see how they incorporate deferred shading. Some examples:
LearnOpenGL breaks it down very well.
The way deferred shading, also known as deferred rendering, works by modifying the render pipeline into 2 stages. The first stage, known as the
geometry pass
will render all the scenes geometric data, such as position data, color/diffuse/albedo data, normals, specular data, etc, and store it in a collection textures called aGBuffer
. ThisGBuffer
is then handed over to the second stage, known as thelighting pass
, where the lighting for the scene is calculated using theGBuffer
data.However, this technique does come with some limitations. Such as transparency/depth issues. As such there are other techniques that combine the standard forward rendering pipeline with deferred shading/rendering.
One such technique is often known as deferred lighting. This adds a 3rd stage to the deferred rendering pipeline that incorperates
material
properties and combines them with the output from the second stagelighting pass
.The diagrams below, provided by both LearnOpenGL & Apple help show the pipeline used to achieve deferred shading/rendering and deferred lighting