mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 16:31:19 +12:00
implement vertex descriptors & draw
This commit is contained in:
parent
e5395277a7
commit
cb525b22ff
9 changed files with 247 additions and 30 deletions
|
@ -3818,18 +3818,21 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
|
|||
LatteDecompiler::emitHeader(shaderContext);
|
||||
// helper functions
|
||||
LatteDecompiler_emitHelperFunctions(shaderContext, src);
|
||||
const char* outputTypeName;
|
||||
const char* functionType = "";
|
||||
const char* outputTypeName = "";
|
||||
switch (shader->shaderType)
|
||||
{
|
||||
case LatteConst::ShaderType::Vertex:
|
||||
functionType = "vertex";
|
||||
outputTypeName = "VertexOut";
|
||||
break;
|
||||
case LatteConst::ShaderType::Pixel:
|
||||
functionType = "fragment";
|
||||
outputTypeName = "FragmentOut";
|
||||
break;
|
||||
}
|
||||
// start of main
|
||||
src->addFmt("{} main0(", outputTypeName);
|
||||
src->addFmt("{} {} main0(", functionType, outputTypeName);
|
||||
LatteDecompiler::emitInputs(shaderContext);
|
||||
src->add(") {" _CRLF);
|
||||
src->addFmt("{} out;" _CRLF, outputTypeName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue