Refactor the codebase and add aov support.

This commit is contained in:
2025-12-30 01:20:41 +09:00
parent 400137ee99
commit bfd06bdd11
9 changed files with 265 additions and 122 deletions

View File

@@ -419,7 +419,7 @@ float texture_get_sample_lod(const texture_t* texture, const texture_sample_cont
// 4. Convert to LOD
// LOD 0 = 1 texel. LOD 1 = 2 texels. LOD 2 = 4 texels.
// log2(texels_covered) gives the mip level.
return log2f(texels_covered);
return log2f(texels_covered) * 0.5f;
}
static vec4s nearest_filter(const texture_t* texture, vec2s uv, uint8_t lod)