Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
348f7525
Commit
348f7525
authored
3 years ago
by
Artur Wasmut
Browse files
Options
Downloads
Patches
Plain Diff
add camera push constant.
parent
99b22389
No related branches found
No related tags found
1 merge request
!74
Resolve "Mesh Shader Implementation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/mesh_shader/resources/shaders/shader.mesh
+10
-6
10 additions, 6 deletions
projects/mesh_shader/resources/shaders/shader.mesh
projects/mesh_shader/src/main.cpp
+1
-1
1 addition, 1 deletion
projects/mesh_shader/src/main.cpp
with
11 additions
and
7 deletions
projects/mesh_shader/resources/shaders/shader.mesh
+
10
−
6
View file @
348f7525
...
...
@@ -7,12 +7,16 @@ layout(local_size_x=32) in;
layout(triangles) out;
layout(max_vertices=64, max_primitives=126) out;
layout( push_constant ) uniform constants{
mat4 mvp;
};
// out uint gl_PrimitiveCountNV;
// out uint gl_PrimitiveIndicesNV[];
out gl_MeshPerVertexNV {
vec4 gl_Position;
} gl_MeshVerticesNV[];
//
out gl_MeshPerVertexNV {
//
vec4 gl_Position;
//
} gl_MeshVerticesNV[];
void main() {
if(gl_LocalInvocationID.x == 0)
...
...
@@ -22,8 +26,8 @@ void main() {
gl_PrimitiveIndicesNV[1] = 1;
gl_PrimitiveIndicesNV[2] = 2;
gl_MeshVerticesNV[0].gl_Position = vec4(-0.5, 0.5, 0.5, 1);
gl_MeshVerticesNV[1].gl_Position = vec4( 0.5, 0.5, 0.5, 1);
gl_MeshVerticesNV[2].gl_Position = vec4( 0 , -0.5, 0.5, 1);
gl_MeshVerticesNV[0].gl_Position =
mvp *
vec4(-0.5, 0.5, 0.5, 1);
gl_MeshVerticesNV[1].gl_Position =
mvp *
vec4( 0.5, 0.5, 0.5, 1);
gl_MeshVerticesNV[2].gl_Position =
mvp *
vec4( 0 , -0.5, 0.5, 1);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
projects/mesh_shader/src/main.cpp
+
1
−
1
View file @
348f7525
...
...
@@ -152,7 +152,7 @@ int main(int argc, const char** argv) {
cmdStream
,
renderPass
,
meshShaderPipeline
,
vkcv
::
P
ushConstantData
(
nullptr
,
0
)
,
p
ushConstantData
,
{
vkcv
::
MeshShaderDrawcall
({},
1
)
},
{
swapchainInput
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment