-
-
Notifications
You must be signed in to change notification settings - Fork 66
Vulkan improvements 1 #2011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Vulkan improvements 1 #2011
Conversation
|
UI now works properly on my system. The desktop HUD doesn't use the premul-alpha hack shader I tried messing with the resolution scale, and found something really weird: This is what's rendered after starting with 0.4 scale. This feels like it might be bad viewport bounds, since the visible part is the top-left corner of the framebuffer. That hunch seems more likely with this, which happens when scaling the resolution down from 1.
With the lower res scale, I also noticed that the framebuffer is using wrapping instead of clamping on both renderers. (there's a line of green pixels at the top, which is my avatar's clothes) See #1951, where the OpenGL backend also incorrectly does this, but only on the forward renderer for whatever reason. |
| break; | ||
| case gpu::NINT2_10_10_10: | ||
| result = VK_FORMAT_A2B10G10R10_SNORM_PACK32; | ||
| //result = VK_FORMAT_A2R10G10B10_SNORM_PACK32; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a TODO or was it a testing thing that got left in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It was left there accidentally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the _hudPipeline shader from DrawTextureSRGBToLinear to DrawTexturePremultipliedSRGBToLinear gets the HUD rendering matching up with the OpenGL renderer. #1895 was written before Vulkan was merged into master, so VulkanDisplayPlugin missed this change.
-_hudPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureSRGBToLinear), blendState);
+_hudPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexturePremultipliedSRGBToLinear), blendState);Before
After


This should improve performance and compatibility due to uniform buffers having proper alignment now.