MSAA issue when update scene graph #820
Closed
YangShen398
started this conversation in
General
Replies: 4 comments 3 replies
-
With |
Beta Was this translation helpful? Give feedback.
0 replies
-
The vsgviewer example has a --samples command line option you can use to
test MSAA i.e.
*vsgviewer models/teapot.vsgt --samples 8*
The only settings required is setting windowTraits->samples to the value
you want. You should do this prior to creating the window, if you want to
change it at runtime then you'll need to recreate the window with new
WindowTraits, and force a rebuild of the GraphicsPipeline to honour the new
setting.
Message ID: <vsg-dev/VulkanSceneGraph/repo-discussions/820/comments/5941033@
github.com>
… |
Beta Was this translation helpful? Give feedback.
1 reply
-
On Thu, 18 May 2023 at 21:24, Yang ***@***.***> wrote:
I am not changing MSAA but rasterizerDiscardEnable in vulkan. But let's
say even if I change MSAA at runtime, doesn't vsg::UpdateGraphicsPipelines
rebuild the GraphicsPipeline?
UpdateGraphicsPipeliens does rebuild graphics pipelines ;but it won't
rebuild them unless the grphicspipline existing state is cleared by calling
release(). The vsg::Context used to provide a guideline to what settings
to inherit must be configured.
FYI, UpdateGraphicsPipeline is a very new addition so we don't have lots of
examples illustrating its use.
Another thing to consider is the use of dynamic pipeline state which allows
you to set parts of the graphics pipeline with the appropriate vulkan
commands.
Robert.
… Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Thu, 18 May 2023 at 21:51, Yang ***@***.***> wrote:
Which one is a good example for the use of dynamic pipeline state?
There isn't one in vsgExamples. vsg::DynamicState will need configure and
assigned to your GraphicsPipeline and then in the scene graph you'll be
able to use the associated commands like vg::SetLineWidth.
Vulkan doesn't allow all graphics pipeline state to be used dynamically and
the VSG doesn't expose all the possible commands.
This is a bit of a niche feature so hasn't been tested widely.
… Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am learning graphics pipeline and I have the following code which modifies a pipeline state.
I used vsg::Builder to create a quad (builder->createQuad()) and implemented ImGui button that will execute the above code. The idea is that when I click the button, it will change a pipeline state, which in the case is the
rasterizerDiscardEnable
.Now the issue I encountered is
If I have
windowTraits->samples = VK_SAMPLE_COUNT_1_BIT;
, this code works as expected. No problems.But if I change windowTraits->samples to any other value, say VK_SAMPLE_COUNT_8_BIT, it all looks good until it executes the state change code above. The application will freeze and become non-responsive.
Beta Was this translation helpful? Give feedback.
All reactions