Latte: Support for SAMPLE_LB

This commit is contained in:
Exzap 2023-12-13 12:22:59 +01:00
parent df282ab230
commit 2167143c17
3 changed files with 12 additions and 2 deletions

View file

@ -2561,8 +2561,13 @@ void _emitTEXSampleTextureCode(LatteDecompilerShaderContext* shaderContext, Latt
// lod or lod bias parameter
if( texOpcode == GPU7_TEX_INST_SAMPLE_L || texOpcode == GPU7_TEX_INST_SAMPLE_LB || texOpcode == GPU7_TEX_INST_SAMPLE_C_L)
{
src->add(",");
_emitTEXSampleCoordInputComponent(shaderContext, texInstruction, 3, LATTE_DECOMPILER_DTYPE_FLOAT);
if(texOpcode == GPU7_TEX_INST_SAMPLE_LB)
src->addFmt("{}", (float)texInstruction->textureFetch.lodBias / 16.0f);
else
{
src->add(",");
_emitTEXSampleCoordInputComponent(shaderContext, texInstruction, 3, LATTE_DECOMPILER_DTYPE_FLOAT);
}
}
else if( texOpcode == GPU7_TEX_INST_SAMPLE_LZ || texOpcode == GPU7_TEX_INST_SAMPLE_C_LZ )
{