Tune mip levels selection

This commit is contained in:
Patrick Nicolas
2024-09-11 23:41:10 +02:00
parent 50747d8fd4
commit 9344c6c012
3 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -38,7 +38,8 @@ float foveate(float a, float b, float scale, float c, float x) {
}
float foveate_lod(float a, float b, float scale, float c, float x) {
return max(0, log2(1 / (cos(a * x + b) * cos(a * x + b))));
// derivate foveation and add a bias
return max(0, log2(1 / (cos(a * x + b) * cos(a * x + b)) - 0.5));
}
void main()