• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef API_3D_RENDER_IRENDER_DATA_STORE_DEFAULT_MATERIAL_H
17 #define API_3D_RENDER_IRENDER_DATA_STORE_DEFAULT_MATERIAL_H
18 
19 #include <cstdint>
20 
21 #include <3d/ecs/components/material_component.h>
22 #include <3d/render/render_data_defines_3d.h>
23 #include <base/containers/array_view.h>
24 #include <base/math/matrix.h>
25 #include <base/math/vector.h>
26 #include <core/namespace.h>
27 #include <render/datastore/intf_render_data_store.h>
28 #include <render/device/intf_shader_manager.h>
29 #include <render/resource_handle.h>
30 
31 CORE3D_BEGIN_NAMESPACE()
32 /** @ingroup group_render_irenderdatastoredefaultmaterial */
33 /** RenderDataDefaultMaterial.
34  */
35 struct RenderDataDefaultMaterial {
36     /** min supported roughness value. clamped to this - 1.0.
37     Avoids division with zero in shader BRDF calculations and prevents "zero" size speculars. */
38     static constexpr float MIN_ROUGHNESS { 0.089f };
39     /** max supported skin matrix count */
40     static constexpr uint32_t MAX_SKIN_MATRIX_COUNT { 128u };
41 
42     /** Count of uvec4 variables for material uniforms (must match 3d_dm_structure_common.h)
43      * Aligned for 256 bytes with indices.
44      */
45     static constexpr uint32_t MATERIAL_FACTOR_UNIFORM_VEC4_COUNT { 15u };
46     static constexpr uint32_t MATERIAL_PACKED_UNIFORM_UVEC4_COUNT { 15u };
47 
48     /** Count of uvec4 variables for material uniforms (must match 3d_dm_structure_common.h) */
49     static constexpr uint32_t MATERIAL_TEXTURE_COUNT { 11u };
50 
51     /** max default material custom resources */
52     static constexpr uint32_t MAX_MATERIAL_CUSTOM_RESOURCE_COUNT { 8u };
53 
54     /** max default material custom resources */
55     static constexpr uint32_t MAX_MESH_USER_VEC4_COUNT { 8u };
56 
57     /** max default material custom resources */
58     static constexpr uint32_t MAX_MATERIAL_CUSTOM_PROPERTY_BYTE_SIZE { 256u };
59 
60     /** default depth rendering related important flags for render material flags */
61     static constexpr uint32_t RENDER_MATERIAL_DEPTH_FLAGS {
62         RenderMaterialFlagBits::RENDER_MATERIAL_GPU_INSTANCING_BIT
63     };
64     /** default depth rendering related important flags for submesh flags */
65     static constexpr uint32_t RENDER_SUBMESH_DEPTH_FLAGS { RenderSubmeshFlagBits::RENDER_SUBMESH_SKIN_BIT };
66 
67     /** Input material uniforms
68      * There's no conversion happening to these, so pre-multiplications etc needs to happen prior
69      */
70     struct InputMaterialUniforms {
71         // the factor values are not the same default values as in MaterialComponent
72         struct TextureData {
73             BASE_NS::Math::Vec4 factor { 0.0f, 0.0f, 0.0f, 0.0f };
74             BASE_NS::Math::Vec2 translation { 0.0f, 0.0f };
75             float rotation { 0.0f };
76             BASE_NS::Math::Vec2 scale { 1.0f, 1.0f };
77         };
78         TextureData textureData[MATERIAL_TEXTURE_COUNT];
79         // separate values which is pushed to shader alpha cutoff
80         float alphaCutoff { 1.0f };
81         // texcoord set bits, selection for uv0 or uv1
82         uint32_t texCoordSetBits { 0u };
83         // texcoord transform set bits
84         uint32_t texTransformSetBits { 0u };
85         /** material id */
86         uint64_t id { 0 };
87     };
88 
89     /** Material uniforms (NOTE: rotScaleTrans could be packed more)
90      */
91     struct MaterialUniforms {
92         // Factors as half4
93         // 0: baseColor
94         // 1: normal
95         // 2: material
96         // 3: emissive
97         // 4: ao
98         // 5: clearcoat
99         // 6: clearcoat roughness
100         // 7: clearcoat normal
101         // 8: sheen
102         // 9: transmission
103         // 10: specular
104         // 11: alpha cutoff
105 
106         BASE_NS::Math::Vec4 factors[MATERIAL_FACTOR_UNIFORM_VEC4_COUNT];
107 
108         // unpacked, .xy material id,
109         BASE_NS::Math::UVec4 indices { 0u, 0u, 0u, 0u };
110     };
111 
112     struct MaterialPackedUniforms {
113         // Texture transforms as half4 ({2x2 mat}, {2d offset, unused})
114         // 0: rotScaleTrans baseColor
115         // 1: rotScaleTrans normal
116         // 2: rotScaleTrans material
117         // 3: rotScaleTrans emissive
118         // 4: rotScaleTrans ao
119         // 5: rotScaleTrans clearcoat
120         // 6: rotScaleTrans clearcoat roughness
121         // 7: rotScaleTrans clearcoat normal
122         // 8: rotScaleTrans sheen
123         // 9: rotScaleTrans transmission
124         // 10: rotScaleTrans specular
125 
126         //
127         // 12: alphaCutoff, unused, useTexcoord | hasTransform
128         BASE_NS::Math::UVec4 packed[MATERIAL_PACKED_UNIFORM_UVEC4_COUNT];
129 
130         // unpacked, .xy material id,
131         BASE_NS::Math::UVec4 indices { 0u, 0u, 0u, 0u };
132     };
133 
134     /*
135      * Combined uniforms for factors and packed transforms
136      **/
137     struct AllMaterialUniforms {
138         /** Material factor uniforms */
139         MaterialUniforms factors;
140         /** Material packed transforms */
141         MaterialPackedUniforms transforms;
142     };
143 
144     /** Material handles with handle reference (used as inputs)
145      */
146     struct MaterialHandlesWithHandleReference {
147         /** Source images for different texture types */
148         RENDER_NS::RenderHandleReference images[MATERIAL_TEXTURE_COUNT];
149         /** Samplers for different texture types */
150         RENDER_NS::RenderHandleReference samplers[MATERIAL_TEXTURE_COUNT];
151     };
152     /** Material handles with raw handles
153      */
154     struct MaterialHandles {
155         /** Source images for different texture types */
156         RENDER_NS::RenderHandle images[MATERIAL_TEXTURE_COUNT];
157         /** Samplers for different texture types */
158         RENDER_NS::RenderHandle samplers[MATERIAL_TEXTURE_COUNT];
159     };
160 
161     /** Material shader with handle references (used as inputs)
162      */
163     struct MaterialShaderWithHandleReference {
164         /** Shader to be used. (If invalid, a default is chosen by the default material renderer) */
165         RENDER_NS::RenderHandleReference shader;
166         /** Shader graphics state to be used. (If invalid, a default is chosen by the default material renderer) */
167         RENDER_NS::RenderHandleReference graphicsState;
168     };
169 
170     /** Material data
171      */
172     struct MaterialData {
173         /** Render material type */
174         RenderMaterialType materialType { RenderMaterialType::METALLIC_ROUGHNESS };
175         /** Render extra rendering flags */
176         RenderExtraRenderingFlags extraMaterialRenderingFlags { 0u };
177         /** Render material flags, same as MaterialComponent */
178         RenderMaterialFlags renderMaterialFlags { RENDER_MATERIAL_SHADOW_RECEIVER_BIT |
179                                                   RENDER_MATERIAL_SHADOW_CASTER_BIT |
180                                                   RENDER_MATERIAL_PUNCTUAL_LIGHT_RECEIVER_BIT |
181                                                   RENDER_MATERIAL_INDIRECT_LIGHT_RECEIVER_BIT };
182 
183         /** Custom render slot id */
184         uint32_t customRenderSlotId { ~0u };
185         /** Material shader */
186         MaterialShaderWithHandleReference materialShader;
187         /** Depth shader */
188         MaterialShaderWithHandleReference depthShader;
189 
190         /** Render sort layer id. Valid values are 0 - 63 */
191         uint8_t renderSortLayer { RenderSceneDataConstants::DEFAULT_RENDER_SORT_LAYER_ID };
192         /** Render sort layer id. Valid values are 0 - 255 */
193         uint8_t renderSortLayerOrder { 0 };
194     };
195 
196     /** Submesh material flags
197      */
198     struct SubmeshMaterialFlags {
199         /** Material type */
200         RenderMaterialType materialType { RenderMaterialType::METALLIC_ROUGHNESS };
201         /* Render submesh's submesh flags, dublicated here for convenience */
202         RenderSubmeshFlags submeshFlags { 0u };
203         /** Extra material rendering flags */
204         RenderExtraRenderingFlags extraMaterialRenderingFlags { 0u };
205 
206         /** Render material flags */
207         RenderMaterialFlags renderMaterialFlags { 0u };
208 
209         /** 32 bit hash based on the variables above */
210         uint32_t renderHash { 0u };
211         /** 32 bit hash based on the variables above targeted for default depth rendering hashing */
212         uint32_t renderDepthHash { 0u };
213     };
214 
215     struct SlotMaterialData {
216         /** Combined sort layer from render submesh */
217         uint16_t combinedRenderSortLayer { 0u };
218         /** Combined of render materials flags hash, material idx, shader id */
219         uint32_t renderSortHash { 0u };
220         /** Render material flags */
221         RenderMaterialFlags renderMaterialFlags { 0u };
222         /** Custom shader handle or invalid handle */
223         RENDER_NS::RenderHandle shader;
224         /** Custom graphics state handle or invalid handle */
225         RENDER_NS::RenderHandle gfxState;
226     };
227 
228     /** Object counts for rendering.
229      */
230     struct ObjectCounts {
231         /** Mesh count, NOTE: is currently global */
232         uint32_t meshCount { 0u };
233         /** Submesh count */
234         uint32_t submeshCount { 0u };
235         /** Skin count */
236         uint32_t skinCount { 0u };
237         /** Material count (frame material count) */
238         uint32_t materialCount { 0u };
239         /** Unique material count */
240         uint32_t uniqueMaterialCount { 0u };
241     };
242 
243     /** Per mesh skin joint matrices.
244      */
245     struct JointMatrixData {
246         /** Matrices */
247         BASE_NS::Math::Mat4X4* data { nullptr };
248         /** Matrix count */
249         uint32_t count { 0 };
250     };
251 
252     /** Material custom resources.
253      */
254     struct CustomResourceData {
255         /** invalid handle if custom material shader not given.
256          * With default material build-in render nodes must have compatible pipeline layout.
257          * With custom render slots and custom render nodes can be anything.
258          */
259         RENDER_NS::RenderHandle shaderHandle;
260 
261         /** handle count */
262         uint32_t resourceHandleCount { 0u };
263         /** invalid handles if not given */
264         RENDER_NS::RenderHandle resourceHandles[MAX_MATERIAL_CUSTOM_RESOURCE_COUNT];
265     };
266 
267     /** Material slot types. Where
268      */
269     enum class MaterialSlotType : uint32_t {
270         /** Basic opaque slot */
271         SLOT_TYPE_OPAQUE = 0,
272         /** Basic translucent slot */
273         SLOT_TYPE_TRANSLUCENT = 1,
274         /** Basic depth slot for shadows and depth pre-pass */
275         SLOT_TYPE_DEPTH = 2,
276     };
277 };
278 
279 /** @ingroup group_render_irenderdatastoredefaultmaterial */
280 /** RenderDataStoreDefaultMaterial interface.
281  * Not internally syncronized.
282  * Default material can be fetched with material id
283  * 0xFFFFffff and 0xFFFFFFFFffffffff
284  */
285 class IRenderDataStoreDefaultMaterial : public RENDER_NS::IRenderDataStore {
286 public:
287     static constexpr BASE_NS::Uid UID { "fdd9f86b-f5fc-45da-8832-41cbd649ed49" };
288 
289     ~IRenderDataStoreDefaultMaterial() override = default;
290 
291     /** Add mesh data.
292      * @param meshData All mesh data.
293      * @return Mesh index for submesh to use.
294      */
295     virtual uint32_t AddMeshData(const RenderMeshData& meshData) = 0;
296 
297     /** Update (or create) rendering material data.
298      * Automatic hashing with id. (E.g. material entity id)
299      * Final rendering material flags are per submesh (RenderDataDefaultMaterial::SubmeshMaterialFlags)
300      * @param id Material component id. In typical ECS usage material entity id.
301      * @param materialUniforms input material uniforms.
302      * @param materialHandles raw GPU resource handles.
303      * @param materialData Material data.
304      * @return Returns material index.
305      */
306     virtual uint32_t UpdateMaterialData(const uint64_t id,
307         const RenderDataDefaultMaterial::InputMaterialUniforms& materialUniforms,
308         const RenderDataDefaultMaterial::MaterialHandlesWithHandleReference& materialHandles,
309         const RenderDataDefaultMaterial::MaterialData& materialData) = 0;
310 
311     /** Update (or create) rendering material data.
312      * Automatic hashing with id. (E.g. material entity id)
313      * Final rendering material flags are per submesh (RenderDataDefaultMaterial::SubmeshMaterialFlags)
314      * @param id Material component id. In typical ECS usage material entity id.
315      * @param materialUniforms input material uniforms.
316      * @param materialHandles raw GPU resource handles.
317      * @param materialData Material data.
318      * @param customPropertyData Custom property data per material.
319      * @return Returns material index.
320      */
321     virtual uint32_t UpdateMaterialData(const uint64_t id,
322         const RenderDataDefaultMaterial::InputMaterialUniforms& materialUniforms,
323         const RenderDataDefaultMaterial::MaterialHandlesWithHandleReference& materialHandles,
324         const RenderDataDefaultMaterial::MaterialData& materialData,
325         const BASE_NS::array_view<const uint8_t> customPropertyData) = 0;
326 
327     /** Update (or create) rendering material data.
328      * Automatic hashing with id. (E.g. material entity id)
329      * Final rendering material flags are per submesh (RenderDataDefaultMaterial::SubmeshMaterialFlags)
330      * @param id Material component id. In typical ECS usage material entity id.
331      * @param materialUniforms input material uniforms.
332      * @param materialHandles raw GPU resource handles.
333      * @param materialData Material data.
334      * @param customPropertyData Custom property data per material.
335      * @param customBindings Custom bindings data per material.
336      * @return Returns material index.
337      */
338     virtual uint32_t UpdateMaterialData(const uint64_t id,
339         const RenderDataDefaultMaterial::InputMaterialUniforms& materialUniforms,
340         const RenderDataDefaultMaterial::MaterialHandlesWithHandleReference& materialHandles,
341         const RenderDataDefaultMaterial::MaterialData& materialData,
342         const BASE_NS::array_view<const uint8_t> customPropertyData,
343         const BASE_NS::array_view<const RENDER_NS::RenderHandleReference> customBindings) = 0;
344 
345     /** Destroy material rendering data explicitly.
346      * NOTE: The references for the resources might be zero already at this point.
347      * In typical cases should be automatically called by some ECS system when material is destroyed
348      * @param id Material component id. In typical ECS usage material entity id.
349      */
350     virtual void DestroyMaterialData(const uint64_t id) = 0;
351 
352     /** Destroy material rendering data explicitly.
353      * NOTE: The references for the resources might be zero already at this point.
354      * In typical cases should be automatically called by some ECS system when material is destroyed
355      * @param ids Array view of material component ids. In typical ECS usage material entity id.
356      */
357     virtual void DestroyMaterialData(const BASE_NS::array_view<uint64_t> ids) = 0;
358 
359     /** Add material and get material index and frame offset
360      * @param id Material component id. In typical ECS usage material entity id.
361      * @return RenderFrameMaterialIndices material index and frame offset
362      */
363     virtual RenderFrameMaterialIndices AddFrameMaterialData(uint64_t id) = 0;
364 
365     /** Add material and get material index and frame offset
366      * @param id Material component id. In typical ECS usage material entity id.
367      * @param instanceCount Instance count of the same material.
368      * @return RenderFrameMaterialIndices material index and frame offset
369      */
370     virtual RenderFrameMaterialIndices AddFrameMaterialData(uint64_t id, uint32_t instanceCount) = 0;
371 
372     /** Add material and get material index and frame offset
373      * Automatic hashing with id. (E.g. material entity id)
374      * Final rendering material flags are per submesh (RenderDataDefaultMaterial::SubmeshMaterialFlags)
375      * @param id Material component id. In typical ECS usage material entity id.
376      * @return RenderFrameMaterialIndices material index and frame offset
377      */
378     virtual RenderFrameMaterialIndices AddFrameMaterialData(BASE_NS::array_view<const uint64_t> ids) = 0;
379 
380     /** Add material without an id to be rendered this frame.
381      * Prefer using id based material updates.
382      * The data is automatically cleared after the rendering has been processed.
383      * @param materialUniforms input material uniforms.
384      * @param materialHandles raw GPU resource handles.
385      * @param materialData Material data.
386      * @param customPropertyData Custom property data per material.
387      * @param customBindings Custom bindings data per material.
388      */
389     virtual RenderFrameMaterialIndices AddFrameMaterialData(
390         const RenderDataDefaultMaterial::InputMaterialUniforms& materialUniforms,
391         const RenderDataDefaultMaterial::MaterialHandlesWithHandleReference& materialHandles,
392         const RenderDataDefaultMaterial::MaterialData& materialData,
393         const BASE_NS::array_view<const uint8_t> customPropertyData,
394         const BASE_NS::array_view<const RENDER_NS::RenderHandleReference> customBindings) = 0;
395 
396     /** Add material instance data and get material index and frame offset
397      * Final rendering material flags are per submesh (RenderDataDefaultMaterial::SubmeshMaterialFlags)
398      * @param materialIndex Material index (from get material index or update).
399      * @param frameOffset Frame offset for the base instance material.
400      * @param instanceIndex Offset to base frame offset for this instance.
401      * @return Material frame offset index for submesh to use.
402      */
403     virtual RenderFrameMaterialIndices AddFrameMaterialInstanceData(
404         uint32_t materialIndex, uint32_t frameOffset, uint32_t instanceIndex) = 0;
405 
406     /** Get material index.
407      * Default material can be fetched with material id
408      * 0xFFFFffff and 0xFFFFFFFFffffffff
409      * @param id Material component id. In typical ECS usage material entity id.
410      * @return Material index to material array.
411      */
412     virtual uint32_t GetMaterialIndex(uint64_t id) const = 0;
413 
414     /** Get material frame indices for material arrays.
415      * Returns all the material offsets which have been added.
416      * Same material index might be in these offset multiple times due to instancing.
417      * @return Material indices to material arrays.
418      */
419     virtual BASE_NS::array_view<const uint32_t> GetMaterialFrameIndices() const = 0;
420 
421     /** Add skin joint matrices and get an index for render submesh.
422      * If skinJointMatrices.size() != previousSkinJointMatrices.size()
423      * The skinJointMatrices are copied to previous frame buffer.
424      * @param skinJointMatrices All skin joint matrices.
425      * @param prevSkinJointMatrices All skin joint matrices for previous frame.
426      * @return Skin joint matrices index for submesh to use. (if no skin joints are given
427      * RenderSceneDataConstants::INVALID_INDEX is returned)
428      */
429     virtual uint32_t AddSkinJointMatrices(const BASE_NS::array_view<const BASE_NS::Math::Mat4X4> skinJointMatrices,
430         const BASE_NS::array_view<const BASE_NS::Math::Mat4X4> prevSkinJointMatrices) = 0;
431 
432     /** Add submeshes safely with default material to rendering. Render slots are evaluated automatically.
433      * @param submesh Submesh.
434      */
435     virtual void AddSubmesh(const RenderSubmeshWithHandleReference& submesh) = 0;
436 
437     /** Add submeshes safely with default material to rendering.
438      * @param submesh Submesh.
439      * @param renderSlotAndShaders All the render slots where the submesh is handled.
440      */
441     virtual void AddSubmesh(const RenderSubmeshWithHandleReference& submesh,
442         const BASE_NS::array_view<const RENDER_NS::IShaderManager::RenderSlotData> renderSlotAndShaders) = 0;
443 
444     /** Set render slots for material types.
445      * @param materialSlotType Material slot type.
446      * @param renderSlotIds All render slot ids.
447      */
448     virtual void SetRenderSlots(const RenderDataDefaultMaterial::MaterialSlotType materialSlotType,
449         const BASE_NS::array_view<const uint32_t> renderSlotIds) = 0;
450 
451     /** Get render slot mask for material type.
452      * @param materialSlotType Material slot type.
453      * @return Mask of render slot ids.
454      */
455     virtual uint64_t GetRenderSlotMask(const RenderDataDefaultMaterial::MaterialSlotType materialSlotType) const = 0;
456 
457     /** Get all object count which were send to rendering
458      * @return ObjectCounts
459      */
460     virtual RenderDataDefaultMaterial::ObjectCounts GetObjectCounts() const = 0;
461 
462     /** Get list of mesh data
463      */
464     virtual BASE_NS::array_view<const RenderMeshData> GetMeshData() const = 0;
465 
466     /** Get list of mesh skin joint matrices
467      */
468     virtual BASE_NS::array_view<const RenderDataDefaultMaterial::JointMatrixData> GetMeshJointMatrices() const = 0;
469 
470     /** Get slot submesh indices
471      * @param renderSlotId Index
472      */
473     virtual BASE_NS::array_view<const uint32_t> GetSlotSubmeshIndices(const uint32_t renderSlotId) const = 0;
474 
475     /** Get slot submesh shader handles
476      * @param renderSlotId Index
477      */
478     virtual BASE_NS::array_view<const RenderDataDefaultMaterial::SlotMaterialData> GetSlotSubmeshMaterialData(
479         const uint32_t renderSlotId) const = 0;
480 
481     /** Get object counts per render slot
482      * @param renderSlotId Index
483      */
484     virtual RenderDataDefaultMaterial::ObjectCounts GetSlotObjectCounts(const uint32_t renderSlotId) const = 0;
485 
486     /** Get list of render submeshes
487      */
488     virtual BASE_NS::array_view<const RenderSubmesh> GetSubmeshes() const = 0;
489 
490     /** Get submesh joint matrix data
491      * @param skinJointIndex Skin joint index from RenderSubmesh got from AddSkinJointMatrices().
492      */
493     virtual BASE_NS::array_view<const BASE_NS::Math::Mat4X4> GetSubmeshJointMatrixData(
494         const uint32_t skinJointIndex) const = 0;
495 
496     /** Get material uniforms (per material) */
497     virtual BASE_NS::array_view<const RenderDataDefaultMaterial::AllMaterialUniforms> GetMaterialUniforms() const = 0;
498     /** Get material handles (per material) */
499     virtual BASE_NS::array_view<const RenderDataDefaultMaterial::MaterialHandles> GetMaterialHandles() const = 0;
500     /** Get material custom property data with material index.
501      * @param materialIndex Index of material from RenderSubmesh and an index if going through e.g. material unforms
502      */
503     virtual BASE_NS::array_view<const uint8_t> GetMaterialCustomPropertyData(const uint32_t materialIndex) const = 0;
504     /** Get submesh material flags (per submesh) */
505     virtual BASE_NS::array_view<const RenderDataDefaultMaterial::SubmeshMaterialFlags>
506     GetSubmeshMaterialFlags() const = 0;
507 
508     /** Get custom resource handles */
509     virtual BASE_NS::array_view<const RenderDataDefaultMaterial::CustomResourceData>
510     GetCustomResourceHandles() const = 0;
511 
512     /** Generate render hash (32 bits as RenderDataDefaultMaterial::SubmeshMaterialFlags::renderHash) */
513     virtual uint32_t GenerateRenderHash(const RenderDataDefaultMaterial::SubmeshMaterialFlags& flags) const = 0;
514 
515     /** Add debug materials for all slot submeshes to be rendered this frame.
516      * The data is automatically cleared after the rendering has been processed.
517      * This should mainly be used for debugging purposes.
518      * @param toSlotId the (debug) render slot which we add a single material for e.g. debugging.
519      * @param fromSlotIds the common render slots with submeshes which we are rendering with additional materials.
520      * @param materialUniforms input material uniforms.
521      * @param materialHandles raw GPU resource handles.
522      * @param materialData Material data.
523      * @param customPropertyData Custom property data per material.
524      * @param customBindings Custom bindings data per material.
525      */
526     virtual RenderFrameMaterialIndices AddRenderSlotSubmeshesFrameMaterialData(const uint32_t toSlotId,
527         BASE_NS::array_view<const uint32_t> fromSlotIds,
528         const RenderDataDefaultMaterial::InputMaterialUniforms& materialUniforms,
529         const RenderDataDefaultMaterial::MaterialHandlesWithHandleReference& materialHandles,
530         const RenderDataDefaultMaterial::MaterialData& materialData,
531         const BASE_NS::array_view<const uint8_t> customPropertyData,
532         const BASE_NS::array_view<const RENDER_NS::RenderHandleReference> customBindings) = 0;
533 
534 protected:
535     IRenderDataStoreDefaultMaterial() = default;
536 };
537 CORE3D_END_NAMESPACE()
538 
539 #endif // API_3D_RENDER_IRENDER_DATA_STORE_DEFAULT_MATERIAL_H
540