Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef _VELOCITY_CALC_FRAG_
#define _VELOCITY_CALC_FRAG_

layout(binding = TEXTURE_DEPTH_MAP_PREV) uniform sampler2D texDepthMapPrev;

vec2 velocityCalc(mat4 invProj, vec2 screenNormalisedPos) {
    float crtDepth = getDepthValue(screenNormalisedPos);

    float prevDepth = textureLod(texDepthMapPrev, screenNormalisedPos, 0).r;

    vec4 crtPos = positionFromDepth(crtDepth, invProj, screenNormalisedPos);
    vec4 prevPos = positionFromDepth(prevDepth, invProj, screenNormalisedPos);

    vec4 velocity = (crtPos - prevPos) * 0.5f;
    return velocity.xy;
}

#endif //_VELOCITY_CALC_FRAG_

Commits for Divide-Framework/trunk/assets/shaders/GLSL/fragmentAtoms/velocityCalc.frag

Diff revisions: vs.
Revision Author Commited Message
912 Diff Diff IonutCava picture IonutCava Sun 02 Jul, 2017 23:42:39 +0000

[Ionut]
- Add experimental Weighted Blended Order Independed Transparency (ref: http://casual-effects.blogspot.co.uk/2015/03/implemented-weighted-blended-order.html)
— Add per drawbuffer blend
— All translucent renderbin items go via the new OIT 2-step rendering: accumulation and composition
- Make sure we have proper blend enabled for text rendering
- Add a primitive form of PushConstants (unused yet. Emulated via Uniform calls)
- Fix bug with XMLParser not using case insensitive key lookups

809 IonutCava picture IonutCava Tue 10 Jan, 2017 17:16:26 +0000

[IonutCava]
- Move velocity calc to the normal colour pass.
- Optimise glFramebuffer and cleanup RTAttachment class