Copyright © 2026 Unity Technologies
Thank you for reporting a bug to Unity. This feature has been implemented in 6000.6.0a3 version of the editor. First you need to add a flag to enable this behavior: `SetExtendedFeatureFlags(ExtendedFeatureFlags.DepthAttachmentAsInputAttachment);`. But with your current setup another exception will be thrown. When you call SetInputAttachment with ExtendedFeatureFlags.DepthAttachmentAsInputAttachment flag set. The depth render attachment is infered from the linked texture for the SetInputAttachment, and its handled automatically. If you call SetRenderAttachmentDepth in this setup you will get an exception of the texture being already in use. Without this call its already bound as an input and depth render attachments. You should update your code to something like this: builder.SetRenderAttachment(resourceData.activeColorTexture, 0, AccessFlags.Write); if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Vulkan) { builder.SetExtendedFeatureFlags(ExtendedFeatureFlags.DepthAttachmentAsInputAttachment); builder.SetInputAttachment(resourceData.activeDepthTexture, index: 0, AccessFlags.Read); } else { builder.SetRenderAttachmentDepth(resourceData.activeDepthTexture, AccessFlags.Write); } The example of how to structure the attachment calls can be found here: https://github.com/Unity-Technologies/Graphics/blob/9e59257db5048eec3dd55810985596160e21db75/Packages/com.unity.render-pipelines.universal/Runtime/Passes/RenderObjectsPass.cs#L260-L274 We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
Unity 6000.2 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
Cancelling: the 6000.1 version has reached its end of life. If you need additional fixes, please upgrade to a newer Unity version.
Reproduction steps:
1. Open the attached “IN-100408.zip” project
2. Go to Edit > Project Settings > Player
3. Switch the Graphics API to Vulkan
4. Observe the Console
Expected result: No errors
Actual result: "InvalidOperationException: Trying to SetRenderAttachment on a texture that is already used through UseTexture/SetRenderAttachment.” errors
Reproducible with: 6000.0.48f1, 6000.1.2f1, 6000.2.0a10
Couldn’t test with: 2022.3.62f1 (“Error CS0234: The type or namespace name 'RenderGraphModule' does not exist in the namespace 'UnityEngine.Rendering'“)
Reproducible on: Windows 10 (User reported), Windows 11
Not reproducible on: no other environment tested
Notes:
Issues you vote on will appear here