diff --git a/hecl/include/hecl/Backend/Metal.hpp b/hecl/include/hecl/Backend/Metal.hpp index e7458c381..508c8cafa 100644 --- a/hecl/include/hecl/Backend/Metal.hpp +++ b/hecl/include/hecl/Backend/Metal.hpp @@ -40,6 +40,11 @@ private: return hecl::Format("float3(%g,%g,%g)", vec.vec[0], vec.vec[1], vec.vec[2]); } + std::string EmitColorRegUse(unsigned idx) const + { + return hecl::Format("lu.colorReg%u", idx); + } + std::string EmitTexGenSource2(TexGenSrc src, int uvIdx) const; std::string EmitTexGenSource4(TexGenSrc src, int uvIdx) const; }; diff --git a/hecl/include/hecl/Backend/ProgrammableCommon.hpp b/hecl/include/hecl/Backend/ProgrammableCommon.hpp index 1a2bbc9ce..c4e8c41ea 100644 --- a/hecl/include/hecl/Backend/ProgrammableCommon.hpp +++ b/hecl/include/hecl/Backend/ProgrammableCommon.hpp @@ -79,7 +79,7 @@ private: return hecl::Format("sampling%u.a", samplingIdx); } - std::string EmitColorRegUse(unsigned idx) const + virtual std::string EmitColorRegUse(unsigned idx) const { return hecl::Format("colorReg%u", idx); }