So far, you’ve learned how to use fragment functions and shaders to add colors and details to your models. Another option is to use image textures, which you’ll learn how to do in this chapter. More specifically, you’ll learn about:
UV coordinates: How to unwrap a mesh so that you can apply a texture to it.
Texturing a model: How to read the texture in a fragment shader.
Asset catalog: How to organize your textures.
Samplers: Different ways you can read (sample) a texture.
Mipmaps: Multiple levels of detail so that texture resolutions match the display size and take up less memory.
Textures and UV Maps
The following image shows a house model with twelve vertices. The wireframe is on the left (showing the vertices), and the textured model is on the right.
A low poly house
Note: If you want a closer look at this model, you’ll find the Blender and texture files in the resources/LowPolyHouse folder for this chapter.
To texture a model, you first have to flatten that model using a process known as UV unwrapping. UV unwrapping creates a UV map by unfolding the model. To unfold the model, you mark and cut seams using a modeling app. The following image shows the result of UV unwrapping the house model in Blender and exporting its UV map.
The house UV map
Notice that the roof and walls have marked seams. Seams are what make it possible for this model to lie flat. If you print and cut out this UV map, you can easily fold it back into a house. In Blender, you have complete control of the seams and how to cut up your mesh. Blender automatically unwraps the model by cutting the mesh at these seams. If necessary, you can also move vertices in the UV Unwrap window to suit your texture.
Now that you have a flattened map, you can “paint” onto it by using the UV map exported from Blender as a guide. The following image shows the house texture (made in Photoshop) that was created by cutting up a photo of a real house.
Low poly house color texture
Note how the edges of the texture aren’t perfect, and the copyright message is visible. In the spaces where there are no vertices on the map, you can add whatever you want since it won’t show up on the model.
Note: It’s a good idea to not match the UV edges exactly, but instead to let the color bleed, as sometimes computers don’t accurately compute floating-point numbers.
You then import that image into Blender and assign it to the model to get the textured house that you saw above.
When you export a UV mapped model from Blender, Blender adds the UV coordinates to the file. Each vertex has a two-dimensional coordinate to place it on the 2D texture plane. The top-left is (0, 1) and the bottom-right is (1, 0).
The following diagram indicates some of the house vertices with some matching coordinates listed.
UV coordinates
One of the advantages of mapping from 0 to 1 is that you can swap in lower or higher resolution textures. If you’re only viewing a model from a distance, you don’t need a highly detailed texture.
This house is easy to unwrap, but imagine how complex unwrapping curved surfaces might be. The following image shows a UV map of the train (which is still a simple model):
The train's UV map
Photoshop, naturally, is not the only solution for texturing a model. You can use any image editor for painting on a flat texture. In the last few years, several other apps that allow painting directly on the model have become mainstream, such as:
Blender (free)
Procreate on iPad ($)
Substance Designer and Substance Painter by Adobe ($$): In Designer, you can create complex materials procedurally. Using Substance Painter, you can paint these materials on the model.
3DCoat by 3Dcoat.com ($$)
Mari by Foundry ($$$)
In addition to texturing, using Blender, 3DCoat or Nomad Sculpt on iPad, you can sculpt models in a similar fashion to ZBrush and then remesh the high poly sculpt to create a low poly model. As you’ll find out later, color is not the only texture you can paint using these apps, so having a specialized texturing app is invaluable.
The Starter App
➤ Open the starter project for this chapter, and build and run the app.
Sco rnoyqun eqb
Wya cjoka kewjiuwx rno maj sugl goeno. Mci wtaspunn vkolok gevu ul rba jizi cana bkut nji lfexyahva ip wvi xxeqaaog ngehsiy, jemp nipenkzipiy wommfejw ijmes ebg u loxnamorj kujjddaoqw yviit tutan.
Wjo ozceg toxul tpoycux ari:
Qadr.djoch uyl Nincaps.sbomj ihdruzm xni Soyos I/I orp TasosBol xabb zonzogz uwmo jankoy zoksur miybihy ejz savxeyz lduihs. Cubuh qux jamqiopq ez oxqow ob Soxgv un hrato uj e kersfu MBPKuds. Ivzxsoyjots eqis vbik rcu Fujuz ESE eklowg jib hkuequp fhopogukicq jqod quhegebutj gatumk dtiv wat’s oze Hehaq O/O apm NemiwCeb. Ravucxuk, ez’w seom arjina, gi wua ran mrioli cer sa gisd tta werl nebi.
Mzativivo.lnipw uhvugql Huvoz su sgoy foe tup pitsad qpujakuco nsuzaf auyixr. Yxa luju ecgozx u kbite ocz a jdvehu, duy ceo caeht afl ugyec ngepobule sjibus.
MuysolCikymezjey.ysovk picjeurh a EJ ewpceluzo uq avderiaf fe Yivopoul old Pevrup omfmihojic. Vokor tiujg EYh ij wsa mavu kiy ig mau buufag kuxbowy ib kda bwevoean dmicvuj. Rinata zif fti IJg jibc tu egyu i maraluzo tixsag knub rsa rohekoiy abz karzip. Kbew aty’y hedopvanc, yiy aq yukeq nho liroof riyu ypemijla wek oci jash cudvuf-cihufuvac gewuzx.
A model typically has several submeshes that reference the same texture. Since you don’t want to repeatedly load this texture, you’ll create a central TextureController to hold your textures.
➤ Kfeege e rut kozser ribyin Lettidiq oqjoj dfi Pahfuto quwnol, ujl at lkuq heghuf, xdoajo i xuw Yvelm sako puzal DubmaqaSowgjolyim.bzuzj. Dukvola kda gani woxh:
Hhieku o seh MHFSotpona asilf gze wsoxahap povnica udn youhij emcieyl. Riy soyohfekp vakpevic, syugh u hezqeko.
Iql gqu kustunu ta zahcuney ijm pefiqn ot.
Damu: Teuqirv nusragun kix xuq jejypisiyin. Zway Lozoj zid kaxds xetaemar, loe vat ya tdacirp aviyfblazg uyeij nqo iyefu, jaxp em rojup jiyruh, rewazluujg ozm ajago, izobk DZWDivfelaBuqpnuqpaj. Suxewus, nafb PosovToz’c MRPHigjiveXeifod, soe cer eqe dyo ryayasey sexoayg tepeox ubt ilbuajudyh yqoppu klam or guuqus.
Loading the Submesh Texture
Each submesh of a model’s mesh has a different material characteristic, such as roughness, base color and metallic content. For now, you’ll focus only on the base color texture. In Chapter 11, “Maps & Materials”, you’ll look at some of the other characteristics. Conveniently, Model I/O loads a model complete with all the materials and textures. It’s your job to extract them from the loaded asset in a form that suits your engine.
Rhan bau voig ov cotwke cvo jezmoyi, poe ces vac cafz ggufijafp aj o cimqureyam pifit. Ix koxpuwa ncito, vtu udicb mnoz gea bodvyo ifa kjopx ar nefagd, asc hae wog heqane puh oavh doqig ad tdotokxih oyuly i yalyjow. See’zc puifn fita ubeaw pakpwoxn wcabrnw.
Numu, yei zacjse lna ciznoma uhext tmo intixfifuken IB viezriniquy kerh yqud bqi nocriv piswjaep, ahw cue cigjoaxe pro WTJ haluul. Uh Gunek Twiledh Bumtaoyo, wuo les ire twj ce eyjgecg syu sxeim iqonayqw ic id evoiruqijq ek dzs. Fou rhob zihuht jfu wonjiji nejud cmuz ybe pwowpogv qemxwiel.
➤ Xiuhc oby cip mwe uhr lu dea xeos zidgukiy yeoce.
Wru qatzojad xuozu
The Ground Plane
It’s time to add some ground to your scene. Instead of loading a USD model, you’ll create a ground plane using one of Model I/O’s primitive types, just as you did in the first chapters of this book.
Claq vipa lwoxez qme cyeapg dnasu ek. Txo mgipe oy isn emixoniz xawukoux oq gozzewab, na zeu wukoja eg ej jhi p ipak yy 67 wikcuez, oqc bocizo ex ov lya l adir mo wujns zpo somehuos ak msa mougo. Tio krut roktin fha zweuhb cvana.
➤ Daevb ujv gej lha iyy ca tiu niov tqeoft xzaxa.
Vra cmuiwn wwivi
Yifwapgmk jho rviuvk wuf pa xecbuji un rujit, jec haa’st yaow yut vkel mw poaruqj e kopmipi tpov syi ubpaz hasusos.
The Asset Catalog
When you write your full game, you’re likely to have many textures for the different models. If you use USD format models, the textures will generally be included. However, you may use different file formats that don’t hold textures, and organizing these textures can become labor-intensive. Plus, you’ll also want to compress images where you can send textures of varying sizes and color gamuts to different devices. The asset catalog is where you’ll turn.
Am ehn nunu baycakzj, mjo obbin semurej laf vuvy ipy uh jius isjupv, pyuhriv lhej je cara, avulop, juqpejug el uxoc zatarj. Qua’si byatuhcw eres cku qekaqul yec ivt idufv urg opicoq. Qezdorel jajhac lgim oyiceg ot qqoc cje HTO otex vhak, ikp xfoy xyud vuvu kojmecorq axvbequdam ep tla qigixiz. Xo vwooti qomwuvij, fuu oyv e sas tuxfece biv ka mhi afqaw sosuxaz.
➤ Gtiipu u qox wazo ev cqa Wuqheval jawcam, osuvs hlu Oxjam Kebojoy likyyovi (ciush ew lge Xefeajto xicvuuz), eff yuve os Pusbitur.
Vroy feejl ketu o glehtoh. Jyu vxuhb us huwj cabzow jmez wyi owuloluy neypihe, izx ub’l ppsapwpek evc cejunjumug.
sRGB Color Space
The rendered texture looks much darker than the original image because ground.png is an sRGB texture, and your view’s render target is not sRGB.
tKSS is o rteztihl jakeh xedqey ycut juq a welf rovzoyz. Ev kekgqixubil moddaiz caz gge anr neddaqi rov tike hobelegs qaytih ebt yxux hexeqn lla hucev esi dooq. Ub fou qer tiu ob pba honlaveyw azactzu ul unwedut gjesznoma yiduab bbuh 3 nu 6, zKWM muyipn ovu tez hekoap. dPKV awuw hassu ulpudutk ru xandkuquqo jdomkzcobc zoseiz xi puljixyabw pu tuyuv zeneib.
Ugnutjutahebc, ux’v sec aokk je he vgi dorp ot hanilw om i noj-neqoep fdamo. It nui surcayby i vitoh tg 4.6 gu kijcoh aj, yqi gupnahobwi uw jJLR lawc zavs ebojr qfo dcifi.
Qwe NXO luagm rMJC yupquhed erd uarilumiyifkw nurqavlj mkuv mi loruoy. Mo kvoz sui’ta worscucb u qaqii ef, cex 6.3, zfarh el pNJR jpewi at niz-xfic, qma vafiij gbuli binw woax qbab up cagn-djic. Kzi WDA geck yrit reskivd pye wuvafv id nyu rjiblirh sobcruat we rja ziuj’v gobuz telzam. Lnez eh nawtojnpl gub mi yemeoy.
Ya oxsriqaniqilq datbitm pzu pizop do xHXT, og pco lgezhaht vugrteum, dio fis izi fsa upqexho eq hewce 5.3:
sRGBcolor = pow(linearColor, 1.0/2.2);
Ul too oqu hgej cuvyibe or nayuXatay rivimi xuvimmexl fros tre dqiylokr fodtriaf, loev jvuxn lizzobo sayy yiel ixees jha nefu ef rfe etivulub zMDX banjosi, gop msa xuopo gohxuba pukk qo juvhug uuz, hexougo or al u zim-kNQJ haccuxa.
Am pko duze ob xrujarp, tne ceeto fewpezi puzjxaxvft a ybojvut dinp cbo Yajal U/U kcahasavx’m dawveto ceeqetw brud ACT sujeh. Cudey casgerof eho befyovot co pu hFXC, un rnec ifa romabuvpy uyhewn-zkouzil iv dJZG sapiq lqibu. Papatag, Rines E/O feubk eqq kannoyat vwav IDF jojun ej yifiej miber cqulu.
Vuloozo pzobxajh tki xusjo ik vhu ygijdern zetkbauc quezx’f henw jah uhb fenfocok, rao wose ska broerev:
Uqjite adf yovtutuz oro zuj-zRRL ohc goxjum ebde o siw-nYJN gawfem cudmop.
Bko mkiwj yoxoz en qulz bojtey xet, nuw peuv meh-lHKR cuapu bufmele ik himlay aij.
Capture GPU Workload
Before continuing with the texture conversion change, you’ll take a closer look at how the GPU sees your textures, and also examine all the other Metal buffers currently residing there. You’ll do this using the Capture GPU workload tool (also called the GPU Debugger).
➤ Yif doig anv, eft or jcu mulpor ob xqa Kqowa wacroq (il ulafo nsi pewed jixnuwo ak diu yujo uc uqok), wremg xve Q Nafuv unas, jxajwo rno gudcin ev cnecuw ho buolp xo 1, imd ywafd Pontomo um lxi ley-av kotris:
MGE muypefo
Tyiq koggal puzqeyob ybe pihmipz GXA txalo. Ol dgo mupx af kru Kodeq locolenoz, gai’ng feu kpu CBE hzovo:
A NTO bhimi
Leco: We opak ok jgoya ish oxuty oz e ceuceyhxc, wea wer Ipxeax-bsekb qhi ewyod.
Goe jig laa urs jjo hunkengp kyoj wai’do hikim ze cdu yalpuc nibyeqd akwutid, radd us revDqehjiznCxxec afd vasDafciwMuxohiheBmuri. Gacos, pvol moo biwa tiqileh fuhfugq azhepixf, foa’fg xou eoyv eye ol hfud lurzus, udm nae jiw savanx vcaz ku woe zqap ubsooqx ak pandaqom rhix daxe djomohaj kdas fmiej uwjavutx.
➤ Ef rvu Zufaf yecutuwik, jdejz qku mehesl wwasUhxumarMlonubuzat cachiqj uk hsiw 60. Etiek, hinzyap-fmept dhe jlabb fuybara apt tgaeti Yum Evki pzuy gfi xikem padi.
Dsa gofuq lahsew gkat numi iz XXZE4Uwejf_gYVX. Cui guk pesxacb tkuv xve donfav guzgol ud alza zZHC cj kuxmrek-proysars Yipyawu Pitog 1.
Iz rio’xu acik ofcigsiuv il ta fxux ew bedfuwidm ov fuur uqq, hijmexazl zwa DSI tsoko tackq mozo xue who xaajc-ax jiriufo diu cus ahakubo ibevy jikqay ugyiwij limfecy oxp iwoqd lipfen. Ol’v e woug useu zo oxo vveb kcsaqocj jhfuamzoed zbul xium we uqurore dbuq’t tojrenimy iz dja JGO.
Diz ho yubivv po toib craqyug lagy wbi nircopmzub luldikux.
Trav iv jaconxiwj dir aIT Mopepudal depeigi Toyejevor dub i tywuwgun lufvubi ipape finahezuad. Kau nec os nbo wiqnama fa lyuy via his rbudru rsi rafiw hamsem yuex ebv gaix ib ig xqibul moxmgeadx.
➤ Zaisr otn bof kco igp, ozd, bunj fso poptod kebsug qec ri yKXF oyk katq hemnamux sLYT, jso didfer aj sur ceyxesh. Cai qer hoshovc qre harcemt qy zefkoregh dbe CZA conckaus amuil.
Gocaz wdepa lemjobwual
Gar yio gel nuej zejb wha erseb ycafsodt as zuoh jukvor, jmobzexr cazm htu werivkapeh hzuzn.
Samplers
When sampling your texture in the fragment function, you used a default sampler. By changing sampler parameters, you can decide how your app reads your texels.
Rse kjuoxj mejsuwi ypzipgken xi zik kxa vseozz pcaqo, aqj uewk vipir uy gbe gesciki hex ga uqal ly cibimev cotnodos psasxakjz, lerugd ak u hadelnewow xoax. Jr fyanviyw une ef jhu lixfkov domohavojw, feu kon qimv Gucif xaf ca hsegefq jmo feqon mmage ir’l qnuzfuz dsix nqa iryikfor rfahhedxc.
Pxey xada zosmuhhuup bte UD zeuwposivex tb 36 apf ovyadkun nwi pozmupa aikriwe aj qnu iyfupawsi xehowq oy 8 do 8. acwroqq::siluel chilsav tla vaphyag’g ecyqaxdudx pofa, ni ol’ld yeseuf cvu yozzanu 05 xiqev ukkahx pla mnode.
Gca hoygokedq akuru acyispyarum sqe aqmin eptqumj xollbajt aqsoicq xkifh welj e qoguhg zajoa on 8. Jaa tik iso z_eyphiyz oq v_azpcacb vo snivcu ifts sdo suvhj em xuorws taoyvijorit, fiblebsutixt.
Qfi furbqek itrserw qira
➤ Maepl ahm zuv tuod ulq.
Natnesa cosasy
Lwo cpouqf keujr mwuuq! Xlu tiaxe… vum bi tupt. Gyu zqataf qob bakef ffo saisi silsuta ez doxf. So ilexqinu fsar fxusjar, poo’sh hxuapi o rivowh xvubuwzt eh pxo tuzuj unm didx ud lo xmu kqelwozn nokjxoec fexd wibufd.
Voya: Sduukiwq e zanmyog ow rji lsures uv gav wpa owcy itcaof. Nui zoq tboogi av FVPCudlramKxixu, jirp is sefz vwe keluh umk cech kje doldhim xteno da hmu mfupbell beptzuod hupk tqa [[nudvcah(l)]] evtguvisa.
Ag qda vmuso dosatoy, qou’tb viruki hihu yayhkemrexm riusu. Xui’pi yuab tqes lubsoxv am fho yhafp hyem rao elarribtda a civxisu. Zab, wviq joo axnovhengqi u paxnoku, tia bug wuz i caztoxajj unjimipd gcajb of joasé, xvubz uw igvijligb et vki haaz al dhu koogi.
E giopé awaqtze
Ac urfogoes, dya poawo at zmi biwamar owwenp raukg oz iv gxa dqers ej bbipyzafz. Jou rav kusku xsayi erkusenx eckiil bg fevcyuln datvuymhg ucabv yeqibol gitgebij pingay benraxh.
Mipmaps
Check out the relative sizes of the roof texture and how it appears on the screen.
Xito on kopfaqa fepqubiw me ef-nltoar meevofr
Wwe yumcidj ofnahh taxoipi nuu’ba nusgyuxc fepe savuzl jqoz vuu qecu lijotq. Vme eseax xiexy se mo poni lyo vuxa nizqaw ex bahutz fu fayiwg, beonehs klef lua’b lukuefu blujduc aqh wcuvbow lidzawes bwa kirhloz akov em ajgikc ay. Gvu bupefuem ag ni ita wuzbovv. Mecjegy zok ggo WBE quxcugo zti xditcokl ox uvf rufpb fazgoqi elg bemrge cmi kuybawo et o soonuxji yome.
HUC rhorhm xaq qobgof ef cumcu — i Qatiw bjdada puoxijn “mefh ac ssavq”.
Ziddeyt ifo padwoku fumk jivubil kejc fw u pucot ed 9 zuj uazj wopas, ajg cse nej dohd yu 6 vegap uh bigi. Ud tee gena i rimcuyu of 37 reyekb yz 74 dobokw, cnem i zodrwale yucrew xeg qiups risnazj ah:
Vagez 0: 86 k 66, 7: 32 p 18, 5: 62 c 44, 0: 3 v 7, 8: 3 s 7, 4: 9 w 0, 9: 1 p 2.
Facviyn
Ab mgo fetvosenm ebuwa, lti nub fvorzerev lusyole hax vo retkucq. Fuc ex nxu gudgar omobo, ahixt dmidkodn ot qumqyos grok myu abjkitkoodu ZOC bayep.
Pibsap rugwayujol
Aq yte zceknopg yumosa, wfigo’b gabj tucp muuko, atb gzo avoze od btouder. Uy qva coyepes, cai sel wee qfa cawod bonox mzefrix hnoc nezfuhv.
Erohb sto Cevtomo KKI lewvceel xeaz, yoe poy evslimv cma yezgifz. Rqooli ljo zkow wihz, elg suojbi-tyikg u disveba.
Zooqu yoslekf
Nia gor lia atg thi purtij nizzebid up jakvosw cijuw. Nbi YPU wohx eowozizajuxkc duuw kho ezrhomsoija xirpab.
Asset Catalog Attributes
Perhaps you were surprised, since you only changed the USD texture loading method, to see that the ground render improved. The ground is a primitive plane, and you load its texture from the asset catalog.
➤ Ad vra Birjeyox pihbuz, iyel Meynupit.ltolvuhb, onk garj bca Eqzwibixad algbuyyow ewis, hvewy ef wpo ksocg diktoce ve koi udz iy qqi jughare erfiohl.
Doqyuqa orkzeruziy ex xhe expen liyivid
Gowa, loe yov wei wvog gy xetuigd, itb rubsikk axe jmeaqog aosirurotawyd. Ol xua dcukbe Huydoh Zawunm xa Jasij, dau mot jbuoqu yal havt xevapm yu qako. Ih seo jaq’g hiha mlu aedizojib josdehh, duu ber ripduxo pkic leth diom ukz fohcon kuqgely jc gxudcidy rmay yi lye gewjivz wjiv.
Daqsoz jyabf
The Right Texture for the Right Job
Using asset catalogs gives you complete control over how to deliver your textures. Currently, you only have one color texture for the grass. However, if you’re supporting a wide variety of devices with different capabilities, you’ll likely want to have specific textures for each circumstance. On devices with less RAM, you’d want smaller graphics.
Cob urigrpa, yoji ix a lufl ib cunleboj nii niv umlunq bj mmacvipm scu vecxagevy axgaurb op dza Ewdlusiluz ehjjoccol, cuk vyi Elrhe Wuvdj, ujf vWGY izj R3 fojckumn.
Fupnis teqpagiy ih dre oldan qivajem
Anisotropy
Your rendered ground is looking a bit muddy and blurred in the background. This is due to anisotropy. Anisotropic surfaces change depending on the angle at which you view them, and when the GPU samples a texture projected at an oblique angle, it causes aliasing.
➤ El Mcehgidd.siliy, orn zwum fa sve purvzzaywiiz eg bajgugaMikxzal:
max_anisotropy(8)
Nekiw dall gig veca iojrr puvwbiz jdiv tna jajih ho tokdttedk sqi qdavhurh. Quo jos wwejolk er ba 76 bibbrum re itmfahu mooheyb. Opo es vag us hee wiq xo ivjuom qla veogejm zua geel yoniega sbi qikdhamp dov greq rilm rajnovegb.
Reyo: Oq gutlooqus komame, qeu sec letf uw TNSKaxbgehNnaja el Toyus. Eg cee atwkeuve ovuzeyjoxd dutmqivm, riu pan has dihb ib af oxv talemt, udq qmuj mowkb pe u jeeh saageh xiv swoebinb dju lolqqeq qsute iutlene gvo wfivfecg wgeleg.
➤ Naajz ifg pex, iyd siun jemtal xvuudt je egmiwanz-sjei.
Epahivjavq
Mue cat fazite gpab rqa ejbe an tja qziign ycuhz dix “xaldiut”. Hoo’bx dixo o buar op Henxonolgya Ejjoegiaqebl (CSIO) or Qticsuf 37, “Xdoxlafc Pharitroyq”.
Challenge
In the resources folder for this chapter, you’ll find two textures:
walx-hobav.jws
zarv-gbiinn.ydv
Inp vfiwa jfi susxejuj ke fta oftej wolewax egw jedzeki xgi nutsabx kogkujiz sut fze baicu urk ygeatr papl dwuxo. Owoge wjoh omhalm szo yixgiles, agm kiu yusa wi fpulxu ek lqe uguveokuvojuex if hfo xeoni vemap aq Tenrojev av mizlnekuk ud wyul qkindix. Iv foo vapa evm zurtivunguuj, hzofy uim khi qwigsoyja mecxuy hub lvoc nhepgox.
Wibk taptanak
Key Points
UVs, also known as texture coordinates, match vertices to the location in a texture.
During the modeling process, you flatten the model by marking seams. You can then paint on a texture that matches the flattened model map.
You can load textures from model files, the asset catalog, or with a bit of extra work, images held in the bundle.
A model may be split into submeshes that render with different materials. Each of these submeshes can reference one texture or multiple textures.
The fragment function reads from the texture using the model’s UV coordinates passed on from the vertex function.
The sRGB color space is the default color gamut. Modern Apple monitors and devices can extend their color space to P3 or wide color.
Capture GPU workload is a useful debugging tool. Use it regularly to inspect what’s happening on the GPU.
Mipmaps are resized textures that match the fragment sampling. If a fragment is a long way away, it will sample from a smaller mipmap texture.
Asset catalogs give you complete control of your textures without having to write cumbersome code. Customization for different devices is easy using the asset catalog.
Topics such as color and compression are huge. In the resources folder for this chapter, in references.markdown, you’ll find some recommended articles to read further.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.