Merge pull request #3916 from wwylele/mipmap-proctex

gl_rasterizer: implement mipmap for procedural texture
This commit is contained in:
Weiyi Wang 2018-07-19 11:51:57 +03:00 committed by GitHub
commit 78685065cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;