diff --git a/data/vcpkg/ports/rendergraph/portfile.cmake b/data/vcpkg/ports/rendergraph/portfile.cmake
index c6e8a411be..481a6d3762 100644
--- a/data/vcpkg/ports/rendergraph/portfile.cmake
+++ b/data/vcpkg/ports/rendergraph/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/RenderGraph
- REF ed897d45ee5ad0c80cc457298bf5683c2ad63b57
+ REF ffc35182fb53a8f3db3e7f94eb289e26e624e206
HEAD_REF master
- SHA512 1292236904a473bb8e6b4c070d473eafa26eabbe8372c9162437fc4b001fc2f6f410738bb33ddaf2673b937c6b54b85c5933decdc69ddcd325750f230938ada1
+ SHA512 c2bca7a37828efd621221336c5377d28a8cf10c07b54af175c09744c4df05a728f1bdd3077819fe1d48a2a896a67ad6f35fd72769c616a8ea3ae9744bd31895b
)
vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH
diff --git a/data/vcpkg/ports/shaderwriter/portfile.cmake b/data/vcpkg/ports/shaderwriter/portfile.cmake
index 4501dac04c..19fde1cc85 100644
--- a/data/vcpkg/ports/shaderwriter/portfile.cmake
+++ b/data/vcpkg/ports/shaderwriter/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/ShaderWriter
- REF 6aa2e9bb7f51c80df3ebf5f3d7ea5936d87e671f
+ REF c6626373eb3714fad26f8008849818e97deefb20
HEAD_REF development
- SHA512 04c9973c513ff4b912283d4db93e255455e2ed909fa1ebfc09759d39e79bd7e156abf65f5686a8ffa311f7441b9c802c8a346ec41b02eb4e42564b53431042b8
+ SHA512 c92ac248d24a20112d879cb7720619be2cb13bd5e77e85cd791aa1236e53f1327ba09246615610250b2fd11bba0a326f666c6563272defdb9df066bf7db0ba31
)
vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH
diff --git a/doc/Castor3D/Castor3D Scene.xml b/doc/Castor3D/Castor3D Scene.xml
index 82a2c2a464..f66c069eb8 100644
--- a/doc/Castor3D/Castor3D Scene.xml
+++ b/doc/Castor3D/Castor3D Scene.xml
@@ -25,7 +25,7 @@
animated_object_group animation atmospheric_scattering billboard biome border_panel_overlay button button_style camera clouds combobox combobox_style constants_buffer default_materials density diamond_square_terrain draw_edges edit edit_style fft_config fft_ocean_rendering font gui hdr_config import light listbox listbox_style lpv_config material materials mesh morph_animation motion_blur object ocean_rendering panel_overlay particle particle_system pass pbr_bloom pcf_config positions raw_config render_target rsm_config sampler scene scene_node shader_object shader_program shadows skeleton skybox slider slider_style smaa ssao static static_style submesh subsurface_scattering text_overlay texture_animation texture_remap texture_remap_channel texture_transform texture_unit theme transmittance_profile variable viewport voxel_cone_tracing vsm_config water_rendering wave waves weather window layout_ctrl box_layout panel panel_style expandable_panel header expandable_panel_style header_style expand_style elements_style item_style selected_item_style highlighted_item_style content_style expand content style frame frame_style scrollbar_style begin_style end_style bar_style thumb_style progress_style container_style progress
- define include absorption absorptionExtinction albedo albedo_mask alpha alpha_blend_mode alpha_func ambient ambient_colour ambient_factor ambient_light amplitude animated_mesh animated_node animated_object animated_object_group animated_skeleton animation anisotropic_filtering aspect_ratio atmosphereVolumeResolution atmospheric_scattering attenuation attenuation_colour attenuation_distance back background_colour background_image background_material bend_step_count bend_step_size bias billboard biome blend_alpha_func blocksCount bloomStrength blurRadius blur_high_quality blur_radius blur_step_size border_colour border_inner_uv border_material border_outer_uv border_panel_overlay border_position border_size bottom bottomColour bottomRadius button button_style bw_accumulation camera camera_node caption cast_shadows center_uv channel clearcoat clearcoat_factor clearcoat_mask clearcoat_normal clearcoat_normal_mask clearcoat_roughness clearcoat_roughness_factor clearcoat_roughness_mask clouds colour colour_blend_mode colour_hdr colour_mask colour_srgb combobox combobox_style comparison_func comparison_mode compute_program conservative_rasterization constantTerm constants_buffer cornerRounding count coverage crispiness cross cs_shader_program cullable curlResolution curliness cut_off dampeningFactor debug_overlays default_font default_material default_materials default_unit density depthSofteningDistance detail diamond_square_terrain diffuse diffuse_mask dimensions direction directional_shadow_cascades disableCornerDetection disableDiagonalDetection disableRandomSeed disabled_background_material disabled_foreground_material disabled_text_material displacementDownsample domain_program draw_edges edgeDetection edge_colour edge_depth_factor edge_normal_factor edge_object_factor edge_sharpness edge_width edit edit_style emissive emissive_colour emissive_factor emissive_mask emissive_mult enablePowder enablePredication enableReprojection enabled equirectangular expScale expTerm exponent exposure face face_normals face_tangents face_uv face_uvw factor far fft_config fft_ocean_rendering file file_anim filter filter_size foam foamAngleExponent foamBrightness foamFadeDistance foamHeightStart foamTiling fog_density fog_type font foreground_material format fov_y fpsScale fractal frequency front fullscreen gamma gaussian_width geometry_program global_illumination glossiness glossiness_mask grid_size groundAlbedo group_sizes gui hdr_config heatOffset height heightMapSamples heightRange height_factor height_mask highSteepness high_quality highlighted_background_material highlighted_foreground_material highlighted_text_material horizontal_align hull_program image import import_anim import_morph_target innerRadius inner_cut_off intensity interpolation invert_y iridescence iridescence_factor iridescence_ior iridescence_mask iridescence_max_thickness iridescence_min_thickness iridescence_thickness iridescence_thickness_mask island item layerWidth left length levels_count light light_bleeding_reduction lighting lighting_model line_spacing_mode line_style linearTerm linear_motion_blur listbox listbox_style loading_screen localContrastAdaptationFactor lod0Distance lod_bias looped lowSteepness lpv_config lpv_grid_size lpv_indirect_attenuation mag_filter material materials maxAbsorptionDensity maxMieDensity maxRayleighDensity maxSearchSteps maxSearchStepsDiag maxSunZenithAngle max_anisotropy max_distance max_image_size max_lod max_radius max_slope_offset mediumSteepness mesh metalness metalness_mask mieExtinction miePhaseFunctionG mieScattering minAbsorptionDensity minMieDensity minRayleighDensity min_filter min_lod min_offset min_radius min_variance mip_filter mixed_interpolation mode morph_animation multiScatterResolution multiline multipleScatteringFactor near no_optimisations noise normal normalDepthWidth normalMapFreqMod normalMapScroll normalMapScrollSpeed normal_directx normal_factor normal_mask normals1 normals2 num_cones num_samples object objectWidth occlusion occlusion_mask ocean_rendering octaves opacity opacity_mask orientation outerRadius outer_cut_off panel_overlay parallax_occlusion parent particle particle_system particles_count pass passes patchSize pause_animation pbr_bloom pcf_config perlinWorleyResolution pickable pitch pixel_border_size pixel_position pixel_program pixel_size planetNode pos position positions postfx predicationScale predicationStrength predicationThreshold prefix preset primitive producer pushed_background_material pushed_foreground_material pushed_text_material pxl_border_size pxl_position pxl_size radius range raw_config rayMarchMaxSPP rayMarchMinSPP ray_step_size rayleighScattering receive_shadows recenter_camera reflections refractionDistanceFactor refractionDistortionFactor refractionHeightFactor refractionRatio refraction_ratio render_pass render_target reprojectionWeightScale rescale right roll rotate roughness roughness_mask rsm_config sample_count sampler samples scale scene scene_node secondary_bounce shader_program shaders shadow_producer shadows sheen sheen_colour sheen_mask sheen_roughness sheen_roughness_mask shininess shininess_mask size skeleton skyViewResolution skybox slider slider_style smaa smooth_band_width solarIrradiance specular specular_mask speed ssao ssrBackwardStepsCount ssrDepthMult ssrForwardStepsCount ssrStepSize start_animation start_at static static_style steepness stereo stop_at strength submesh subsurface_scattering sunAngularRadius sunIlluminance sunIlluminanceScale sunNode tangent target_weight temporal_smoothing tessellationFactor texcoord_set texel_area_modifier text text_material text_overlay text_wrapping texture_remap_config texture_unit texturing_mode theme thickness thickness_factor thickness_mask threshold tick_style tile tiles tileset tone_mapping top topColour topOffset topRadius transform translate transmission transmission_mask transmittance transmittanceResolution transmittance_mask transmittance_profile two_sided type u_wrap_mode untile use_normals_buffer uv uvScale uvw v_wrap_mode value variable vectorDivider vertex vertex_program vertical_align viewport visible volumetric_scattering volumetric_steps voxel_cone_tracing voxel_size vsm_config vsync w_wrap_mode water_rendering wave waves weather weatherResolution windDirection windVelocity window worleyResolution xzScale yaw reserve_if_hidden stretch horizontal layout_dynspace layout_staspace padding pad_left pad_right pad_top pad_bottom movable resizable background_invisible foreground_invisible expand_caption retract_caption header_font header_text_material header_caption header_horizontal_align header_vertical_align selection_material vertical_scrollbar horizontal_scrollbar vertical_scrollbar_style horizontal_scrollbar_style title_font title_material text_font container_border_size bar_border_size left_to_right right_to_left top_to_bottom bottom_to_top normal_2channels invert_normals specular_colour specular_factor bump_mask
+ define include absorption absorptionExtinction albedo albedo_mask alpha alpha_blend_mode alpha_func ambient ambient_colour ambient_factor ambient_light amplitude animated_mesh animated_node animated_object animated_object_group animated_skeleton animation anisotropic_filtering aspect_ratio atmosphereVolumeResolution atmospheric_scattering attenuation attenuation_colour attenuation_distance back background_colour background_image background_material bend_step_count bend_step_size bias billboard biome blend_alpha_func blocksCount bloomStrength blurRadius blur_high_quality blur_radius blur_step_size border_colour border_inner_uv border_material border_outer_uv border_panel_overlay border_position border_size bottom bottomColour bottomRadius button button_style bw_accumulation camera camera_node caption cast_shadows center_uv channel clearcoat clearcoat_factor clearcoat_mask clearcoat_normal clearcoat_normal_mask clearcoat_roughness clearcoat_roughness_factor clearcoat_roughness_mask clouds colour colour_blend_mode colour_hdr colour_mask colour_srgb combobox combobox_style comparison_func comparison_mode compute_program conservative_rasterization constantTerm constants_buffer cornerRounding count coverage crispiness cross cs_shader_program cullable curlResolution curliness cut_off dampeningFactor debug_overlays default_font default_material default_materials default_unit density depthSofteningDistance detail diamond_square_terrain diffuse diffuse_mask dimensions direction directional_shadow_cascades disableCornerDetection disableDiagonalDetection disableRandomSeed disabled_background_material disabled_foreground_material disabled_text_material displacementDownsample domain_program draw_edges edgeDetection edge_colour edge_depth_factor edge_normal_factor edge_object_factor edge_sharpness edge_width edit edit_style emissive emissive_colour emissive_factor emissive_mask emissive_mult enablePowder enablePredication enableReprojection enabled equirectangular expScale expTerm exponent exposure face face_normals face_tangents face_uv face_uvw factor far fft_config fft_ocean_rendering file file_anim filter filter_size foam foamAngleExponent foamBrightness foamFadeDistance foamHeightStart foamTiling fog_density fog_type font foreground_material format fov_y fpsScale fractal frequency front fullscreen gamma gaussian_width geometry_program global_illumination glossiness glossiness_mask grid_size groundAlbedo group_sizes gui hdr_config heatOffset height heightMapSamples heightRange height_factor height_mask highSteepness high_quality highlighted_background_material highlighted_foreground_material highlighted_text_material horizontal_align hull_program image import import_anim import_morph_target innerRadius inner_cut_off intensity interpolation invert_y iridescence iridescence_factor iridescence_ior iridescence_mask iridescence_max_thickness iridescence_min_thickness iridescence_thickness iridescence_thickness_mask island item layerWidth left length levels_count light light_bleeding_reduction lighting lighting_model line_spacing_mode line_style linearTerm linear_motion_blur listbox listbox_style loading_screen localContrastAdaptationFactor lod0Distance lod_bias looped lowSteepness lpv_config lpv_grid_size lpv_indirect_attenuation mag_filter material materials maxAbsorptionDensity maxMieDensity maxRayleighDensity maxSearchSteps maxSearchStepsDiag maxSunZenithAngle max_anisotropy max_distance max_image_size max_lod max_radius max_slope_offset mediumSteepness mesh metalness metalness_mask mieExtinction miePhaseFunctionG mieScattering minAbsorptionDensity minMieDensity minRayleighDensity min_filter min_lod min_offset min_radius min_variance mip_filter mixed_interpolation mode morph_animation multiScatterResolution multiline multipleScatteringFactor near no_optimisations noise normal normalDepthWidth normalMapFreqMod normalMapScroll normalMapScrollSpeed normal_directx normal_factor normal_mask normals1 normals2 num_cones num_samples object objectWidth occlusion occlusion_mask ocean_rendering octaves opacity opacity_mask orientation outerRadius outer_cut_off panel_overlay parallax_occlusion parent particle particle_system particles_count pass passes patchSize pause_animation pbr_bloom pcf_config perlinWorleyResolution pickable pitch pixel_border_size pixel_position pixel_program pixel_size planetNode pos position positions postfx predicationScale predicationStrength predicationThreshold prefix preset primitive producer pushed_background_material pushed_foreground_material pushed_text_material pxl_border_size pxl_position pxl_size radius range raw_config rayMarchMaxSPP rayMarchMinSPP ray_step_size rayleighScattering receive_shadows recenter_camera reflections refractionDistanceFactor refractionDistortionFactor refractionHeightFactor refractionRatio refraction_ratio render_pass render_target reprojectionWeightScale rescale right roll rotate roughness roughness_mask rsm_config sample_count sampler samples scale scene scene_node secondary_bounce shader_program shaders shadow_producer shadows sheen sheen_colour sheen_mask sheen_roughness sheen_roughness_mask shininess shininess_mask size skeleton skyViewResolution skybox slider slider_style smaa smooth_band_width solarIrradiance specular specular_mask speed ssao ssrBackwardStepsCount ssrDepthMult ssrForwardStepsCount ssrStepSize start_animation start_at static static_style steepness stereo stop_at strength submesh subsurface_scattering sunAngularRadius sunIlluminance sunIlluminanceScale sunNode tangent target_weight temporal_smoothing tessellationFactor texcoord_set texel_area_modifier text text_material text_overlay text_wrapping texture_remap_config texture_unit texturing_mode theme thickness thickness_factor thickness_mask threshold tick_style tile tiles tileset tone_mapping top topColour topOffset topRadius transform translate transmission transmission_mask transmittance transmittanceResolution transmittance_mask transmittance_profile two_sided type u_wrap_mode untile use_normals_buffer uv uvScale uvw v_wrap_mode value variable vectorDivider vertex vertex_program vertical_align viewport visible volumetric_scattering volumetric_steps voxel_cone_tracing voxel_size vsm_config vsync w_wrap_mode water_rendering wave waves weather weatherResolution windDirection windVelocity window worleyResolution xzScale yaw reserve_if_hidden stretch horizontal layout_dynspace layout_staspace padding pad_left pad_right pad_top pad_bottom movable resizable background_invisible foreground_invisible expand_caption retract_caption header_font header_text_material header_caption header_horizontal_align header_vertical_align selection_material vertical_scrollbar horizontal_scrollbar vertical_scrollbar_style horizontal_scrollbar_style title_font title_material text_font container_border_size bar_border_size left_to_right right_to_left top_to_bottom bottom_to_top normal_2channels invert_normals specular_colour specular_factor bump_mask predication
zero one src_colour inv_src_colour dst_colour inv_dst_colour src_alpha inv_src_alpha dst_alpha inv_dst_alpha constant inv_constant src_alpha_sat src1_colour inv_src1_colour src1_alpha inv_src1_alpha 1d 2d 3d always less less_equal equal not_equal greater_equal greater never texture texture0 texture1 texture2 texture3 constant diffuse previous none first_arg add add_signed modulate interpolate subtract dot3_rgb dot3_rgba none first_arg add add_signed modulate interpolate substract colour ambient diffuse normal specular height opacity emissive smooth flat point spot directional sm_1 sm_2 sm_3 sm_4 sm_5 ortho perspective frustum nearest linear repeat mirrored_repeat clamp_to_border clamp_to_edge vertex hull domain geometry pixel compute int sampler uint float vec2i vec3i vec4i vec2f vec3f vec4f mat3x3f mat4x4f camera light object billboard none break break_words internal middle external none additive multiplicative interpolative a_buffer depth_peeling top center bottom left center right letter text own_height max_lines_height max_font_height linear exponential squared_exponential custom cone cylinder sphere cube torus plane icosahedron projection cylindrical spherical phong reflection refraction pbr glossiness minimal 0extended transmittance 1X T2X S2X 4X low medium high ultra float_opaque_black float_transparent_black int_transparent_black int_opaque_black float_opaque_white int_opaque_white raw pcf variance max ref_to_texture luma colour depth ambient_occlusion occlusion point_list line_list line_strip triangle_list triangle_strip triangle_fan line_list_adj line_strip_adj triangle_list_adj triangle_strip_adj patch_list mixed lpv lpv_geometry layered_lpv layered_lpv_geometry rsm vct rgba32 blinn_phong toon_phong toon_blinn_phong toon_pbr opacity km m cm mm yd ft in c3d
true false screen_size rgb a r g b undefined rg8 rgba16 rgba16s rgb565 bgr565 rgba5551 bgra5551 argb1555 r8 r8s r8us r8ss r8ui r8srgb rg16 rg16s rg16us rg16ss rg16ui rg16si rg16srgb rgb24 rgb24s rgb24us rgb24ss rgb24ui rgb24si rgb24srgb bgr24 bgr24s bgr24us bgr24ss bgr24ui bgr24si bgr24srgb rgba32 rgba32s rgba32us rgba32ss rgba32ui rgba32si rgba32srgb bgra32 bgra32s bgra32us bgra32ss bgra32ui bgra32si bgra32srgb abgr32 abgr32s abgr32us abgr32ss abgr32ui abgr32si abgr32_stgb argb2101010 argb2101010s argb2101010us argb2101010ss argb2101010ui argb2101010si abgr2101010 abgr2101010s abgr2101010us abgr2101010ss abgr2101010ui abgr2101010si r16 rg16s rg16us rg16ss rg16ui rg16si rg16f rg32 rg32s rg32us rg32ss rg32ui rg32si rg32f rgb48 rgb48s rgb48us rgb48ss rgb48ui rgb48si rgb48f rgba64 rgba64s rgba64us rgba64ss rgba64ui rgba64si rgba64f r32ui r32si r32f rg64ui rg64si rg64f rgb96ui rgb96si rgb96f rgba128ui rgba128si rgba128f r64ui r64si r64f rg128ui rg128si rg128f rgb192ui rgb192si rgb192f rgba256ui rgba256si rgba256f bgr32f ebgr32f depth16 depth24 depth32f stencil8 depth16s8 depth24s8 depth32fs8 bc1_rgb bc1_srgb bc1_rgba bc1_rgba_srgb bc2_rgba bc2_rgba_srgb bc3_rgba bc3_rgba_srgb bc4_r bc4_r_s bc5_rg bc5_rg_s bc6h bc6h_s bc7 bc7_srgb etc2_rgb etc2_rgb_srgb etc2_rgba1 etc2_rgba1_srgb etc2_rgba etc2_rgba_srgb eac_r eac_r_s eac_rg eac_rg_s astc_4x4 astc_4x4_srgb astc_5x4 astc_5x4_srgb astc_5x5 astc_5x5_srgb astc_6x5 astc_6x5_srgb astc_6x6 astc_6x6_srgb astc_8x5 astc_8x5_srgb astc_8x6 astc_8x6_srgb astc_8x8 astc_8x8_srgb astc_10x5 astc_10x5_srgb astc_10x6 astc_10x6_srgb astc_10x8 astc_10x8_srgb astc_10x10 astc_10x10_srgb astc_12x10 astc_12x10_srgb astc_12x12 astc_12x12_srgb argb32
define
diff --git a/external/RenderGraph b/external/RenderGraph
index ed897d45ee..ffc35182fb 160000
--- a/external/RenderGraph
+++ b/external/RenderGraph
@@ -1 +1 @@
-Subproject commit ed897d45ee5ad0c80cc457298bf5683c2ad63b57
+Subproject commit ffc35182fb53a8f3db3e7f94eb289e26e624e206
diff --git a/external/ShaderWriter b/external/ShaderWriter
index 6aa2e9bb7f..c6626373eb 160000
--- a/external/ShaderWriter
+++ b/external/ShaderWriter
@@ -1 +1 @@
-Subproject commit 6aa2e9bb7f51c80df3ebf5f3d7ea5936d87e671f
+Subproject commit c6626373eb3714fad26f8008849818e97deefb20
diff --git a/include/Core/Castor3D/Miscellaneous/MiscellaneousModule.hpp b/include/Core/Castor3D/Miscellaneous/MiscellaneousModule.hpp
index 7a0ca96ceb..8722a2ee3e 100644
--- a/include/Core/Castor3D/Miscellaneous/MiscellaneousModule.hpp
+++ b/include/Core/Castor3D/Miscellaneous/MiscellaneousModule.hpp
@@ -84,16 +84,12 @@ namespace castor3d
eMeshWorkGroupSizeX,
eMeshWorkGroupSizeY,
eMeshWorkGroupSizeZ,
- eMeshTotalMemorySize,
eMeshOutputVertices,
eMeshOutputPrimitives,
- eDrawMeshTasksCount,
eTaskWorkGroupInvocations,
eTaskWorkGroupSizeX,
eTaskWorkGroupSizeY,
eTaskWorkGroupSizeZ,
- eTaskTotalMemorySize,
- eTaskOutputCount,
CU_ScopedEnumBounds( eTexture1DSize )
};
/**
diff --git a/include/Core/Castor3D/Miscellaneous/makeVkType.hpp b/include/Core/Castor3D/Miscellaneous/makeVkType.hpp
index bbe26b4b37..907b6662c2 100644
--- a/include/Core/Castor3D/Miscellaneous/makeVkType.hpp
+++ b/include/Core/Castor3D/Miscellaneous/makeVkType.hpp
@@ -545,6 +545,10 @@ namespace castor3d
template<> struct VkStructTraits< VkPhysicalDeviceMeshShaderFeaturesNV >{ static VkStructureType constexpr value = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV; };
template<> struct VkStructTraits< VkPhysicalDeviceMeshShaderPropertiesNV >{ static VkStructureType constexpr value = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV; };
#endif
+#if VK_EXT_mesh_shader
+ template<> struct VkStructTraits< VkPhysicalDeviceMeshShaderFeaturesEXT >{ static VkStructureType constexpr value = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT; };
+ template<> struct VkStructTraits< VkPhysicalDeviceMeshShaderPropertiesEXT >{ static VkStructureType constexpr value = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT; };
+#endif
#if VK_NV_fragment_shader_barycentric
template<> struct VkStructTraits< VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV >{ static VkStructureType constexpr value = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV; };
#endif
diff --git a/include/Core/Castor3D/Render/Opaque/Lighting/RunnableLightingPass.hpp b/include/Core/Castor3D/Render/Opaque/Lighting/RunnableLightingPass.hpp
index c913656d17..4568672b70 100644
--- a/include/Core/Castor3D/Render/Opaque/Lighting/RunnableLightingPass.hpp
+++ b/include/Core/Castor3D/Render/Opaque/Lighting/RunnableLightingPass.hpp
@@ -46,7 +46,6 @@ namespace castor3d
private:
using RunnablePass::resetCommandBuffer;
- using RunnablePass::resetCommandBuffers;
LightRenderPass doCreateRenderPass( bool blend
, bool hasStencil );
diff --git a/include/Core/Castor3D/Render/Overlays/OverlayPreparer.hpp b/include/Core/Castor3D/Render/Overlays/OverlayPreparer.hpp
index 600fc83039..86cd169ed5 100644
--- a/include/Core/Castor3D/Render/Overlays/OverlayPreparer.hpp
+++ b/include/Core/Castor3D/Render/Overlays/OverlayPreparer.hpp
@@ -32,7 +32,8 @@ namespace castor3d
C3D_API OverlayPreparer( OverlayRenderer & renderer
, RenderDevice const & device
, VkRenderPass renderPass
- , VkFramebuffer framebuffer );
+ , VkFramebuffer framebuffer
+ , crg::Fence & fence );
C3D_API OverlayPreparer( OverlayPreparer && rhs )noexcept;
C3D_API OverlayPreparer & operator=( OverlayPreparer && rhs )noexcept;
C3D_API ~OverlayPreparer()noexcept;
@@ -74,6 +75,7 @@ namespace castor3d
private:
OverlayRenderer & m_renderer;
RenderDevice const & m_device;
+ crg::Fence & m_fence;
using OverlayDataArray = std::vector< OverlayDrawData >;
using OverlayDatasMap = std::map< OverlayPipelineData *, OverlayDataArray >;
std::map< uint32_t, OverlayDatasMap > m_levelsOverlays;
diff --git a/include/Core/Castor3D/Render/Overlays/OverlayRenderer.hpp b/include/Core/Castor3D/Render/Overlays/OverlayRenderer.hpp
index 01717e71a3..7b43734c9f 100644
--- a/include/Core/Castor3D/Render/Overlays/OverlayRenderer.hpp
+++ b/include/Core/Castor3D/Render/Overlays/OverlayRenderer.hpp
@@ -103,7 +103,8 @@ namespace castor3d
*/
C3D_API OverlayPreparer beginPrepare( RenderDevice const & device
, VkRenderPass renderPass
- , VkFramebuffer framebuffer );
+ , VkFramebuffer framebuffer
+ , crg::Fence & fence );
/**
*\~english
*\brief Uploads all GPU buffers to VRAM.
@@ -239,6 +240,7 @@ namespace castor3d
ashes::DescriptorSet const & createTextDescriptorSet( FontTexture & fontTexture );
void beginPrepare( VkRenderPass renderPass
, VkFramebuffer framebuffer
+ , crg::Fence & fence
, crg::FramePassTimer & timer
, castor::Size const & size );
void endPrepare();
@@ -274,7 +276,8 @@ namespace castor3d
private:
ashes::CommandBuffer & doBeginPrepare( VkRenderPass renderPass
- , VkFramebuffer framebuffer );
+ , VkFramebuffer framebuffer
+ , crg::Fence & fence );
void doEndPrepare();
std::pair< OverlayDrawNode *, OverlayPipelineData * > doGetDrawNodeData( RenderDevice const & device
, VkRenderPass renderPass
diff --git a/include/Core/Castor3D/Render/RenderTarget.hpp b/include/Core/Castor3D/Render/RenderTarget.hpp
index 3896dda18f..0b68492194 100644
--- a/include/Core/Castor3D/Render/RenderTarget.hpp
+++ b/include/Core/Castor3D/Render/RenderTarget.hpp
@@ -477,6 +477,7 @@ namespace castor3d
private:
static uint32_t sm_uiCount;
+ RenderDevice & m_device;
TargetType m_type{};
castor::Size m_size;
castor::Size m_safeBandedSize;
diff --git a/source/Core/Castor3D/Miscellaneous/GpuInformations.cpp b/source/Core/Castor3D/Miscellaneous/GpuInformations.cpp
index 6f88e5d1d5..017ec9191e 100644
--- a/source/Core/Castor3D/Miscellaneous/GpuInformations.cpp
+++ b/source/Core/Castor3D/Miscellaneous/GpuInformations.cpp
@@ -43,16 +43,12 @@ namespace castor3d
"Max mesh work group size X",
"Max mesh work group size Y",
"Max mesh work group size Z",
- "Max mesh total memory size",
"Max mesh output vertices",
"Max mesh output primitives",
- "Max draw mesh tasks count",
"Max task work group invocations",
"Max task work group size X",
"Max task work group size Y",
"Max task work group size Z",
- "Max task total memory size",
- "Max task output count",
};
stream << "GPU informations:" << "\n";
stream << " Vendor: " << object.getVendor() << "\n";
diff --git a/source/Core/Castor3D/Model/Mesh/Submesh/Component/MeshletComponent.cpp b/source/Core/Castor3D/Model/Mesh/Submesh/Component/MeshletComponent.cpp
index edf84de881..9ca7851896 100644
--- a/source/Core/Castor3D/Model/Mesh/Submesh/Component/MeshletComponent.cpp
+++ b/source/Core/Castor3D/Model/Mesh/Submesh/Component/MeshletComponent.cpp
@@ -16,7 +16,7 @@ CU_ImplementSmartPtr( castor3d, MeshletComponent )
namespace castor3d
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
namespace mshletcomp
{
static castor::String getName( MeshletComponent const & component )
@@ -45,7 +45,7 @@ namespace castor3d
void MeshletComponent::createDescriptorSet( Geometry const & geometry )
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
auto & baseBuffers = getOwner()->getFinalBufferOffsets( geometry );
auto descSetIt = m_descriptorSets.emplace( &geometry, nullptr ).first;
@@ -135,7 +135,7 @@ namespace castor3d
ProgramFlags MeshletComponent::getProgramFlags( Material const & material )const
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
return ProgramFlag::eHasMesh
| ( m_cull.empty()
? ProgramFlag::eNone
@@ -190,7 +190,7 @@ namespace castor3d
bool MeshletComponent::doInitialise( RenderDevice const & device )
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
if ( !m_meshlets.empty() )
{
for ( auto & finalCullBuffer : m_finalCullBuffers )
@@ -261,7 +261,7 @@ namespace castor3d
return;
}
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
auto count = uint32_t( m_meshlets.size() );
if ( count )
@@ -288,7 +288,7 @@ namespace castor3d
void MeshletComponent::doCreateDescriptorLayout( RenderDevice const & device )
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
ashes::VkDescriptorSetLayoutBindingArray bindings;
bindings.emplace_back( makeDescriptorSetLayoutBinding( uint32_t( MeshBuffersIdx::eMeshlets )
, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
diff --git a/source/Core/Castor3D/Model/Mesh/Submesh/Component/PassMasksComponent.cpp b/source/Core/Castor3D/Model/Mesh/Submesh/Component/PassMasksComponent.cpp
index 0995ec748d..bffd2ba6d7 100644
--- a/source/Core/Castor3D/Model/Mesh/Submesh/Component/PassMasksComponent.cpp
+++ b/source/Core/Castor3D/Model/Mesh/Submesh/Component/PassMasksComponent.cpp
@@ -52,7 +52,7 @@ namespace castor3d
auto a = convert( value.data[0], value.data[1], value.data[2], value.data[3] );
auto b = convert( value.data[4], value.data[5], value.data[6], value.data[7] );
auto c = convert( value.data[8], value.data[9], value.data[10], value.data[11] );
- auto d = convert( value.data[12], value.data[13], value.data[14], value.data[15] );
+ auto d = convert( value.data[12], value.data[13], value.data[14], 0u );
result.push_back( castor::Point4ui{ a, b, c, d } );
}
diff --git a/source/Core/Castor3D/Render/EnvironmentMap/EnvironmentMap.cpp b/source/Core/Castor3D/Render/EnvironmentMap/EnvironmentMap.cpp
index 80bcba0be6..5e31f78c01 100644
--- a/source/Core/Castor3D/Render/EnvironmentMap/EnvironmentMap.cpp
+++ b/source/Core/Castor3D/Render/EnvironmentMap/EnvironmentMap.cpp
@@ -174,6 +174,8 @@ namespace castor3d
, index
, *m_scene.getBackground() );
m_runnables[index] = graph.compile( m_device.makeContext() );
+ m_scene.getEngine()->registerTimer( m_runnables[index]->getName() + "/Graph"
+ , m_runnables[index]->getTimer() );
printGraph( *m_runnables[index] );
auto runnable = m_runnables[index].get();
m_device.renderSystem.getEngine()->postEvent( makeGpuFunctorEvent( GpuEventType::ePreUpload
@@ -212,6 +214,12 @@ namespace castor3d
void EnvironmentMap::cleanup()
{
+ for ( auto & runnable : m_runnables )
+ {
+ m_scene.getEngine()->unregisterTimer( runnable->getName() + "/Graph"
+ , runnable->getTimer() );
+ }
+
m_runnables.clear();
m_passes.clear();
m_environmentMapViews.clear();
@@ -406,6 +414,8 @@ namespace castor3d
, index
, *m_scene.getBackground() ) );
m_runnables.emplace_back( graph.compile( m_device.makeContext() ) );
+ m_scene.getEngine()->registerTimer( graph.getName()
+ , m_runnables.back()->getTimer() );
printGraph( *m_runnables.back() );
m_runnables.back()->record();
}
diff --git a/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LayeredLightPropagationVolumes.cpp b/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LayeredLightPropagationVolumes.cpp
index f3215b6ec0..b9e3a0d0a1 100644
--- a/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LayeredLightPropagationVolumes.cpp
+++ b/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LayeredLightPropagationVolumes.cpp
@@ -332,6 +332,8 @@ namespace castor3d
m_aabb = m_scene.getBoundingBox();
m_lightPropagationPassesDesc = doCreatePropagationPasses();
m_runnable = m_graph.compile( m_device.makeContext() );
+ m_scene.getEngine()->registerTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
printGraph( *m_runnable );
m_recordEvent = m_device.renderSystem.getEngine()->postEvent( makeGpuFunctorEvent( GpuEventType::ePreUpload
, [this]( RenderDevice const & device
@@ -384,8 +386,12 @@ namespace castor3d
if ( m_runnable )
{
+ m_scene.getEngine()->unregisterTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
m_runnable.reset();
m_runnable = m_graph.compile( m_device.makeContext() );
+ m_scene.getEngine()->registerTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
printGraph( *m_runnable );
if ( m_recordEvent )
diff --git a/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LightPropagationVolumes.cpp b/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LightPropagationVolumes.cpp
index 7a1577797a..4dc0b6059e 100644
--- a/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LightPropagationVolumes.cpp
+++ b/source/Core/Castor3D/Render/GlobalIllumination/LightPropagationVolumes/LightPropagationVolumes.cpp
@@ -493,6 +493,8 @@ namespace castor3d
m_aabb = m_scene.getBoundingBox();
m_lightPropagationPassesDesc = doCreatePropagationPasses();
m_runnable = m_graph.compile( m_device.makeContext() );
+ m_scene.getEngine()->registerTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
printGraph( *m_runnable );
m_recordEvent = m_device.renderSystem.getEngine()->postEvent( makeGpuFunctorEvent( GpuEventType::ePreUpload
, [this]( RenderDevice const & device
@@ -549,6 +551,8 @@ namespace castor3d
if ( m_runnable )
{
+ m_scene.getEngine()->unregisterTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
m_runnable.reset();
m_runnable = m_graph.compile( m_device.makeContext() );
printGraph( *m_runnable );
diff --git a/source/Core/Castor3D/Render/GlobalIllumination/VoxelConeTracing/Voxelizer.cpp b/source/Core/Castor3D/Render/GlobalIllumination/VoxelConeTracing/Voxelizer.cpp
index dad8e9e9ce..927bc5dc95 100644
--- a/source/Core/Castor3D/Render/GlobalIllumination/VoxelConeTracing/Voxelizer.cpp
+++ b/source/Core/Castor3D/Render/GlobalIllumination/VoxelConeTracing/Voxelizer.cpp
@@ -152,6 +152,8 @@ namespace castor3d
, progress ) }
, m_runnable{ m_graph.compile( m_device.makeContext() ) }
{
+ m_scene.getEngine()->registerTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
printGraph( *m_runnable );
m_graph.addOutput( m_firstBounce.wholeViewId
, crg::makeLayoutState( VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) );
@@ -168,6 +170,8 @@ namespace castor3d
Voxelizer::~Voxelizer()
{
+ m_scene.getEngine()->unregisterTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
m_runnable.reset();
m_firstBounce.destroy();
m_secondaryBounce.destroy();
diff --git a/source/Core/Castor3D/Render/Node/QueueRenderNodes.cpp b/source/Core/Castor3D/Render/Node/QueueRenderNodes.cpp
index 559747a0f6..07527f46d6 100644
--- a/source/Core/Castor3D/Render/Node/QueueRenderNodes.cpp
+++ b/source/Core/Castor3D/Render/Node/QueueRenderNodes.cpp
@@ -974,7 +974,7 @@ namespace castor3d
m_billboardIndirectCommands.reset();
m_submeshNIdxIndirectCommands.reset();
m_submeshIdxIndirectCommands.reset();
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
m_submeshMeshletIndirectCommands.reset();
#endif
}
@@ -1118,7 +1118,7 @@ namespace castor3d
{
auto & queue = *getOwner();
auto & scene = queue.getCuller().getScene();
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
auto renderPass = queue.getOwner();
auto origIndirectMshBuffer = m_submeshMeshletIndirectCommands
? m_submeshMeshletIndirectCommands->lock( 0u, ashes::WholeSize, 0u )
@@ -1144,7 +1144,7 @@ namespace castor3d
for ( auto & culled : bufferIt.second )
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
queuerndnd::fillNodeCommands( *culled.node
, scene
, renderPass->isMeshShading()
@@ -1175,7 +1175,7 @@ namespace castor3d
{
for ( auto & submeshIt : passIt.second )
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
queuerndnd::fillNodeCommands( submeshIt.second
, renderPass->isMeshShading()
, indirectMshBuffer
@@ -1194,7 +1194,7 @@ namespace castor3d
}
}
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
if ( m_submeshMeshletIndirectCommands )
{
@@ -1260,7 +1260,7 @@ namespace castor3d
, 0u
, 0u ) );
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
auto & submeshMshCommands = *m_submeshMeshletIndirectCommands;
auto & submeshIdxCommands = *m_submeshIdxIndirectCommands;
@@ -1419,13 +1419,13 @@ namespace castor3d
, frontCulled
, m_pipelines );
- if ( it == m_pipelines.end() )
+ if ( pipelineFlags.usesMesh() )
{
- if ( pipelineFlags.usesMesh() )
- {
- node.createMeshletDescriptorSet();
- }
+ node.createMeshletDescriptorSet();
+ }
+ if ( it == m_pipelines.end() )
+ {
auto & result = frontCulled
? renderPass.prepareFrontPipeline( pipelineFlags
, node.getGeometryBuffers( pipelineFlags ).layouts
diff --git a/source/Core/Castor3D/Render/Opaque/OpaquePass.cpp b/source/Core/Castor3D/Render/Opaque/OpaquePass.cpp
index 0f84d245a2..8ff512001e 100644
--- a/source/Core/Castor3D/Render/Opaque/OpaquePass.cpp
+++ b/source/Core/Castor3D/Render/Opaque/OpaquePass.cpp
@@ -70,6 +70,7 @@ namespace castor3d
ShaderFlags OpaquePass::getShaderFlags()const
{
return ShaderFlag::eTangentSpace
+ | ShaderFlag::eViewSpace
| ShaderFlag::eOpacity
| ShaderFlag::eColour;
}
@@ -101,7 +102,7 @@ namespace castor3d
ashes::PipelineColorBlendStateCreateInfo OpaquePass::doCreateBlendState( PipelineFlags const & flags )const
{
- return RenderNodesPass::createBlendState( flags.colourBlendMode, flags.alphaBlendMode, 6u );
+ return RenderNodesPass::createBlendState( flags.colourBlendMode, BlendMode::eNoBlend, 4u );
}
ShaderPtr OpaquePass::doGetPixelShaderSource( PipelineFlags const & flags )const
diff --git a/source/Core/Castor3D/Render/Overlays/OverlayPass.cpp b/source/Core/Castor3D/Render/Overlays/OverlayPass.cpp
index 3793d91c80..ae066b78f0 100644
--- a/source/Core/Castor3D/Render/Overlays/OverlayPass.cpp
+++ b/source/Core/Castor3D/Render/Overlays/OverlayPass.cpp
@@ -95,7 +95,8 @@ namespace castor3d
m_counts = {};
auto preparer = m_renderer->beginPrepare( m_device
, m_renderPass.getRenderPass( 0u )
- , m_renderPass.getFramebuffer( 0u ) );
+ , m_renderPass.getFramebuffer( 0u )
+ , m_graph.getFence() );
preparer.setDrawCounts( m_counts.drawCalls );
if ( m_drawGlobal )
@@ -137,7 +138,8 @@ namespace castor3d
{
m_renderer->beginPrepare( m_device
, m_renderPass.getRenderPass( 0u )
- , m_renderPass.getFramebuffer( 0u ) );
+ , m_renderPass.getFramebuffer( 0u )
+ , m_graph.getFence() );
}
m_renderer->registerComputeCommands( context, commandBuffer );
diff --git a/source/Core/Castor3D/Render/Overlays/OverlayPreparer.cpp b/source/Core/Castor3D/Render/Overlays/OverlayPreparer.cpp
index 53bcbf8db2..15465427d9 100644
--- a/source/Core/Castor3D/Render/Overlays/OverlayPreparer.cpp
+++ b/source/Core/Castor3D/Render/Overlays/OverlayPreparer.cpp
@@ -65,9 +65,11 @@ namespace castor3d
OverlayPreparer::OverlayPreparer( OverlayRenderer & renderer
, RenderDevice const & device
, VkRenderPass renderPass
- , VkFramebuffer framebuffer )
+ , VkFramebuffer framebuffer
+ , crg::Fence & fence )
: m_renderer{ renderer }
, m_device{ device }
+ , m_fence{ fence }
, m_renderPass{ renderPass }
, m_framebuffer{ framebuffer }
{
@@ -77,6 +79,7 @@ namespace castor3d
OverlayPreparer::OverlayPreparer( OverlayPreparer && rhs )noexcept
: m_renderer{ rhs.m_renderer }
, m_device{ rhs.m_device }
+ , m_fence{ rhs.m_fence }
, m_renderPass{ rhs.m_renderPass }
, m_framebuffer{ rhs.m_framebuffer }
{
@@ -87,6 +90,7 @@ namespace castor3d
OverlayPreparer & OverlayPreparer::operator=( OverlayPreparer && rhs )noexcept
{
m_renderPass = rhs.m_renderPass;
+ m_framebuffer = rhs.m_framebuffer;
rhs.m_renderPass = VkRenderPass{};
rhs.m_framebuffer = VkFramebuffer{};
@@ -99,7 +103,7 @@ namespace castor3d
if ( m_renderPass )
{
fillDrawData();
- auto & commandBuffer = m_renderer.doBeginPrepare( m_renderPass, m_framebuffer );
+ auto & commandBuffer = m_renderer.doBeginPrepare( m_renderPass, m_framebuffer, m_fence );
for ( auto [level, pipelines] : m_levelsOverlays )
{
diff --git a/source/Core/Castor3D/Render/Overlays/OverlayRenderer.cpp b/source/Core/Castor3D/Render/Overlays/OverlayRenderer.cpp
index 30f4e5d97c..0fa01d5a7a 100644
--- a/source/Core/Castor3D/Render/Overlays/OverlayRenderer.cpp
+++ b/source/Core/Castor3D/Render/Overlays/OverlayRenderer.cpp
@@ -722,11 +722,13 @@ namespace castor3d
void OverlayRenderer::OverlaysDrawData::beginPrepare( VkRenderPass renderPass
, VkFramebuffer framebuffer
+ , crg::Fence & fence
, crg::FramePassTimer & timer
, castor::Size const & size )
{
timerBlock = std::make_unique< crg::FramePassTimerBlock >( timer.start() );
retired.clear();
+ fence.wait( ashes::MaxTimeout );
commands.commandBuffer->begin( VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
, makeVkStruct< VkCommandBufferInheritanceInfo >( renderPass
, 0u
@@ -1035,9 +1037,10 @@ namespace castor3d
OverlayPreparer OverlayRenderer::beginPrepare( RenderDevice const & device
, VkRenderPass renderPass
- , VkFramebuffer framebuffer )
+ , VkFramebuffer framebuffer
+ , crg::Fence & fence )
{
- return OverlayPreparer{ *this, device, renderPass, framebuffer };
+ return OverlayPreparer{ *this, device, renderPass, framebuffer, fence };
}
void OverlayRenderer::upload( UploadData & uploader )
@@ -1054,9 +1057,10 @@ namespace castor3d
}
ashes::CommandBuffer & OverlayRenderer::doBeginPrepare( VkRenderPass renderPass
- , VkFramebuffer framebuffer )
+ , VkFramebuffer framebuffer
+ , crg::Fence & fence )
{
- m_draw.beginPrepare( renderPass, framebuffer, m_timer, m_size );
+ m_draw.beginPrepare( renderPass, framebuffer, fence, m_timer, m_size );
return *m_draw.commands.commandBuffer;
}
diff --git a/source/Core/Castor3D/Render/Picking.cpp b/source/Core/Castor3D/Render/Picking.cpp
index c6f9d7726b..1157f94821 100644
--- a/source/Core/Castor3D/Render/Picking.cpp
+++ b/source/Core/Castor3D/Render/Picking.cpp
@@ -164,6 +164,8 @@ namespace castor3d
, m_transferFence{ m_device->createFence( "PickingPass" ) }
{
m_runnable = m_graph.compile( device.makeContext() );
+ getEngine()->registerTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
printGraph( *m_runnable );
m_colourTexture = std::make_unique< ashes::Image >( *m_device
, m_runnable->createImage( m_colourImage )
@@ -175,6 +177,8 @@ namespace castor3d
Picking::~Picking()
{
+ getEngine()->unregisterTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
m_commandBuffer.reset();
m_pickBuffer->unlock();
m_pickBuffer.reset();
diff --git a/source/Core/Castor3D/Render/Prepass/DepthPass.cpp b/source/Core/Castor3D/Render/Prepass/DepthPass.cpp
index 92b4c34af0..c13021c15a 100644
--- a/source/Core/Castor3D/Render/Prepass/DepthPass.cpp
+++ b/source/Core/Castor3D/Render/Prepass/DepthPass.cpp
@@ -64,6 +64,7 @@ namespace castor3d
{
return ShaderFlag::eWorldSpace
| ShaderFlag::eTangentSpace
+ | ShaderFlag::eViewSpace
| ShaderFlag::eVelocity
| ShaderFlag::eOpacity
| ShaderFlag::eDepth
diff --git a/source/Core/Castor3D/Render/RenderDevice.cpp b/source/Core/Castor3D/Render/RenderDevice.cpp
index b46d6fe0e8..c2d6f7bfa2 100644
--- a/source/Core/Castor3D/Render/RenderDevice.cpp
+++ b/source/Core/Castor3D/Render/RenderDevice.cpp
@@ -721,7 +721,7 @@ namespace castor3d
bool RenderDevice::hasMeshShaders()const
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
return m_meshShaderFeatures.meshShader == VK_TRUE;
#else
return false;
@@ -730,7 +730,7 @@ namespace castor3d
bool RenderDevice::hasTaskShaders()const
{
-#if VK_NV_mesh_shader
+#if VK_EXT_mesh_shader || VK_NV_mesh_shader
return m_meshShaderFeatures.taskShader == VK_TRUE;
#else
return false;
diff --git a/source/Core/Castor3D/Render/RenderNodesPass.cpp b/source/Core/Castor3D/Render/RenderNodesPass.cpp
index 29fd489e29..234a6b3cc0 100644
--- a/source/Core/Castor3D/Render/RenderNodesPass.cpp
+++ b/source/Core/Castor3D/Render/RenderNodesPass.cpp
@@ -1212,7 +1212,8 @@ namespace castor3d
ShaderPtr RenderNodesPass::doGetTaskShaderSource( PipelineFlags const & flags )const
{
sdw::TaskWriter writer;
- bool checkCones = flags.hasSubmeshData( SubmeshFlag::eNormals )
+ bool checkCones = flags.isFrontCulled()
+ && flags.hasSubmeshData( SubmeshFlag::eNormals )
&& !flags.hasWorldPosInputs();
C3D_Camera( writer
@@ -1267,7 +1268,7 @@ namespace castor3d
auto sphereRadius = writer.declLocale( "sphereRadius"
, cullData.sphere.w() );
auto coneNormal = writer.declLocale( "coneNormal"
- , cullData.cone.xyz()
+ , flags.isFrontCulled() ? -cullData.cone.xyz() : cullData.cone.xyz()
, checkCones );
auto coneCutOff = writer.declLocale( "coneCutOff"
, cullData.cone.w()
@@ -1286,7 +1287,7 @@ namespace castor3d
, cullData.sphere.w() * meanScale );
auto coneNormal = writer.declLocale( "coneNormal"
- , normalize( ( curMtxModel * vec4( cullData.cone.xyz(), 0.0 ) ).xyz() )
+ , normalize( ( curMtxModel * vec4( flags.isFrontCulled() ? -cullData.cone.xyz() : cullData.cone.xyz(), 0.0 ) ).xyz() )
, checkCones );
auto coneCutOff = writer.declLocale( "coneCutOff"
, cullData.cone.w()
@@ -1368,7 +1369,7 @@ namespace castor3d
IF( writer, laneId == 0u )
{
- payload.dispatchMesh( tasks );
+ payload.dispatchMesh( SDW_TaskLocalSize( tasks, 1_u, 1_u ) );
}
FI;
@@ -1496,6 +1497,7 @@ namespace castor3d
FOR( writer, sdw::UInt, i, laneId, i < indexCount, i += 32u )
{
+ //primOut[i].primitiveID = i;
primOut[i].primitiveIndex = uvec3( meshlet.indices[i * 3u + 0u]
, meshlet.indices[i * 3u + 1u]
, meshlet.indices[i * 3u + 2u] );
diff --git a/source/Core/Castor3D/Render/RenderSystem.cpp b/source/Core/Castor3D/Render/RenderSystem.cpp
index 6b58fd9500..2107def52e 100644
--- a/source/Core/Castor3D/Render/RenderSystem.cpp
+++ b/source/Core/Castor3D/Render/RenderSystem.cpp
@@ -346,6 +346,7 @@ namespace castor3d
uint32_t constexpr vk1_0 = ashes::makeVersion( 1, 0, 0 );
uint32_t constexpr vk1_1 = ashes::makeVersion( 1, 1, 0 );
uint32_t constexpr vk1_2 = ashes::makeVersion( 1, 2, 0 );
+ uint32_t constexpr vk1_3 = ashes::makeVersion( 1, 3, 0 );
//*************************************************************************
@@ -520,7 +521,11 @@ namespace castor3d
{
uint32_t result{ spirv::v1_0 };
- if ( vkApiVersion >= vk1_2 )
+ if ( vkApiVersion >= vk1_3 )
+ {
+ result = spirv::v1_6;
+ }
+ else if ( vkApiVersion >= vk1_2 )
{
result = spirv::v1_5;
}
@@ -755,7 +760,6 @@ namespace castor3d
m_gpuInformations.setValue( GpuMax::eMeshWorkGroupSizeX, meshLimits.maxMeshWorkGroupSize[0] );
m_gpuInformations.setValue( GpuMax::eMeshWorkGroupSizeY, meshLimits.maxMeshWorkGroupSize[1] );
m_gpuInformations.setValue( GpuMax::eMeshWorkGroupSizeZ, meshLimits.maxMeshWorkGroupSize[2] );
- m_gpuInformations.setValue( GpuMax::eMeshTotalMemorySize, meshLimits.maxMeshTotalMemorySize );
m_gpuInformations.setValue( GpuMax::eMeshOutputVertices, meshLimits.maxMeshOutputVertices );
m_gpuInformations.setValue( GpuMax::eMeshOutputPrimitives, meshLimits.maxMeshOutputPrimitives );
}
@@ -763,13 +767,10 @@ namespace castor3d
if ( m_device->hasTaskShaders() )
{
auto & meshLimits = m_device->getMeshProperties();
- m_gpuInformations.setValue( GpuMax::eDrawMeshTasksCount, meshLimits.maxDrawMeshTasksCount );
m_gpuInformations.setValue( GpuMax::eTaskWorkGroupInvocations, meshLimits.maxTaskWorkGroupInvocations );
m_gpuInformations.setValue( GpuMax::eTaskWorkGroupSizeX, meshLimits.maxTaskWorkGroupSize[0] );
m_gpuInformations.setValue( GpuMax::eTaskWorkGroupSizeY, meshLimits.maxTaskWorkGroupSize[1] );
m_gpuInformations.setValue( GpuMax::eTaskWorkGroupSizeZ, meshLimits.maxTaskWorkGroupSize[2] );
- m_gpuInformations.setValue( GpuMax::eTaskTotalMemorySize, meshLimits.maxTaskTotalMemorySize );
- m_gpuInformations.setValue( GpuMax::eTaskOutputCount, meshLimits.maxTaskOutputCount );
}
#endif
diff --git a/source/Core/Castor3D/Render/RenderTarget.cpp b/source/Core/Castor3D/Render/RenderTarget.cpp
index 08c01adb29..b80b2cef7a 100644
--- a/source/Core/Castor3D/Render/RenderTarget.cpp
+++ b/source/Core/Castor3D/Render/RenderTarget.cpp
@@ -315,6 +315,7 @@ namespace castor3d
, castor::Size const & size
, castor::PixelFormat pixelFormat )
: OwnedBy< Engine >{ engine }
+ , m_device{ getOwner()->getRenderSystem()->getRenderDevice() }
, m_type{ type }
, m_size{ size }
, m_safeBandedSize{ getSafeBandedSize( size ) }
@@ -326,7 +327,7 @@ namespace castor3d
, m_index{ ++sm_uiCount }
, m_name{ cuT( "Target" ) + castor::string::toString( m_index ) }
, m_graph{ m_resources.getHandler(), m_name }
- , m_velocity{ getOwner()->getRenderSystem()->getRenderDevice()
+ , m_velocity{ m_device
, m_resources
, "Velocity"
, 0u
@@ -340,7 +341,7 @@ namespace castor3d
| VK_IMAGE_USAGE_TRANSFER_DST_BIT
| VK_IMAGE_USAGE_STORAGE_BIT )
, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK }
- , m_srgbObjects{ Texture{ getOwner()->getRenderSystem()->getRenderDevice()
+ , m_srgbObjects{ Texture{ m_device
, m_resources
, "SRGBResult0"
, 0u
@@ -350,7 +351,7 @@ namespace castor3d
, getPixelFormat()
, rendtgt::objectsUsageFlags
, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK }
- , Texture{ getOwner()->getRenderSystem()->getRenderDevice()
+ , Texture{ m_device
, m_resources
, "SRGBResult1"
, 0u
@@ -360,7 +361,7 @@ namespace castor3d
, getPixelFormat()
, rendtgt::objectsUsageFlags
, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK } }
- , m_hdrObjects{ Texture{ getOwner()->getRenderSystem()->getRenderDevice()
+ , m_hdrObjects{ Texture{ m_device
, m_resources
, "HDRResult0"
, 0u
@@ -370,7 +371,7 @@ namespace castor3d
, VK_FORMAT_R16G16B16A16_SFLOAT
, rendtgt::objectsUsageFlags
, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK }
- , Texture{ getOwner()->getRenderSystem()->getRenderDevice()
+ , Texture{ m_device
, m_resources
, "HDRResult1"
, 0u
@@ -380,7 +381,7 @@ namespace castor3d
, VK_FORMAT_R16G16B16A16_SFLOAT
, rendtgt::objectsUsageFlags
, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK } }
- , m_overlays{ getOwner()->getRenderSystem()->getRenderDevice()
+ , m_overlays{ m_device
, m_resources
, "Overlays"
, 0u
@@ -392,7 +393,7 @@ namespace castor3d
| VK_IMAGE_USAGE_SAMPLED_BIT
| VK_IMAGE_USAGE_TRANSFER_SRC_BIT )
, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK }
- , m_combined{ getOwner()->getRenderSystem()->getRenderDevice()
+ , m_combined{ m_device
, m_resources
, "Target"
, 0u
@@ -437,14 +438,31 @@ namespace castor3d
}
}
- for ( auto & texture : m_hdrObjects )
{
- texture.create();
- }
+ auto queueData = m_device.graphicsData();
+ auto fence = m_device->createFence();
+ auto commandBuffer = queueData->commandPool->createCommandBuffer();
+ commandBuffer->begin();
- for ( auto & texture : m_srgbObjects )
- {
- texture.create();
+ for ( auto & texture : m_hdrObjects )
+ {
+ texture.create();
+ commandBuffer->memoryBarrier( VK_PIPELINE_STAGE_HOST_BIT
+ , VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
+ , texture.makeShaderInputResource( VK_IMAGE_LAYOUT_UNDEFINED ) );
+ }
+
+ for ( auto & texture : m_srgbObjects )
+ {
+ texture.create();
+ commandBuffer->memoryBarrier( VK_PIPELINE_STAGE_HOST_BIT
+ , VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
+ , texture.makeShaderInputResource( VK_IMAGE_LAYOUT_UNDEFINED ) );
+ }
+
+ commandBuffer->end();
+ queueData->queue->submit( *commandBuffer, *fence );
+ fence->wait( ashes::MaxTimeout );
}
}
@@ -540,6 +558,8 @@ namespace castor3d
getEngine()->unregisterTimer( getName() + cuT( "/Overlays" ), *m_overlaysTimer );
m_overlaysTimer.reset();
m_intermediates.clear();
+ getEngine()->unregisterTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
m_runnable.reset();
m_combinePassSource = {};
m_combinePass = {};
@@ -982,6 +1002,8 @@ namespace castor3d
stepProgressBar( progress, "Compiling render graph" );
m_runnable = m_graph.compile( device.makeContext() );
+ getEngine()->registerTimer( m_runnable->getName() + "/Graph"
+ , m_runnable->getTimer() );
printGraph( *m_runnable );
doListIntermediateViews( m_intermediates );
m_debugConfig.resetImages();
@@ -1095,7 +1117,7 @@ namespace castor3d
, m_ssaoConfig
, progress
, C3D_UseDeferredRendering != 0
- , C3D_UseVisibilityBuffer != 0 && C3D_UseMeshShaders == 0
+ , C3D_UseVisibilityBuffer != 0
, C3D_UseWeightedBlendedRendering != 0 );
}
catch ( castor::Exception & exc )
diff --git a/source/Core/Castor3D/Render/RenderTechnique.cpp b/source/Core/Castor3D/Render/RenderTechnique.cpp
index a4a8561f11..eba8e246d7 100644
--- a/source/Core/Castor3D/Render/RenderTechnique.cpp
+++ b/source/Core/Castor3D/Render/RenderTechnique.cpp
@@ -444,6 +444,12 @@ namespace castor3d
? m_clearLpvGraph.compile( m_device.makeContext() )
: nullptr ) }
{
+ if ( m_clearLpvRunnable )
+ {
+ getEngine()->registerTimer( m_clearLpvRunnable->getName()
+ , m_clearLpvRunnable->getTimer() );
+ }
+
if ( m_voxelizer )
{
m_renderTarget.getGraph().addDependency( m_voxelizer->getGraph() );
@@ -488,6 +494,12 @@ namespace castor3d
RenderTechnique::~RenderTechnique()
{
+ if ( m_clearLpvRunnable )
+ {
+ getEngine()->unregisterTimer( m_clearLpvRunnable->getName()
+ , m_clearLpvRunnable->getTimer() );
+ }
+
m_llpvResult.clear();
m_lpvResult.reset();
m_voxelizer.reset();
diff --git a/source/Core/Castor3D/Render/RenderTechniquePass.cpp b/source/Core/Castor3D/Render/RenderTechniquePass.cpp
index 558fbd08b8..e71b085e81 100644
--- a/source/Core/Castor3D/Render/RenderTechniquePass.cpp
+++ b/source/Core/Castor3D/Render/RenderTechniquePass.cpp
@@ -488,11 +488,7 @@ namespace castor3d
return ashes::PipelineDepthStencilStateCreateInfo{ 0u
, VK_TRUE
, checkFlag( m_filters, RenderFilter::eAlphaBlend )
- , ( checkFlag( m_filters, RenderFilter::eAlphaBlend )
- ? ( checkFlag( getComponentsMask(), ComponentModeFlag::eForward )
- ? VK_COMPARE_OP_GREATER
- : VK_COMPARE_OP_GREATER_OR_EQUAL )
- : VK_COMPARE_OP_GREATER_OR_EQUAL ) };
+ , VK_COMPARE_OP_GREATER_OR_EQUAL };
}
}
diff --git a/source/Core/Castor3D/Render/ShadowMap/ShadowMap.cpp b/source/Core/Castor3D/Render/ShadowMap/ShadowMap.cpp
index 2bae441e72..ecca0f8cfd 100644
--- a/source/Core/Castor3D/Render/ShadowMap/ShadowMap.cpp
+++ b/source/Core/Castor3D/Render/ShadowMap/ShadowMap.cpp
@@ -256,6 +256,8 @@ namespace castor3d
{
CU_Require( myPasses.otherNodes.graphs[index] != nullptr );
myPasses.otherNodes.runnables[index] = myPasses.otherNodes.graphs[index]->compile( m_device.makeContext() );
+ getEngine()->registerTimer( myPasses.otherNodes.runnables[index]->getName()
+ , myPasses.otherNodes.runnables[index]->getTimer() );
printGraph( *myPasses.otherNodes.runnables.back() );
myPasses.otherNodes.runnables[index]->record();
}
@@ -323,6 +325,8 @@ namespace castor3d
{
// The graph will be defined for finale shadow map pass, but not for static one.
passes.runnables.push_back( graph.compile( m_device.makeContext() ) );
+ getEngine()->registerTimer( passes.runnables.back()->getName()
+ , passes.runnables.back()->getTimer() );
printGraph( *passes.runnables.back() );
passes.runnables.back()->record();
}
diff --git a/source/Core/Castor3D/Scene/Background/Background.cpp b/source/Core/Castor3D/Scene/Background/Background.cpp
index ac4adb8210..52b3b14683 100644
--- a/source/Core/Castor3D/Scene/Background/Background.cpp
+++ b/source/Core/Castor3D/Scene/Background/Background.cpp
@@ -109,9 +109,7 @@ namespace castor3d
private:
void doResetPipeline( uint32_t index )override
{
- resetCommandBuffer( index );
resetPipeline( {}, index );
- reRecordCurrent();
}
crg::IndexBuffer doCreateIndexBuffer( RenderDevice const & device )
diff --git a/source/Core/Castor3D/Scene/Background/Colour.cpp b/source/Core/Castor3D/Scene/Background/Colour.cpp
index 620a166c40..9749a6ed8d 100644
--- a/source/Core/Castor3D/Scene/Background/Colour.cpp
+++ b/source/Core/Castor3D/Scene/Background/Colour.cpp
@@ -84,6 +84,7 @@ namespace castor3d
auto data = device.graphicsData();
auto & value = m_scene.getBackgroundColour();
m_colour = castor::HdrRgbColour::fromComponents( value.red(), value.green(), value.blue() );
+ m_needsUpload = true;
return true;
}
diff --git a/source/Core/Castor3D/Shader/ShaderBuffer.cpp b/source/Core/Castor3D/Shader/ShaderBuffer.cpp
index d31739693c..f042a15775 100644
--- a/source/Core/Castor3D/Shader/ShaderBuffer.cpp
+++ b/source/Core/Castor3D/Shader/ShaderBuffer.cpp
@@ -53,6 +53,18 @@ namespace castor3d
, m_wantedState.pipelineStage );
}
+ void ShaderBuffer::upload( UploadData & uploader
+ , VkDeviceSize offset
+ , VkDeviceSize size )const
+ {
+ uploader.pushUpload( m_rawData
+ , size
+ , *m_buffer
+ , offset
+ , m_wantedState.access
+ , m_wantedState.pipelineStage );
+ }
+
VkDescriptorSetLayoutBinding ShaderBuffer::createLayoutBinding( uint32_t index
, VkShaderStageFlags stages )const
{
diff --git a/source/Core/Castor3D/Shader/Shaders/GlslSurface.cpp b/source/Core/Castor3D/Shader/Shaders/GlslSurface.cpp
index 309af20955..2249a35891 100644
--- a/source/Core/Castor3D/Shader/Shaders/GlslSurface.cpp
+++ b/source/Core/Castor3D/Shader/Shaders/GlslSurface.cpp
@@ -465,9 +465,9 @@ namespace castor3d::shader
void RasterizerSurfaceBase::fillType( sdw::type::BaseStruct & type )
{
SurfaceBase::fillType( type );
- type.declMember( "nodeId", ast::type::Kind::eInt
+ type.declMember( "nodeId", ast::type::Kind::eUInt
, ast::type::NotArray );
- type.declMember( "vertexId", ast::type::Kind::eInt
+ type.declMember( "vertexId", ast::type::Kind::eUInt
, ast::type::NotArray );
type.declMember( "curPosition", ast::type::Kind::eVec4F
, ast::type::NotArray );
diff --git a/source/Core/CastorUtils/CMakeLists.txt b/source/Core/CastorUtils/CMakeLists.txt
index fc3c2c7fdd..bcfd56fcc3 100644
--- a/source/Core/CastorUtils/CMakeLists.txt
+++ b/source/Core/CastorUtils/CMakeLists.txt
@@ -701,11 +701,17 @@ if ( ZLIB_FOUND AND FreeType_FOUND )
if ( CASTOR_USE_FREEIMAGE )
if ( VCPKG_TOOLCHAIN )
- find_package( LibRaw QUIET )
+ set( libpng_DIR ${VCPKG_SHARE_DIR}/libpng )
+ set( LibRaw_DIR ${VCPKG_SHARE_DIR}/libraw )
+ set( OpenJPEG_DIR ${VCPKG_SHARE_DIR}/openjpeg )
+ set( WebP_DIR ${VCPKG_SHARE_DIR}/webp )
set( freeimage_DIR ${VCPKG_SHARE_DIR}/freeimage )
+ find_package( libpng CONFIG REQUIRED )
+ find_package( OpenJPEG CONFIG REQUIRED )
+ find_package( WebP CONFIG REQUIRED )
find_package( freeimage CONFIG REQUIRED )
else ()
- find_package( FreeImage QUIET )
+ find_package( FreeImage REQUIRED )
if ( FreeImage_FOUND )
set( freeimage_FOUND FreeImage_FOUND )
endif ()
diff --git a/source/Core/SceneExporter/Text/TextTextureUnit.cpp b/source/Core/SceneExporter/Text/TextTextureUnit.cpp
index ee92506876..24cb965061 100644
--- a/source/Core/SceneExporter/Text/TextTextureUnit.cpp
+++ b/source/Core/SceneExporter/Text/TextTextureUnit.cpp
@@ -11,9 +11,32 @@
#include
#include
+#include
namespace castor
{
+ namespace txtexunit
+ {
+ static void reworkImageFileName( String texName, Path & path, bool & needsYInversion )
+ {
+ if ( path.getExtension() != "dds" )
+ {
+ needsYInversion = !needsYInversion;
+ }
+
+ // Remove TextureCache generated suffixes.
+ castor::string::replace( texName, "/Compressed", "" );
+ castor::string::replace( texName, "/Mipped", "" );
+ castor::string::replace( texName, "/Tiled", "" );
+ castor::string::replace( texName, "/RGBA", "" );
+ castor::string::replace( texName, "/HResampled", "" );
+ castor::string::replace( texName, "/WResampled", "" );
+
+ texName = File::normaliseFileName( texName );
+ path = Path{ Path{ texName }.getFileName() + cuT( ".dds" ) };
+ }
+ }
+
using namespace castor3d;
TextWriter< TextureUnit >::TextWriter( String const & tabs
@@ -45,12 +68,13 @@ namespace castor
{
hasTexture = true;
createImageFile = true;
- image = Path{ Path{ unit.getTextureName() }.getFileName() + cuT( ".dds" ) };
-
- if ( Path{ unit.getTextureName() }.getExtension() != "dds" )
- {
- config.needsYInversion = !config.needsYInversion;
- }
+ txtexunit::reworkImageFileName( unit.getTextureName(), image, config.needsYInversion );
+ }
+ else if ( unit.isTextured()
+ && ( ashes::isCompressedFormat( unit.getTexturePixelFormat() ) || unit.getTextureMipmapCount() > 1u ) )
+ {
+ createImageFile = true;
+ txtexunit::reworkImageFileName( unit.getTextureName(), image, config.needsYInversion );
}
if ( hasTexture )
diff --git a/source/Plugins/Generic/FFTOceanRendering/OceanFFTRenderPass.cpp b/source/Plugins/Generic/FFTOceanRendering/OceanFFTRenderPass.cpp
index 1307aacfa2..a5a5af9009 100644
--- a/source/Plugins/Generic/FFTOceanRendering/OceanFFTRenderPass.cpp
+++ b/source/Plugins/Generic/FFTOceanRendering/OceanFFTRenderPass.cpp
@@ -375,6 +375,8 @@ namespace ocean_fft
, oceanFFT->getHeightDisplacement()
, oceanFFT->getNormals() );
auto runnable = fftGraph.compile( device.makeContext() );
+ getEngine()->registerTimer( runnable->getName() + "/Graph"
+ , runnable->getTimer() );
runnable->record();
#else
auto oceanFFT = std::make_unique< OceanFFT >( device
diff --git a/source/Plugins/Importers/AssimpImporter/AssimpSceneNodeImporter.cpp b/source/Plugins/Importers/AssimpImporter/AssimpSceneNodeImporter.cpp
index 84f0f0d268..351d9029bc 100644
--- a/source/Plugins/Importers/AssimpImporter/AssimpSceneNodeImporter.cpp
+++ b/source/Plugins/Importers/AssimpImporter/AssimpSceneNodeImporter.cpp
@@ -15,11 +15,13 @@ namespace c3d_assimp
{
auto & file = static_cast< AssimpImporterFile const & >( *m_file );
auto name = node.getName();
+ bool isDefaultName = name == cuT( "SceneNode_" ) + castor::string::toString( node.getId() );
auto it = std::find_if( file.getNodes().begin()
, file.getNodes().end()
- , [&name]( NodeData const & lookup )
+ , [&name, isDefaultName]( NodeData const & lookup )
{
- return name == lookup.name;
+ return name == lookup.name
+ || ( isDefaultName && lookup.name.empty() );
} );
if ( it == file.getNodes().end() )