Fixed stupid mesh shading bug
This commit is contained in:
@@ -52,7 +52,7 @@ void taskMain(
|
|||||||
uint index;
|
uint index;
|
||||||
InterlockedAdd(head, 1, index);
|
InterlockedAdd(head, 1, index);
|
||||||
p.meshletId[index] = m;
|
p.meshletId[index] = m;
|
||||||
p.instanceId[index] = groupID + pScene.primitiveIndices[m];
|
p.instanceId[index] = groupID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ void meshMain(
|
|||||||
uint vertexIndex = pScene.vertexIndices[m.vertexOffset + v];
|
uint vertexIndex = pScene.vertexIndices[m.vertexOffset + v];
|
||||||
VertexAttributes attr = pVertexData.getAttributes(md.indicesOffset + vertexIndex);
|
VertexAttributes attr = pVertexData.getAttributes(md.indicesOffset + vertexIndex);
|
||||||
vertices[v] = attr.getParameter(inst.transformMatrix);
|
vertices[v] = attr.getParameter(inst.transformMatrix);
|
||||||
vertices[v].vertexColor = m.color;
|
//vertices[v].vertexColor = m.color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -489,7 +489,7 @@ void Graphics::pickPhysicalDevice()
|
|||||||
{
|
{
|
||||||
if (std::strcmp(VK_EXT_MESH_SHADER_EXTENSION_NAME, extensionProps[i].extensionName) == 0)
|
if (std::strcmp(VK_EXT_MESH_SHADER_EXTENSION_NAME, extensionProps[i].extensionName) == 0)
|
||||||
{
|
{
|
||||||
//meshShadingEnabled = true;
|
meshShadingEnabled = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ Slang::ComPtr<slang::IBlob> Seele::generateShader(const ShaderCreateInfo& create
|
|||||||
}
|
}
|
||||||
slang::SessionDesc sessionDesc;
|
slang::SessionDesc sessionDesc;
|
||||||
sessionDesc.flags = 0;
|
sessionDesc.flags = 0;
|
||||||
StaticArray<slang::CompilerOptionEntry, 2> option;
|
StaticArray<slang::CompilerOptionEntry, 3> option;
|
||||||
option[0].name = slang::CompilerOptionName::DumpIntermediates;
|
option[0].name = slang::CompilerOptionName::IgnoreCapabilities;
|
||||||
option[0].value = slang::CompilerOptionValue();
|
option[0].value = slang::CompilerOptionValue();
|
||||||
option[0].value.kind = slang::CompilerOptionValueKind::Int;
|
option[0].value.kind = slang::CompilerOptionValueKind::Int;
|
||||||
option[0].value.intValue0 = 1;
|
option[0].value.intValue0 = 1;
|
||||||
@@ -25,6 +25,10 @@ Slang::ComPtr<slang::IBlob> Seele::generateShader(const ShaderCreateInfo& create
|
|||||||
option[1].value = slang::CompilerOptionValue();
|
option[1].value = slang::CompilerOptionValue();
|
||||||
option[1].value.kind = slang::CompilerOptionValueKind::Int;
|
option[1].value.kind = slang::CompilerOptionValueKind::Int;
|
||||||
option[1].value.intValue0 = 1;
|
option[1].value.intValue0 = 1;
|
||||||
|
option[2].name = slang::CompilerOptionName::DumpIntermediates;
|
||||||
|
option[2].value = slang::CompilerOptionValue();
|
||||||
|
option[2].value.kind = slang::CompilerOptionValueKind::Int;
|
||||||
|
option[2].value.intValue0 = 1;
|
||||||
sessionDesc.compilerOptionEntries = option.data();
|
sessionDesc.compilerOptionEntries = option.data();
|
||||||
sessionDesc.compilerOptionEntryCount = option.size();
|
sessionDesc.compilerOptionEntryCount = option.size();
|
||||||
sessionDesc.defaultMatrixLayoutMode = SLANG_MATRIX_LAYOUT_COLUMN_MAJOR;
|
sessionDesc.defaultMatrixLayoutMode = SLANG_MATRIX_LAYOUT_COLUMN_MAJOR;
|
||||||
|
|||||||
Reference in New Issue
Block a user