mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 16:31:19 +12:00
fix: texture bindings
This commit is contained in:
parent
5030a2e84a
commit
f11526a244
3 changed files with 44 additions and 24 deletions
|
@ -2193,7 +2193,7 @@ static void _emitTEXSampleTextureCode(LatteDecompilerShaderContext* shaderContex
|
|||
src->add(".");
|
||||
const char* resultElemTable[4] = {"x","y","z","w"};
|
||||
sint32 numWrittenElements = 0;
|
||||
for(sint32 f=0; f<4; f++)
|
||||
for(sint32 f = 0; f < 4; f++)
|
||||
{
|
||||
if( texInstruction->dstSel[f] < 4 )
|
||||
{
|
||||
|
@ -2493,18 +2493,21 @@ static void _emitTEXSampleTextureCode(LatteDecompilerShaderContext* shaderContex
|
|||
// lod bias
|
||||
if( texOpcode == GPU7_TEX_INST_SAMPLE_C || texOpcode == GPU7_TEX_INST_SAMPLE_C_LZ )
|
||||
{
|
||||
src->add(")");
|
||||
src->add(").");
|
||||
|
||||
if (numWrittenElements > 1)
|
||||
{
|
||||
// result is copied into multiple channels
|
||||
src->add(".");
|
||||
for (sint32 f = 0; f < numWrittenElements; f++)
|
||||
{
|
||||
cemu_assert_debug(texInstruction->dstSel[f] == 0); // only x component is defined
|
||||
src->add("x");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
src->add("x");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue