1.1.2
New Features
- [GBuffer] Add velocity buffer for usage of motion blur and temporal reprojection. Use
GBuffer#enableTargetTexture4
to enable rendering of velocity buffer, useGBuffer#getTargetTexture4
to get the buffer. In the shader code velocity can be extracted like following:
vec4 texel = texture2D(velocityTex, v_Texcoord);
// If texel has valid velocity info
if (texel.a > 0.0) {
vec2 vel = texel.rg * 2.0 - 1.0;
}