1. 首页
  2. 编程语言
  3. 其他
  4. Sporeanimsiggraph08

Sporeanimsiggraph08

上传者: 2020-01-03 20:14:31上传 PDF文件 13.87MB 热度 31次
SPECIAL EFFECISSIGGRAPH2011UnityWhat are special effects?Why are some effects they"special?How to"enable"them in Unity?NOk, so here we see a lightmapped scene(running deferred), so let's just define special effects", for the purpose of this talk, as the result of this imagesubtracted from this image. This results inNthis As you can see, we're mostly adding things to the color buffer, so let's just say for now that doing special effects is"adding stuff to the color buffer at some later point inrenderingT○○LS○ FTRADEDepending on what you needseveral options in Unity to add stuff to the screen(Multi-pass) shadersSurface shaders or oldschool CG vertex/pixelParticle systemsCamera. On RenderlmageOCamera. OnPostRenderoGraphics. DrawMesh(), DrawMeshNowalso, Mono Behaviour. OnWillRenderObjecto for visibility determinationThere are several ways to create effects in unity, all depending on the kind of effect you want to getYour tools of trade in Unity for making effects are the following the multi-pass shader system, along with the on renderlmage and on PostRender functions to add stuff to thescreen. Furthermore, DrawMeshNow( and DrawMesho are very useful for drawing selected objects a second time when shader passes won 't be enough), alsoOnWillRenderObject is good to find out if an object is seen by a camera or notAB○∪TB∪ FFERSSIGGRAPH2011UnityLet's talk about various buffers that are available in Unity, which are either part of the rendering or can be easily createdDEPTHDEPTHDistance from the cameran[O,门 rangeNonlinear distributionPrecision, 24 or6 bitsHow to get it?Just ask for itcamera. depth lextureMode= Depth lextureMode DepthIt's just there when running deferredThe depth buffer is storing the distance from camera's near clip plane the values are in the [0; 1] range with nonlinear distribution The precision is usually 24 or 16 bitsHow do you get it? Just ask for it by setting camera. depthTexture Mode to Depth then the depth buffer will be available as CameraDepth TextureUnity is hiding the burden of getting the depth buffer from you. We are binding the buffer when possible or rendering the scene with a replacement shader when it's not
下载地址
用户评论