Smooth line drawing, glsl, shader, openframeworks, sketch
文章推薦指數: 80 %
Smooth line drawing, glsl, shader, openframeworks, sketch - ofApp.cpp. ... I draw the lines as one big vboMesh, each line has 2 polygons, ...
Skiptocontent
Allgists
BacktoGitHub
Signin
Signup
Sign in
Sign up
{{message}}
Instantlysharecode,notes,andsnippets.
gwio/ofApp.cpp
CreatedMay13,2018
Star
1
Fork
0
Star
Code
Revisions
1
Stars
1
Embed
Whatwouldyouliketodo?
Embed
Embedthisgistinyourwebsite.
Share
Copysharablelinkforthisgist.
Clonevia
HTTPS
ClonewithGitorcheckoutwithSVNusingtherepository’swebaddress.
LearnmoreaboutcloneURLs
DownloadZIP
Smoothlinedrawing,glsl,shader,openframeworks,sketch
Raw
ofApp.cpp
ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters.
LearnmoreaboutbidirectionalUnicodecharacters
Showhiddencharacters
/*IdrawthelinesasonebigvboMesh,eachlinehas2polygons,theyareconstructedfromthesamevertexpositionand
andextrudedlaterinthevertexshader*/
lineMesh.addVertex(lineStart);
lineMesh.addVertex(lineEnd);
lineMesh.addVertex(lineEnd);
lineMesh.addVertex(lineStart);
//...lineMesh.addIndex(..)...addingtheindexorder
//thisisthenormalvectortooffsettheverticeslater
ofVec2fnormalLine=(lineStart-lineEnd).getPerpendicular();
/*normalLinegetsintoavector
延伸文章資訊
- 1Geometry Shader - LearnOpenGL
This input layout qualifier can take any of the following primitive values: points : when drawing...
- 2Compute Shader for Drawing Lines - gists · GitHub
https://forum.unity.com/threads/compute-shader-for-line-drawing.599989/. #pragma kernel CSMain. R...
- 3Drawing lines with shader - OpenGL - Khronos Forums
Hello, I'm trying to draw cube with lines which connects every single vertex on 3D space. and I w...
- 4Drawing Lines with WebGL - Scott Logic Blog
How would we do this in the vertex shader? We can take advantage of GL_TRIANGLE_STRIP . A triangl...
- 5Smooth line drawing, glsl, shader, openframeworks, sketch
Smooth line drawing, glsl, shader, openframeworks, sketch - ofApp.cpp. ... I draw the lines as on...