Added velocity buffer to deferredLighting.qml

This commit is contained in:
Olivier Prat 2018-01-26 15:05:46 +01:00
parent 1aa41918d0
commit 9cb5c95fe3
2 changed files with 2 additions and 2 deletions

View file

@ -132,8 +132,7 @@ vec3 evalEyePositionFromZeye(int side, float Zeye, vec2 texcoord) {
vec3 evalEyePositionFromZdb(int side, float Zdb, vec2 texcoord) {
// compute the view space position using the depth
vec3 clipPos;
clipPos.xy = texcoord.xy * 2.0 - 1.0;
clipPos.z = Zdb * 2.0 - 1.0;
clipPos.xyz = vec3(texcoord.xy, Zdb) * 2.0 - 1.0;
vec4 eyePos = frameTransform._invProjection[side] * vec4(clipPos.xyz, 1.0);
return eyePos.xyz / eyePos.w;
}

View file

@ -200,6 +200,7 @@ Rectangle {
ListElement { text: "Debug Scattering"; color: "White" }
ListElement { text: "Ambient Occlusion"; color: "White" }
ListElement { text: "Ambient Occlusion Blurred"; color: "White" }
ListElement { text: "Velocity"; color: "White" }
ListElement { text: "Custom"; color: "White" }
}
width: 200