SisyMi
August 19, 2024, 4:13am
1
when i wanna get scene depth and scene normal ,i found that there was noly scene depth but scene normal.i wanna it to do Edge detection in Shader graph like using scene depth.how can i get that?
If you are using URP, Try URP Sample Buffer
node. If you want to get more info, you can look into this answer:
Turn on Opaque Texture and Depth Texture in your URP Pipeline Asset, then you can use _CameraDepthTexture and _CameraOpaqueTexture in shader. Or you can get current color and depth texture in resourceData, and send them to shader using commandbuffer. For camera normals texture, configure input in your renderer feature setup, YourRendererPass.ConfigureInput(ScriptableRenderPassInput.Normal);, then you can use _CameraNormalsTexture in shader or get it with resourceData.cameraNormalsTexture and se…
1 Like