You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If we have autoresolve it means msaa rendertextures render as MSAA but magically resolve in the driver when accessed as a texture, the MSAA surface is fully hidden inside the GFX device
315
+
// this is contrary to most platforms where the resolve magic on reading happens in the engine layer (and thus allocates proper multi sampled and resolve surfaces the engine can access)
316
+
// So in the cases of auto resolving, and a renderpass framebuffer fetch emulation layer we can't correctly access the individual unresolved msaa samples and thus don't allow this case here
317
+
// Note: In practice the above check mostly triggers on GLES.
318
+
returnfalse;
319
+
}
320
+
321
+
returnCanCopyMSAA();
322
+
}
323
+
301
324
/// <summary>
302
325
/// Copy a texture to another texture using framebuffer fetch.
303
326
/// </summary>
304
327
/// <param name="cmd">Command Buffer used for rendering.</param>
328
+
/// <param name="isMSAA">Use the MSAA variant of the copy shader (otherwise single sample is used).</param>
305
329
/// <param name="force2DForXR">Disable the special handling when XR is active where the source and destination are considered array
306
330
/// textures with a slice for each eye. Setting this to true will consider source and destination as regular 2D textures. When XR is
307
331
/// disabled, textures are always 2D so forcing them to 2D has no impact.</param>
Copy file name to clipboardExpand all lines: Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/315_CoreCopyAndBlit/CoreCopyBlitTestFeature.cs
+28-4Lines changed: 28 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,15 @@ class CustomRenderPass : ScriptableRenderPass
// This blit does nothing, it tints the color buffer by 1,1,1 it just ensures the blit pass below renders correctly
56
+
// I "assume" it ensures vulkan thinks the color buffer has changed and it will correctly pick up the values in the inverse blit pass below.
57
+
// Without this dummy pass it actually picks up the untinted values (i.e. the results of the copy pass above are not visible)
58
+
// My suspicion is that this is because the copy pass goes through the renderpass api and the blit goes through setRT
59
+
// we've seen similar issues before in other code where mixing renderpasses/setRT confused things.
60
+
// When looking at this in renderdoc without this dummy pass you will see:
61
+
// Pass "DrawOpaqueObjects": Resolves to 2d color attachment #x
62
+
// Pass "Copy MSAA 2": Resolves to 2d color attachment #y
63
+
// Pass "Blit inverse using Material": Reads from color attachment #x < so it incorrectly picks an old version X istead of Y (note: this is the resolve target specifically the MSAA samples target seems to be correct?)
0 commit comments