看了看景深的源码,然后在文档中找到
DepthTextureMode.Depth
Description
Generate a depth texture.
Will generate a screen-space depth texture as seen from this camera.Texture will be in RenderTextureFormat.Depth format and will be set as_CameraDepthTexture global shader property.
See Al

本文介绍了如何在Unity中利用Camera Depth Texture Mode生成并使用深度图。通过设置Camera的depthTextureMode为Depth,可以生成屏幕空间的深度纹理,并在shader中作为全局属性使用,例如在景深效果中。激活此模式后,Unity将自动创建深度纹理,供后续图像效果处理使用。


被折叠的 条评论
为什么被折叠?



