Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
Unterteilungsalgorithmen
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
Unterteilungsalgorithmen
Commits
f5b67cfe
Commit
f5b67cfe
authored
Jul 01, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish edge compute shader
parent
cce97fe9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
subdivision-edge.compute
QTProject/subdivision-edge.compute
+9
-2
No files found.
QTProject/subdivision-edge.compute
View file @
f5b67cfe
...
@@ -21,8 +21,15 @@ layout(std430, binding=2) writeonly buffer Output {
...
@@ -21,8 +21,15 @@ layout(std430, binding=2) writeonly buffer Output {
};
};
void main(){
void main(){
edges[gl_GlobalInvocationID.x].norm = vec3(0.0, 0.0, 0.0);
edges[gl_GlobalInvocationID.x].uv = vec2(0.0, 0.0);
edges[gl_GlobalInvocationID.x].uv = vec2(0.0, 0.0);
edges[gl_GlobalInvocationID.x].pos = 3.0/8.0 * (vertices[indices[gl_GlobalInvocationID.x][0]].pos + vertices[indices[gl_GlobalInvocationID.x][1]].pos) + 1.0/8.0 * (vertices[indices[gl_GlobalInvocationID.x][2]].pos + vertices[indices[gl_GlobalInvocationID.y][3]].pos);
Vertex a = vertices[indices[gl_GlobalInvocationID.x][0]];
Vertex b = vertices[indices[gl_GlobalInvocationID.x][1]];
Vertex c = vertices[indices[gl_GlobalInvocationID.x][2]];
Vertex d = vertices[indices[gl_GlobalInvocationID.x][3]];
vec3 pos;
edges[gl_GlobalInvocationID.x].pos = 3.0f/8.0f * a.pos + 3.0f/8.0f * b.pos + 1.0f/8.0f * c.pos + 1.0f/8.0f * d.pos;
edges[gl_GlobalInvocationID.x].norm = normalize(3.0/8.0 * (vertices[indices[gl_GlobalInvocationID.x][0]].norm + vertices[indices[gl_GlobalInvocationID.x][1]].norm) + 1.0/8.0 * (vertices[indices[gl_GlobalInvocationID.x][2]].norm + vertices[indices[gl_GlobalInvocationID.y][3]].norm));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment