gl_rasterizer: implement mipmap for proctex

This commit is contained in:
wwylele 2018-07-04 17:16:38 +03:00
parent 4564fc5baa
commit 2927c88fd3
7 changed files with 97 additions and 23 deletions

View file

@ -185,7 +185,7 @@ Math::Vec4<u8> ProcTex(float u, float v, TexturingRegs regs, State::ProcTex stat
// Look up the color
// For the color lut, coord=0.0 is lut[offset] and coord=1.0 is lut[offset+width-1]
const u32 offset = regs.proctex_lut_offset;
const u32 offset = regs.proctex_lut_offset.level0;
const u32 width = regs.proctex_lut.width;
const float index = offset + (lut_coord * (width - 1));
Math::Vec4<u8> final_color;