Camera Depth Texture : 카메라 뎁스 텍스쳐 포워드 렌더링에서 카메라 뎁스 텍스쳐가 필요한 경우가 있습니다. 디퍼드 렌더링 상태에서는 뎁스 텍스쳐가 걍 있으니까... 근데 포워드 렌더링 상태일때는 없죠 그럴때는 뎁스 텍스쳐를 생성시켜야 합니다 출처 https://lindenreid.wordpress.com/2017/12/15/simple-water-shader-in-unity/ using UnityEngine; [ExecuteInEditMode] public class DepthTexture : MonoBehaviour { private Camera cam; void Start () { cam = GetComponent(); cam.depthTextureMode = DepthTextureMode.Depth; } }이 스크립트를 카메라에 적용해 줍니.. 2019. 2. 1. 이전 1 다음 반응형