custommods

This commit is contained in:
samsonsin
2025-05-29 23:31:29 +02:00
committed by samsonsin
parent 29b5acd552
commit cec1be0c4f
799 changed files with 19536 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
// This mipLevel is corrected to give the result for 16x textures regardless of the actual texture resolution
vec2 mipx = dcdx / vTexCoordAM.zw * 16.0;
vec2 mipy = dcdy / vTexCoordAM.zw * 16.0;
float delta = max(dot(mipx, mipx), dot(mipy, mipy));
float miplevel = max(0.5 * log2(delta), 0.0);