Skip to content
Snippets Groups Projects
Commit f22dffcd authored by Artur Wasmut's avatar Artur Wasmut
Browse files

fill out mesh shaders.

parent ddf3936a
No related branches found
No related tags found
1 merge request!74Resolve "Mesh Shader Implementation"
Pipeline #26211 passed
#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(location = 0) in vec3 fragColor;
//layout(location = 0) in vec3 fragColor;
layout(location = 0) out vec4 outColor;
void main() {
outColor = vec4(fragColor, 1.0);
outColor = vec4(1.0);
}
\ No newline at end of file
......@@ -15,5 +15,15 @@ out gl_MeshPerVertexNV {
} gl_MeshVerticesNV[];
void main() {
if(gl_LocalInvocationID.x == 0)
{
gl_PrimitiveCountNV = 1;
gl_PrimitiveIndicesNV[0] = 0;
gl_PrimitiveIndicesNV[1] = 1;
gl_PrimitiveIndicesNV[2] = 2;
gl_MeshVerticesNV[0].gl_Position = vec4(-0.5, 0.5, -1, 1);
gl_MeshVerticesNV[1].gl_Position = vec4( 0.5, 0.5, -1, 1);
gl_MeshVerticesNV[2].gl_Position = vec4( 0 , -0.5, -1, 1);
}
}
\ No newline at end of file
......@@ -4,12 +4,15 @@
layout(local_size_x=32) in;
taskNV out Task {
uint baseID;
uint subIDs[32];
} OUT;
//taskNV out Task {
// uint baseID;
// uint subIDs[32];
//} OUT;
void main() {
if(gl_LocalInvocationID.x == 0)
{
gl_TaskCountNV = 1;
}
}
\ No newline at end of file
......@@ -156,6 +156,7 @@ int main(int argc, const char** argv) {
{ vkcv::MeshShaderDrawcall({}, 1) },
{ swapchainInput });
/*
core.recordDrawcallsToCmdStream(
cmdStream,
renderPass,
......@@ -163,7 +164,7 @@ int main(int argc, const char** argv) {
pushConstantData,
{ drawcall },
{ swapchainInput });
*/
core.prepareSwapchainImageForPresent(cmdStream);
core.submitCommandStream(cmdStream);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment