Support Forum       G3D Web Page     
Classes | Public Member Functions | Public Attributes | List of all members
glsl::DefaultRenderer_OIT_writePixel_glsl Class Reference


This shader corresponds to listing 1 of: More...

Classes

struct  _Texture2D
 

Public Member Functions

float _reconstructCSZ (float d, vec3 clipInfo)
 
Vector2 computeRefractionOffset (float backgroundZ, vec3 csN, vec3 csPosition, float etaRatio)
 Result is in texture coordinates. More...
 
 layout (location=0) out vec4 _accum
 (Ar, Ag, Ab, Aa) More...
 
 layout (location=1) out vec4 _modulate
 (Br, Bg, Bb, D^2) More...
 
 layout (location=2) out vec2 _refraction
 (deltax, deltay) More...
 
float randomVal (vec3 p)
 Not used in the final version. More...
 
void writePixel (vec3 premultipliedReflectionAndEmission, float coverage, vec3 transmissionCoefficient, float collimation, float etaRatio, vec3 csPosition, vec3 csNormal)
 Instead of writing directly to the framebuffer in a forward or deferred shader, the G3D engine invokes this writePixel() function. More...
 

Public Attributes

uniform _Texture2D _depthTexture
 

Detailed Description


This shader corresponds to listing 1 of:

McGuire and Mara, A Phenomenological Scattering Model for Order-Independent Transparency, Proceedings of the ACM Symposium on Interactive 3D Graphics and Games (I3D), Feburary 28, 2016

http://graphics.cs.williams.edu/papers/TransparencyI3D16/

Member Function Documentation

◆ _reconstructCSZ()

float glsl::DefaultRenderer_OIT_writePixel_glsl::_reconstructCSZ ( float  d,
vec3  clipInfo 
)
inline

◆ computeRefractionOffset()

Vector2 glsl::DefaultRenderer_OIT_writePixel_glsl::computeRefractionOffset ( float  backgroundZ,
vec3  csN,
vec3  csPosition,
float  etaRatio 
)
inline

Result is in texture coordinates.

◆ layout() [1/3]

glsl::DefaultRenderer_OIT_writePixel_glsl::layout ( location  = 0)

(Ar, Ag, Ab, Aa)

◆ layout() [2/3]

glsl::DefaultRenderer_OIT_writePixel_glsl::layout ( location  = 1)

(Br, Bg, Bb, D^2)

◆ layout() [3/3]

glsl::DefaultRenderer_OIT_writePixel_glsl::layout ( location  = 2)

(deltax, deltay)

◆ randomVal()

float glsl::DefaultRenderer_OIT_writePixel_glsl::randomVal ( vec3  p)
inline

Not used in the final version.

◆ writePixel()

void glsl::DefaultRenderer_OIT_writePixel_glsl::writePixel ( vec3  premultipliedReflectionAndEmission,
float  coverage,
vec3  transmissionCoefficient,
float  collimation,
float  etaRatio,
vec3  csPosition,
vec3  csNormal 
)
inline

Instead of writing directly to the framebuffer in a forward or deferred shader, the G3D engine invokes this writePixel() function.

This allows mixing different shading models with different OIT models.

Member Data Documentation

◆ _depthTexture

uniform _Texture2D glsl::DefaultRenderer_OIT_writePixel_glsl::_depthTexture

documentation generated on Wed Nov 24 2021 08:02:03 using doxygen 1.8.15