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
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;