R2 Shaders
|
Surface data reconstructed from the G-Buffer. More...
#include "R2GBufferInput.h"
#include "R2LogDepth.h"
#include "R2Normals.h"
#include "R2PositionReconstruction.h"
#include "R2Viewport.h"
#include "R2ViewRays.h"
Go to the source code of this file.
Data Structures | |
struct | R2_reconstructed_surface_t |
Reconstructed surface data, taken from the G-Buffer. More... | |
Functions | |
R2_reconstructed_surface_t | R2_deferredSurfaceReconstruct (const R2_gbuffer_input_t gbuffer, const R2_viewport_t viewport, const R2_view_rays_t view_rays, const float depth_coefficient, const vec2 screen_position) |
Surface data reconstructed from the G-Buffer.
Definition in file R2ReconstructedSurface.h.
R2_reconstructed_surface_t R2_deferredSurfaceReconstruct | ( | const R2_gbuffer_input_t | gbuffer, |
const R2_viewport_t | viewport, | ||
const R2_view_rays_t | view_rays, | ||
const float | depth_coefficient, | ||
const vec2 | screen_position | ||
) |
Perform a full reconstruction of the surface in the given G-Buffer.
The implementation of this function is affected by the following preprocessor defines:
If R2_RECONSTRUCT_DIFFUSE_ONLY
is defined, the function only samples those parts of the geometry buffer that are required for diffuse lighting (specifically depth and normals).
If R2_RECONSTRUCT_DIFFUSE_SPECULAR_ONLY
is defined, the function only samples those parts of the geometry buffer that are required for diffuse lighting (specifically depth, normals, and specular).
Otherwise, the surface is fully reconstructed.
gbuffer | The G-Buffer that will be sampled |
viewport | The current viewport |
view_rays | The current view rays |
screen_position | The current screen position (typically gl_FragCoord.xy ). |
Definition at line 60 of file R2ReconstructedSurface.h.