WebGL polyline tessellation with tesspathy - gists · GitHub

文章推薦指數: 80 %
投票人數:10人

WebGL polyline tessellation with tesspathy. GitHub Gist: instantly share code, notes, and snippets. Skiptocontent Allgists BacktoGitHub Signin Signup Sign in Sign up {{message}} Instantlysharecode,notes,andsnippets. Sumbera/index.html CreatedSep29,2015 Star 0 Fork 0 Star Code Revisions 1 Embed Whatwouldyouliketodo? Embed Embedthisgistinyourwebsite. Share Copysharablelinkforthisgist. Clonevia HTTPS ClonewithGitorcheckoutwithSVNusingtherepository’swebaddress. LearnmoreaboutcloneURLs DownloadZIP WebGLpolylinetessellationwithtesspathy Raw readme.md yetanothertessellationofpolylines,thistimeusingtesspathy.js Raw index.html ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters. LearnmoreaboutbidirectionalUnicodecharacters Showhiddencharacters

PolylineTesspathy uniformmat4u_matrix; attributevec4a_vertex; attributefloata_pointSize; attributevec4a_color; varyingvec4v_color; voidmain(){ //Setthesizeofthepoint gl_PointSize=a_pointSize; //multiplyeachvertexbyamatrix. gl_Position=u_matrix*a_vertex; //passthecolortothefragmentshader v_color=a_color; } precisionmediumpfloat; varyingvec4v_color; voidmain(){ //--squares gl_FragColor=v_color; gl_FragColor=vec4(0.8,0.1,0.1,0.9);//v_color; } Signupforfree tojointhisconversationonGitHub. Alreadyhaveanaccount? Signintocomment Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.


請為這篇文章評分?