书签 分享 收藏 举报 版权申诉 / 33
上传文档赚钱

类型各种强大模板课件.pptx

  • 上传人(卖家):三亚风情
  • 文档编号:3344599
  • 上传时间:2022-08-22
  • 格式:PPTX
  • 页数:33
  • 大小:3.22MB
  • 【下载声明】
    1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
    2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
    3. 本页资料《各种强大模板课件.pptx》由用户(三亚风情)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
    4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
    5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    各种 强大 模板 课件
    资源描述:

    1、Adam SchaefferMicrosoft CorporationSESSION CODE:WPH308锐普PPT论坛chinakui首发rapidbbsConsistent sets of hardware capabilities defined by MicrosoftResolutionTouch InputCPU/GPURAMHardware keyboard is optional锐普PPT论坛chinakui首发:rapidbbs锐普PPT论坛chinakui首发:rapidbbsLow level controlStraight to the metalRaw perfor

    2、mance tuningHigh level abstractionRely on compiler and runtimeDeveloper productivity锐普PPT论坛chinakui首发:rapidbbsPowerful and expressiveType safety reduces hard-to-track-down bugsReflectionInitializer syntaxGreat tooling(IntelliSense)Similar enough to C that learning and porting are easyBlazingly fast

    3、compilesC#锐普PPT论坛chinakui首发:rapidbbsUsually within a few percent of native performanceAwesome generational garbage collectionPerformance shootout:Raymond Chen vs.Rico Marianis.msdn/ricom/archive/2019/05/10/416151.aspx锐普PPT论坛chinakui首发:rapidbbsSignificant delta between managed and native.NET Compact

    4、FrameworkSimplistic mark-and-sweep garbage collectionXbox is not a general purpose computerUnforgiving in-order CPU architectureRequires custom VMX instructions for optimal math perfSecurity architecture poses challenges for jitted code锐普PPT论坛chinakui首发:rapidbbsIn between Windows and Xbox 360.NET Co

    5、mpact FrameworkKeep an eye on garbage collection!ARMv7 CPUMore forgiving toward jitted codeARM jitter is more mature than PPC锐普PPT论坛chinakui首发:rapidbbsInstance methodInterfaceDelegate/eventReflectionVirtual method锐普PPT论坛chinakui首发:rapidbbsC+allows independent choice of.NET types dictate their alloca

    6、tion and usage semanticsData typeThe memory in which a type lives(placement new)How a type instance is referenced(T,T*,T&,const T&)Value typesint,bool,struct,Vector3Reference typesclass,array,string,delegate,boxed value types锐普PPT论坛chinakui首发:rapidbbsOft-repeated wisdomValue types live on the stackR

    7、eference types live on the heapValue types live wherever they are declaredReference types have two piecesMemory allocated from the heapA pointer to this heap memoryThat is subtly incorrect锐普PPT论坛chinakui首发:rapidbbsBy default,prefer class over structureUse struct for things that areSmall(=16 bytes)Sh

    8、ort livedPass large structures by referenceMatrix a,b,c;c=Matrix.Multiply(a,b);/copies 192 bytes!Matrix.Multiply(ref a,ref b,out c);锐普PPT论坛chinakui首发:rapidbbsC+.NETAllocateInitially fast,becoming slower as fragmentation increasesVery fast,apart from periodic garbage collectionsFreeFastInstantaneousF

    9、ragmentationIncreases over timeNoneCache coherencyRequires custom allocatorsThings allocated close in time are also close in physical locationGarbage collection is not optionalCant have type safety without automatic memory management锐普PPT论坛chinakui首发:rapidbbsTriggered per megabyte of allocation1Star

    10、ts with root references(stack variables,statics)2Recursively follows all references to see what other objects can be reached3Anything we didnt reach must be garbage4Compacts the heap,sliding live objects down to fill holes5锐普PPT论坛chinakui首发:rapidbbsFrameworks designed for performanceFrameworks desig

    11、ned for performanceMake it run Less OftenIf you never allocate,GC will never runMake it Finish QuicklyCollection time is proportional to how many object references must be traversedUse object poolsSimple heap=fast collectionUse value types and integer handles锐普PPT论坛chinakui首发:rapidbbsExplicitly forc

    12、es a garbage collectionUse wisely to give yourself more headroomAfter loadingDuring pauses in gameplayDont call every frame!锐普PPT论坛chinakui首发:rapidbbsBeware of boxingstring vs.StringBuilderUse WeakReference to track GC frequencyhttp:/s.msdn/shawnhar/archive/2019/10/12/monitoring-the-garbage-collecto

    13、r.aspxUse CLR Profiler on WindowsSee MIX10 talk:“Development and Debugging Tools for Windows Phone 7 Series”Use.NET Reflector to peek behind the curtainhttp:/red-gate/products/reflector/锐普PPT论坛chinakui首发:rapidbbs锐普PPT论坛chinakui首发:rapidbbsPlus hardware accelerated 2D sprite drawingBasicEffectSkinnedE

    14、ffectEnvironmentMapEffectAlphaTestEffectDualTextureEffect锐普PPT论坛chinakui首发:rapidbbs0-3 directional lightsBlinn-Phong shadingOptional textureOptional fogOptional vertex colorBasicEffectVertex CostPixel CostNo lighting51One vertex light401Three vertex lights601Three pixel lights1850+Texture+1+2+Fog+4+

    15、2锐普PPT论坛chinakui首发:rapidbbsDualTextureEffectFor lightmaps,detail textures,decalsBlends two texturesSeparate texture coordinatesModulate 2X combine mode(A*B*2)Good visuals at low pixel costVertex CostPixel CostTwo Textures76+Fog+4+2锐普PPT论坛chinakui首发:rapidbbsFor billboards and impostersAdds alpha test

    16、 operations(pixel kill)Standard blending is free with all effectsOnly need alpha test if you want to disable depth/stencil writesAlphaTestEffectVertex CostPixel Cost,=,66=,!=610+Fog+4+2锐普PPT论坛chinakui首发:rapidbbsSkinnedEffectFor animated models and instancingGame code animates bones on CPUVertex skin

    17、ning performed by GPUUp to 72 bonesOne,two,or four weights per vertexVertex CostPixel CostOne vertex light554Three vertex lights754Three pixel lights3351+Two bones+7+0+Four bones+13+0+Fog+0+2锐普PPT论坛chinakui首发:rapidbbsEnvironmentMapEffectOooh,shiny!Diffuse texture+cube environment mapCheap way to fak

    18、e many complex lightsFresnel term simulates behavior when light reaches a surface and some reflects,some penetratesVertex CostPixel CostOne light326Three lights366+Fresnel+7+0+Specular+0+2+Fog+0+2锐普PPT论坛chinakui首发:rapidbbs锐普PPT论坛chinakui首发:rapidbbsFramerateNumberof PixelsPixel Cost锐普PPT论坛chinakui首发:

    19、rapidbbsFramerate 30 hz refresh rate No point updating faster than the display!Game.TargetElapsedTime=TimeSpan.FromSeconds(1f/30);锐普PPT论坛chinakui首发:rapidbbsPixel Cost Prefer cheaper effects Minimize overdrawMany known algorithms:Distance,frustum,BSP,sort front to backImplement“overdraw x-ray mode”Dr

    20、aw untextured with additive blendingBrighter areas indicate overdraw锐普PPT论坛chinakui首发:rapidbbsNumberof Pixels 800 x480 is 25%more pixels than Xbox 1Great for textToo many pixels for intensive games800 x480=384,000 pixels600 x360=216,000 pixels(56%)Dedicated hardware scaler Does not consume any GPU H

    21、igher quality than bilinear upsampling锐普PPT论坛chinakui首发:rapidbbs锐普PPT论坛chinakui首发:rapidbbsAvoidPreferRenderTargetUsage.PreserveContentsRenderTargetUsage.DiscardContentsdevice.BlendState=new BlendState.;/At startupstatic BlendState myState=new BlendState.;/Per frameDevice.BlendState=myState;VertexBuf

    22、fer.SetData(.)device.DrawUserPrimitives(.);/orDynamicVertexBuffer.SetData(.,SetDataOptions.NoOverwrite);锐普PPT论坛chinakui首发:rapidbbsGreat performance comes from great knowledgeUnderstandActionsValue types vs.reference typesGarbage collectionC#compiler magic(foreach,iterator methods,closures)Cost of the different graphical effect optionsUse CLR Profiler and.NET ReflectorRender smaller than display resolution,rely on scaler锐普PPT论坛chinakui首发:rapidbbs锐普PPT论坛chinakui首发:rapidbbs锐普PPT论坛chinakui首发:rapidbbs

    展开阅读全文
    提示  163文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:各种强大模板课件.pptx
    链接地址:https://www.163wenku.com/p-3344599.html

    Copyright@ 2017-2037 Www.163WenKu.Com  网站版权所有  |  资源地图   
    IPC备案号:蜀ICP备2021032737号  | 川公网安备 51099002000191号


    侵权投诉QQ:3464097650  资料上传QQ:3464097650
       


    【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。

    163文库