mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 23:41:18 +12:00
support line strip as vertex output with geometry shaders
This commit is contained in:
parent
1fb9cfd783
commit
3fececc3ba
4 changed files with 48 additions and 41 deletions
|
@ -4140,7 +4140,11 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
|
|||
if (usesGeometryShader)
|
||||
{
|
||||
// Calculate the imaginary vertex id
|
||||
src->add("uint vid = tig * VERTICES_PER_VERTEX_PRIMITIVE + tid;" _CRLF);
|
||||
LattePrimitiveMode vsOutPrimType = shaderContext->contextRegistersNew->VGT_PRIMITIVE_TYPE.get_PRIMITIVE_MODE();
|
||||
if (PrimitiveRequiresConnection(vsOutPrimType))
|
||||
src->add("uint vid = tig + tid;" _CRLF);
|
||||
else
|
||||
src->add("uint vid = tig * VERTICES_PER_VERTEX_PRIMITIVE + tid;" _CRLF);
|
||||
src->add("uint iid = vid / supportBuffer.verticesPerInstance;" _CRLF);
|
||||
src->add("vid %= supportBuffer.verticesPerInstance;" _CRLF);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue