mirror of
https://github.com/lubosz/overte.git
synced 2025-08-13 10:59:20 +02:00
Added velocity buffer to deferredLighting.qml
This commit is contained in:
parent
1aa41918d0
commit
9cb5c95fe3
2 changed files with 2 additions and 2 deletions
|
@ -132,8 +132,7 @@ vec3 evalEyePositionFromZeye(int side, float Zeye, vec2 texcoord) {
|
||||||
vec3 evalEyePositionFromZdb(int side, float Zdb, vec2 texcoord) {
|
vec3 evalEyePositionFromZdb(int side, float Zdb, vec2 texcoord) {
|
||||||
// compute the view space position using the depth
|
// compute the view space position using the depth
|
||||||
vec3 clipPos;
|
vec3 clipPos;
|
||||||
clipPos.xy = texcoord.xy * 2.0 - 1.0;
|
clipPos.xyz = vec3(texcoord.xy, Zdb) * 2.0 - 1.0;
|
||||||
clipPos.z = Zdb * 2.0 - 1.0;
|
|
||||||
vec4 eyePos = frameTransform._invProjection[side] * vec4(clipPos.xyz, 1.0);
|
vec4 eyePos = frameTransform._invProjection[side] * vec4(clipPos.xyz, 1.0);
|
||||||
return eyePos.xyz / eyePos.w;
|
return eyePos.xyz / eyePos.w;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,6 +200,7 @@ Rectangle {
|
||||||
ListElement { text: "Debug Scattering"; color: "White" }
|
ListElement { text: "Debug Scattering"; color: "White" }
|
||||||
ListElement { text: "Ambient Occlusion"; color: "White" }
|
ListElement { text: "Ambient Occlusion"; color: "White" }
|
||||||
ListElement { text: "Ambient Occlusion Blurred"; color: "White" }
|
ListElement { text: "Ambient Occlusion Blurred"; color: "White" }
|
||||||
|
ListElement { text: "Velocity"; color: "White" }
|
||||||
ListElement { text: "Custom"; color: "White" }
|
ListElement { text: "Custom"; color: "White" }
|
||||||
}
|
}
|
||||||
width: 200
|
width: 200
|
||||||
|
|
Loading…
Reference in a new issue