2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-15 00:06:09 +00:00

GLSL generation fixes

This commit is contained in:
Jack Andersen
2016-08-01 19:54:40 -10:00
parent d43087247f
commit e17d5c0b83
4 changed files with 22 additions and 16 deletions

View File

@@ -104,7 +104,7 @@ std::string ProgrammableCommon::RecursiveTraceColor(const IR& ir, Diagnostics& d
{
const IR::Instruction& idxInst = inst.getChildInst(ir, 0);
unsigned idx = unsigned(idxInst.getImmVec().vec[0]);
return EmitColorRegUse(idx);
return toSwizzle ? EmitColorRegUseRaw(idx) : EmitColorRegUseRGB(idx);
}
else if (!name.compare("Lighting"))
{
@@ -191,7 +191,7 @@ std::string ProgrammableCommon::RecursiveTraceAlpha(const IR& ir, Diagnostics& d
{
const IR::Instruction& idxInst = inst.getChildInst(ir, 0);
unsigned idx = unsigned(idxInst.getImmVec().vec[0]);
return EmitColorRegUse(idx);
return EmitColorRegUseAlpha(idx);
}
else if (!name.compare("Lighting"))
{