mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 06:51:18 +12:00
fix: incorrect texture read coord type
This commit is contained in:
parent
4c54f4b11d
commit
05b603d652
2 changed files with 2 additions and 3 deletions
|
@ -2316,7 +2316,7 @@ static void _emitTEXSampleTextureCode(LatteDecompilerShaderContext* shaderContex
|
|||
// handle integer coordinates for texelFetch
|
||||
if (texDim == Latte::E_DIM::DIM_2D || texDim == Latte::E_DIM::DIM_2D_MSAA)
|
||||
{
|
||||
src->add("int2(");
|
||||
src->add("uint2(");
|
||||
src->add("float2(");
|
||||
_emitTEXSampleCoordInputComponent(shaderContext, texInstruction, 0, texCoordDataType);
|
||||
src->addFmt(", ");
|
||||
|
@ -2330,7 +2330,7 @@ static void _emitTEXSampleTextureCode(LatteDecompilerShaderContext* shaderContex
|
|||
else if (texDim == Latte::E_DIM::DIM_1D)
|
||||
{
|
||||
// VC DS games forget to initialize textures and use texel fetch on an uninitialized texture (a dim of 0 maps to 1D)
|
||||
src->add("int(");
|
||||
src->add("uint(");
|
||||
src->add("float(");
|
||||
_emitTEXSampleCoordInputComponent(shaderContext, texInstruction, 0, (texOpcode == GPU7_TEX_INST_LD) ? LATTE_DECOMPILER_DTYPE_SIGNED_INT : LATTE_DECOMPILER_DTYPE_FLOAT);
|
||||
src->addFmt(")*supportBuffer.tex{}Scale.x", texInstruction->textureFetch.textureIndex);
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "Cemu/Logging/CemuLogging.h"
|
||||
#include "Cafe/HW/Latte/Core/FetchShader.h"
|
||||
#include "Cafe/HW/Latte/Core/LatteConst.h"
|
||||
#include "HW/Latte/Renderer/Metal/MetalCommon.h"
|
||||
#include "config/CemuConfig.h"
|
||||
#include "gui/guiWrapper.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue