Operation Count for Trilinear Blending
a. Lambda calculation: 4 variable shifts, 4 multiplications, 1 comparison operation (‘max’), one Log2 operation.
b. u,v coordinate calculation for each map - 4 variable shifts total (2 for each map). i.e. u = frac(s) << m, where width of texture map is 2m.
c. Calculation of a,b for each texture map. 4 subtractions total(2 for each map) i.e., a = frac(u - 0.5)
d. 8 texel reads total, 4 texel reads of each map for 2x2 average operation
e. Weighted average operation for both texture maps - for each map have 8 multiplications, 3 adds. Done for each R,G, B, A component. Total is
2 maps * 4 Color Components * 8 mults = 64 mults
2 maps * 4 Color Components * 3 adds = 24 additions
f. Final linear averaging of texel values from two adjacent texture maps: 2 mults, 1 add for each R,G,B,A component => 8 mults, 4 adds total.