webgl textures · WebPlatform Docs

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

Creating the texture THEDOCS CONNECT CONTRIBUTE BLOG Notice: TheWebPlatformproject,supportedbyvariousstewardsbetween2012and2015,hasbeendiscontinued.Thissiteisnowavailableongithub. DOCS tutorialswebgltextures webgltextures Introduction Greetings,WebGLninjas.Thefourthtutorialisuponyou,sobeprepared:keepyourbrowserssharpandyourscriptsquick,andmeldintotheshadows,readytostrike!ThestrikingwillofcourseinvolvewritingsomecoolWebGL,ratherthaninfiltratingashogun’spalace,butIthinkthat’sninjaenoughforus.Thisweekwewillturnourattentiontoimportingtexturesfromanimagefileintothecanvas. Thisarticleisatranscriptoftime56:50to1:03:20inErikMöller’sWebGL101tutorial,availableonYouTube. Note:[05-texturing.htmlYoucanrunthefinishedtextureexample]fromthisarticletoseewhatyouareaimingtowards. PreparingtousetexturesinWebGL We’regoingtobuildthisexampleontopofthesimpleshaderinourWebGLtutorials.Sotakeacopyof03MinimalShaderfileandsaveitas05-texturing.html. We’llalsoneedanimagetouseastexture,socopythisOperalogoPNGfileintoaplaceinyourworkingdirectory. Nowwe’regoingtoremovetheoffsetaswe’renotgoingtobeusingithere.Todoso,firstgointothevertexshader



請為這篇文章評分?