Support Forum G3D Web Page |
This is designed to read from a G3D-style velocity (optical flow) buffer.
More...
Public Member Functions | |
float | cone (float dist, float r) |
float | cylinder (float dist, float r) |
float | fastCone (float dist, float invR) |
float | hash (int2 c) |
Computes a pseudo-random number on [0, 1] from pixel position c. More... | |
void | main () |
float3 | readAdjustedNeighborhoodVelocity (int2 C, out float r) |
NeighborMax[C] from the paper. More... | |
float3 | readAdjustedVelocity (int2 C, sampler2D sampler, out float r) |
Called from readAdjustedVelocity() and readAdjustedNeighborhoodVelocity() More... | |
float3 | readAdjustedVelocity (int2 C, out float r) |
V[C] in the paper. More... | |
float | softDepthCompare (float depth_A, float depth_B) |
0 if depth_A << depth_B, 1 if depth_A >> z_depth, fades between when they are close More... | |
float | softZCompare (float z_A, float z_B) |
Public Attributes | |
uniform sampler2D | colorBuffer |
No guard band. More... | |
uniform sampler2D | depthBuffer |
Typical hyperbolic depth buffer: close values are greater than distant values. More... | |
uniform float | exposureTime |
In fraction of frame duration. More... | |
const float | HALF_PIX = 0.5 |
float2 | jitter |
Amount on [-0.5, 0.5] to randomly perturb samples by at each pixel. More... | |
uniform sampler2D | neighborMinMax_buffer |
Uses the same encoding as SS_POSITION_CHANGE but has three channels. More... | |
uniform sampler2D | randomBuffer |
32x32 tiled random numbers More... | |
out float3 | resultColor |
uniform sampler2D | SS_POSITION_CHANGE_buffer |
Unprocessed differences between previous and current frame in screen space. More... | |
uniform vec4 | SS_POSITION_CHANGE_readAddSecond |
uniform vec4 | SS_POSITION_CHANGE_readMultiplyFirst |
uniform ivec2 | trimBandThickness |
This is designed to read from a G3D-style velocity (optical flow) buffer.
For performance, you could just write out velocity in the desired format rather than adjusting it per texture fetch.
|
inline |
|
inline |
|
inline |
|
inline |
Computes a pseudo-random number on [0, 1] from pixel position c.
|
inline |
NeighborMax[C] from the paper.
|
inline |
Called from readAdjustedVelocity() and readAdjustedNeighborhoodVelocity()
(xy) is the velocity, z is the minimum blur radius in the tile for neighbor velocity and zero for expressive motion.
V[C] in the paper.
v = half-velocity vector r = magnitude of v
|
inline |
0 if depth_A << depth_B, 1 if depth_A >> z_depth, fades between when they are close
|
inline |
uniform sampler2D glsl::MotionBlur_gather_pix::colorBuffer |
No guard band.
uniform sampler2D glsl::MotionBlur_gather_pix::depthBuffer |
Typical hyperbolic depth buffer: close values are greater than distant values.
Guard band.
uniform float glsl::MotionBlur_gather_pix::exposureTime |
In fraction of frame duration.
const float glsl::MotionBlur_gather_pix::HALF_PIX = 0.5 |
float2 glsl::MotionBlur_gather_pix::jitter |
Amount on [-0.5, 0.5] to randomly perturb samples by at each pixel.
uniform sampler2D glsl::MotionBlur_gather_pix::neighborMinMax_buffer |
Uses the same encoding as SS_POSITION_CHANGE but has three channels.
No guard band.
uniform sampler2D glsl::MotionBlur_gather_pix::randomBuffer |
32x32 tiled random numbers
out float3 glsl::MotionBlur_gather_pix::resultColor |
uniform sampler2D glsl::MotionBlur_gather_pix::SS_POSITION_CHANGE_buffer |
Unprocessed differences between previous and current frame in screen space.
Guard band.
uniform vec4 glsl::MotionBlur_gather_pix::SS_POSITION_CHANGE_readAddSecond |
uniform vec4 glsl::MotionBlur_gather_pix::SS_POSITION_CHANGE_readMultiplyFirst |
uniform ivec2 glsl::MotionBlur_gather_pix::trimBandThickness |