到目前為止,我們已經學習了物體在其空間的內互動運動。接下來研究一下物體之間的互動運動。這就需要確定物體間何時發生了碰撞,這就是我們所講的碰撞檢測(Collisiondetection 或 Hit testing)。 本章我會盡量將所有需要掌握的相關知識告訴大家。其中包括兩個影片的碰撞,影片與點之間的碰撞,用距離檢測碰撞以及多物體碰撞檢測方法。首先,來看一下有什麼現成的碰撞檢測方法。碰撞檢測方法
ShaderLab syntax: UsePassThe UsePass command uses named passes from another shader.UsePass命令可以調用在另外1個Shader中已經被命名的passes 。Syntax 文法UsePass "Shader/Name"Inserts all passes with a given name from a given shader. Shader/Name contains the name of the
ShaderLab syntax: GrabPassGrabPass is a special passtype - it grabs the contents of the screen where the object is about to be drawn into a texture. This texture can be used in subsequent passes to do advanced image based effects.GrabPass 是一種特殊的通道類型
ShaderLab syntax: Alpha testingThe alpha test is a last chance to reject a pixel from being written to the screen.alpha測試是最後一個機會,拒絕將一個像素寫到螢幕上。(可以理解為在將畫面顯示到螢幕上的最後1次修改,這次修改只能讓該像素顯示或不顯示)After the final output color has been calculated, the color can
ShaderLab syntax: Blending 混合Blending is used to make transparent objects.混合是用來製作透明物體的。When graphics are rendered, after all shaders have executed and all textures have been applied, the pixels are written to the screen. How they are combined with
ShaderLab syntax: Pass TagsPasses use tags to tell how and when they expect to be rendered to the rendering engine.pass使用標記來告訴渲染引擎在什麼時候該如何渲染他們所期望的效果。SyntaxTags { "TagName1" = "Value1" "TagName2" = "Value2" }Specifies TagName1 to have Value1, TagName2
ShaderLab syntax: FallbackAfter all Subshaders a Fallback can be defined. It basically says "if none of subshaders can run on this hardware, try using the ones from another
ShaderLab syntax: other commandsCategory 分類Category is a logical grouping of any commands below it. This is mostly used to "inherit" rendering state. For example, your shader might have multiplesubshaders, and each of them requires fog to be
ShaderLab syntax: BindChannels 綁定通道。BindChannels command allows you to specify how vertex data maps to the graphics hardware.BindChannels 命令 允許你指定頂點資料如何映射到顯卡中。BindChannels has no effect when programmable vertex shaders are used, as in that case