- Home /
RenderTexture synchronization issues.
Both ComputeShader.Dispatch and Graphics.Blip is not awaited, their execution time is nearly zero. And I need either compute shader or fragment shader to generate precomputed texture in a LOT of passes (O=n^2, where n is input texture texels).
When I'm calling generation at one iteration per call, it takes way too much time, hundreds or even thousands times more that it would be if I'd generate everything in single call. But I can't generate everything in a single call, because it'd take too long so OS would restart graphics drivers. So, I'm trying to dynamically get shader execution time to determine how many passes it should execute at once so that single execution would take about 0.5 seconds.
But I can't find a convenient way to determine execution time. For compute shader as a workaround I have to use dummy buffer which I access after calling Dispatch. And for Blit I can't even find any workarounds. And I'd prefer to use Blit, because it seems that compute shader has slightly worse performance for whatever reason.
Answer by Aberro · Nov 19, 2020 at 07:26 PM
I had to resolve it by measuring update time between frames, so, no debugging allowed.
Your answer
Follow this Question
Related Questions
Prevent Render Texture clearing 1 Answer
Need Help Getting RenderTexture & Graphics.Blit Working: Boosting Mobile Performance 0 Answers
Blit camera targetTexture to screen 2 Answers
Modify Gbuffer Layout / Add RenderTarget 2 Answers
How to make a custom GrabPass-like sampler2D in MRT shader? 0 Answers