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
// Create a graphics pipeline for drawing the bounding spheres for the meshlets:
mMeshletNormDistConesPipeline = gvk::context().create_graphics_pipeline_for(
// Shaders to be used with this pipeline:
avk::vertex_shader("shaders/instanced_boneanimated_oriented.vert"),
avk::fragment_shader("shaders/color.frag"),
// Declare the vertex input to the shaders:
avk::from_buffer_binding(0) -> stream_per_vertex<glm::vec3>() -> to_location(0), // Declare that positions shall be read from the attached vertex buffer at binding 0, and that we are going to access it in shaders via layout (location = 0)
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_01) -> to_location(1), // Stream instance data from the buffer at binding 1 to location 1 => the center of the sphere
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_02) -> to_location(2), // Stream instance data from the buffer at binding 1 to location 2 => the radius of the sphere
// We need to stream a mat4 using four input locations:
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_03) -> to_location(3), // Stream instance data from the buffer at binding 1 to location 3 => transformation matrix
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_04) -> to_location(4), // add another vec4 to complete the whole mat4
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_05) -> to_location(5), // add another vec4 to complete the whole mat4
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_06) -> to_location(6), // add another vec4 to complete the whole mat4
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_07) -> to_location(7), // Stream instance data from the buffer at binding 1 to location 7 => bone matrices index
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_08) -> to_location(8), // Stream instance data from the buffer at binding 1 to location 8 => mesh index
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_09) -> to_location(9), // Stream instance data from the buffer at binding 1 to location 9 => texel buffer index
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_10) -> to_location(10), // Stream instance data from the buffer at binding 1 to location 10 => first vertex index
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_11) -> to_location(11), // Stream instance data from the buffer at binding 1 to location 11 => inConeApex
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_12) -> to_location(12), // Stream instance data from the buffer at binding 1 to location 12 => inConeAxisMeshopt
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_13) -> to_location(13), // Stream instance data from the buffer at binding 1 to location 13 => inConeCutoffMeshopt
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_14) -> to_location(14), // Stream instance data from the buffer at binding 1 to location 14 => inPrincipalBoneIndex
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_15) -> to_location(15), // Stream instance data from the buffer at binding 1 to location 15 => inConeAxisPBS
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_16) -> to_location(16), // Stream instance data from the buffer at binding 1 to location 16 => inConeCutoffPBS
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_17) -> to_location(17), // Stream instance data from the buffer at binding 1 to location 17 => inConeAxisPBSAni
avk::from_buffer_binding(1) -> stream_per_instance(mMeshletsBuffer, avk::content_description::user_defined_18) -> to_location(18), // Stream instance data from the buffer at binding 1 to location 18 => inConeCutoffPBSAni
avk::attachment::declare(std::make_tuple(mFramebuffers[0]->image_view_at(0)->config().format, mFramebuffers[0]->image_at(0)->config().samples), avk::on_load::load, avk::color(0)+avk::resolve_to(2), avk::on_store::store),
avk::attachment::declare(std::make_tuple(mFramebuffers[0]->image_view_at(1)->config().format, mFramebuffers[0]->image_at(1)->config().samples), avk::on_load::load, avk::depth_stencil(), avk::on_store::store),
avk::attachment::declare(mFramebuffers[0]->image_view_at(2)->config().format, avk::on_load::load, avk::resolve_receiver(), avk::on_store::store),
// Further config for the pipeline:
avk::cfg::viewport_depth_scissors_config::from_framebuffer(mFramebuffers[0]), // Set to the dimensions of the main window
avk::cfg::depth_write::disabled(),
avk::cfg::color_blending_config::enable_alpha_blending_for_all_attachments(),
avk::descriptor_binding(0, 0, mViewProjBuffers[0]),
avk::descriptor_binding(1, 0, mBoneMatricesBuffersAni[0]),
avk::descriptor_binding(1, 1, mMeshRootMatrices),
avk::descriptor_binding(1, 2, mBindPoseMatrices),
avk::descriptor_binding(2, 0, avk::as_uniform_texel_buffer_views(mBoneIndicesBuffers)),
avk::descriptor_binding(2, 1, avk::as_uniform_texel_buffer_views(mBoneWeightsBuffers)),
avk::push_constant_binding_data{ avk::shader_type::vertex, 0, sizeof(push_constants_for_norm_dist_cones) }
);
Why does this result in a stack overflow?
Definition of done:
A lot of config parameters do not lead to stack overflows
The code example above does not lead to a stack overflow anymore
Problematic code:
Why does this result in a stack overflow?
Definition of done:
The text was updated successfully, but these errors were encountered: