attempted taa support

This commit is contained in:
mcrcortex
2025-09-02 22:51:10 +10:00
parent 8384b9f88b
commit ae54c6ebea
7 changed files with 56 additions and 6 deletions

View File

@@ -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