Merge pull request #3916 from wwylele/mipmap-proctex
gl_rasterizer: implement mipmap for procedural texture
This commit is contained in:
@@ -191,6 +191,7 @@ void RasterizerOpenGL::SyncEntireState() {
|
||||
|
||||
SyncFogColor();
|
||||
SyncProcTexNoise();
|
||||
SyncProcTexBias();
|
||||
SyncShadowBias();
|
||||
}
|
||||
|
||||
@@ -911,6 +912,7 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) {
|
||||
case PICA_REG_INDEX(texturing.proctex):
|
||||
case PICA_REG_INDEX(texturing.proctex_lut):
|
||||
case PICA_REG_INDEX(texturing.proctex_lut_offset):
|
||||
SyncProcTexBias();
|
||||
shader_dirty = true;
|
||||
break;
|
||||
|
||||
@@ -1698,6 +1700,15 @@ void RasterizerOpenGL::SyncProcTexNoise() {
|
||||
uniform_block_data.dirty = true;
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::SyncProcTexBias() {
|
||||
const auto& regs = Pica::g_state.regs.texturing;
|
||||
uniform_block_data.data.proctex_bias =
|
||||
Pica::float16::FromRaw(regs.proctex.bias_low | (regs.proctex_lut.bias_high << 8))
|
||||
.ToFloat32();
|
||||
|
||||
uniform_block_data.dirty = true;
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::SyncAlphaTest() {
|
||||
const auto& regs = Pica::g_state.regs;
|
||||
if (regs.framebuffer.output_merger.alpha_test.ref != uniform_block_data.data.alphatest_ref) {
|
||||
|
||||
Reference in New Issue
Block a user