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
03c441fa
Commit
03c441fa
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#87
] Fix shader validation layer warning
parent
074ee4e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!74
Resolve "Mesh Shader Implementation"
Pipeline
#26214
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/mesh_shader/resources/shaders/shader.frag
+2
-9
2 additions, 9 deletions
projects/mesh_shader/resources/shaders/shader.frag
projects/mesh_shader/resources/shaders/shader.mesh
+4
-16
4 additions, 16 deletions
projects/mesh_shader/resources/shaders/shader.mesh
with
6 additions
and
25 deletions
projects/mesh_shader/resources/shaders/shader.frag
+
2
−
9
View file @
03c441fa
#version 450
#extension GL_ARB_separate_shader_objects : enable
//
layout(location = 0) in vec3
frag
Color;
layout
(
location
=
0
)
in
vec3
Vertex
Color
;
layout
(
location
=
0
)
out
vec4
outColor
;
struct
VertColor
{
vec3
color
;
};
layout
(
location
=
0
)
in
VertColor
VertexInput
;
void
main
()
{
outColor
=
vec4
(
Vertex
Input
.
c
olor
,
1
);
outColor
=
vec4
(
Vertex
C
olor
,
1
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
projects/mesh_shader/resources/shaders/shader.mesh
+
4
−
16
View file @
03c441fa
...
...
@@ -11,19 +11,7 @@ layout( push_constant ) uniform constants{
mat4 mvp;
};
// out uint gl_PrimitiveCountNV;
// out uint gl_PrimitiveIndicesNV[];
//out gl_MeshPerVertexNV {
// vec4 gl_Position;
//} gl_MeshVerticesNV[];
struct VertColor
{
vec3 color;
};
layout(location = 0) out VertColor VertexOutputs[];
layout(location = 0) out vec3 vertexColors[];
void main() {
if(gl_LocalInvocationID.x == 0)
...
...
@@ -37,8 +25,8 @@ void main() {
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);
V
ertex
Outputs[0].color
= vec3(1, 0, 0);
V
ertex
Outputs[1].color
= vec3(0, 1, 0);
V
ertex
Outputs[2].color
= vec3(0, 0, 1);
v
ertex
Colors[0]
= vec3(1, 0, 0);
v
ertex
Colors[1]
= vec3(0, 1, 0);
v
ertex
Colors[2]
= vec3(0, 0, 1);
}
}
\ No newline at end of file
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