attempted taa support
This commit is contained in:
@@ -80,6 +80,8 @@ ivec3 extractLoDPosition(uvec2 encPos) {
|
||||
}
|
||||
|
||||
|
||||
vec2 taaShift();
|
||||
|
||||
//TODO: add a mechanism so that some quads can ignore backface culling
|
||||
// this would help alot with stuff like crops as they would look kinda weird i think,
|
||||
// same with flowers etc
|
||||
@@ -116,6 +118,9 @@ void main() {
|
||||
vec3 pointPos = (cornerPos+swizzelDataAxis(face>>1,vec3(cQuadSize,0)))*(1<<lodLevel)+origin;
|
||||
gl_Position = MVP*vec4(pointPos, 1.0);
|
||||
|
||||
//Apply taa shift
|
||||
gl_Position.xy *= taaShift()*gl_Position.w;
|
||||
|
||||
|
||||
|
||||
if (cornerIdx == 1) //Only if we are the provoking vertex
|
||||
@@ -182,4 +187,8 @@ void main() {
|
||||
#ifdef DEBUG_RENDER
|
||||
quadDebug = lodLevel;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TAA_PATCH
|
||||
vec2 taaShift() {return vec2(0.0);}
|
||||
#endif
|
||||
Reference in New Issue
Block a user