r500/verbatim/pow_fragment_shader.fs.asm
2025-11-11 18:34:41 -06:00

13 lines
264 B
NASM

-- a = log(a) / log(2)
src0.a = temp[0] :
temp[0].a = LN2 src0.a ;
-- a = a * 32.0 + 0
src0.a = temp[0] ,
src1.a = float(96) : -- 32.0 (or any other constant)
temp[0].a = MAD src0.a src1.a src1.0 ;
-- a = 2 ^ a
src0.a = temp[0] :
temp[0].a = EX2 src0.a ;