History:
This has been ongoing for the past several years. I've always thought it was related to HEVC media, but in VP 22 I can replicate it just using Vegas' Generated Media. It took me a while to realize the problem results from an interaction between the Levels and Curves fx, in that order -- it is not just an issue with one or the other in isolation.
What it Is:
When used in combination at the clip level in a project-properties --> pixel formal --> 32-bit video levels project, Levels followed by Color Curves fx corrupt the clip brightness level, resulting in a much darker (and while playing, sometimes flickering) image.
How to Replicate:
Open a new 8-bit project in Vegas Pro, add a video track, and insert --> generated media --> color gradient to that track:
Now, at the clip level, add a Levels and a Color Curves Fx. Adjust the Levels to these numbers:
Input Start: .053
Input End: .825
Switch to the CC fx, and add contrast with the Color Curves fx:
You should be seeing something like this:
This is what things should look like--the levels fx is being applied properly, clipping the whites/blacks, and then the curves fx is being applied after the levels to remap the result with a "S" curve.
32-bit comparison:
Now, switch to project properties --> pixel format --> 32-bit video levels.
On my system, this is what I see:
The levels are badly corrupted. For me this happens with GPU acceleration on (NVIDIA RTX 3050 Ti) or off.
Interestingly, if I replace the Levels Fx with a LUT filter (replicating the Levels), that combination works with GPU acceleration "on", and breaks with GPU acceleration off.
Note that this can create a brightness flickering effect during playback/render, as (at least in past versions) the image would jump back and forth between correct and incorrect rendering.
Workarounds:
You can pair either Levels or Color Curves fx with a corresponding adjustment in the Color Grading Panel, ie clip Levels Fx + GC or GC + clip Color Curves Fx.
I personally find the CG panel slows my workflow and absolutely slows my renders. The Color Curves Fx seems clearly superior to me compared to the curves section of the GC panel, not only because you can animate it but also because it's a lot easier to control.
You can also delete the levels fx and add points to the Color Curves fx to replicate the effect of the levels fx. This gets tricky if you also want to use the levels fx to make gamma adjustments, however:
Final Thoughts:
This problem has been around for a while. It basically precludes using Levels + Curves fx in a 32-bit (video levels) project.
I first started posting about the issue three years ago. Hopefully, the steps I've outlined above will allow people to easily replicate the problem themselves, and give Vegas developers the information they need to finally address it.