Method UseTextureFragmentDepth
UseTextureFragmentDepth(TextureHandle, AccessFlags)
Use the texture as a depth buffer for the Z-Buffer hardware. Note you can only test-against and write-to a single depth texture in a pass. If you want to write depth to more than one texture you will need to register the second texture as WriteTextureFragment and manually calculate and write the depth value in the shader. Calling UseTextureFragmentDepth twice on the same builder is an error. Write: Indicate a texture will be written with the current fragment depth by the ROPs (but not for depth reading (i.e. z-test == always)). Read: Indicate a texture will be used as an input for the depth testing unit.
Declaration
TextureHandle UseTextureFragmentDepth(TextureHandle tex, IBaseRenderGraphBuilder.AccessFlags flags = AccessFlags.Write)
Parameters
Type | Name | Description |
---|---|---|
TextureHandle | tex | Texture to use during this pass. |
IBaseRenderGraphBuilder.AccessFlags | flags | How this pass will acess the texture. Default value is set to AccessFlag.Write |
Returns
Type | Description |
---|---|
TextureHandle | A explicitly versioned handle representing the latest version of the pased in texture. Note that except for special cases where you want to refer to a specific version return value is generally discarded. |