欢迎来到天天文库
浏览记录
ID:32047847
大小:5.47 MB
页数:83页
时间:2019-01-31
《[HLSL.and.Pixel.Shaders.for.XAML.Developers(Early.Release,2012.4)].Walt.Ritscher.文字版》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、O’ReillyMedia,Inc.4/5/20121Shader101ItseemsanobviousquestiontoaskatthebeginningofanHLSLandshaderbook;whatexactlyisashader?It’sasmallprogramoralgorithmwrittenexplicitlytorunonacomputerGraphicsProcessingUnit(GPU).ItprovidesawayfordeveloperstoextendtherenderingcapabilitiesoftheGPU.Anyprogramthatw
2、orkscloselywithgraphicswillbenefitfromusingshaders.Thevideogameindustryspinsoffcustomshadersbythethousands,theyareasvitaltogameprojectsasbusinessentityclassesaretolineofbusinessapplications.Nothingprohibitsbusinessprogrammersfromexperimentingwithshadersintheirlineofbusiness(LOB)applications,in
3、factrecenttrendsinuserinterface(UI)designandinformationvisualizationcryoutforshaderuse.BecauseshadersrunatthekernelleveloftheGPUtheyareautomaticallyparallelizedbytheGPUhardwareandareextremelyfastatmanipulatinggraphicoutput.Typically,theGPUcanprocessshadersseveralordersofmagnitudefasterthanifth
4、eshadercodeisrunonaCPU.WhyXAMLdevelopersshouldlearnHLSL?IfyouareaXAMLdeveloper,I’llwageryou’veheardaboutpixelshaders.Infact,youmaybeusingsomeoftheseeffectsinyourapplicationalready.WPFintroducedtheDropShadowEffectandBlurEffectin.NET3.5SP1andbothoftheseclassestakeadvantageofpixelshaders.Silverli
5、ghtaddedpixelshadersinSilverlight3.TheWindowsPhoneteamdisappointeddevelopersbydroppingsupportforshadersbeforethefinalreleaseoftheirhardware.Microsofthadgoodreasontoditchphoneshadersastheycausedasignificantdragonperformance,buttheirlossisstilllamentable,TomakeupforthatsetbacktheSilverlight5rele
6、aseincludessupportforXNAmodelsandshaders.ThisisawesomenewsasitmeansthatyoucanmixXNAandSilverlight5togetherinthesameapplicationandthatgivesyouaccesstoanotheressentialshadertype;theVertexshader.XNAisaMicrosoftframeworkthatfacilitatesgamedevelopmentonthePC,theXbox360,andWindowsPhone7.Itgiveyouacc
7、esstothepowerofDirectXwithouthavingtoleavethecomfortofyourfavorite1O’ReillyMedia,Inc.4/5/2012.NETprogramminglanguages.TolearnmoreaboutXNAgetacopyofLearningXNA4.0byAaronReedfrom:http://shop.oreilly.com/product/0636920013709.doAsaXAMLdeve
此文档下载收益归作者所有