1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ClusterShadingStage!
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
65 #include "OSGNode.h" // FrustNode Class
66 #include "OSGAlgorithmComputeElement.h" // FrustAlgoElement Class
67 #include "OSGComputeShaderAlgorithm.h" // FrustCompShaderAlgo Class
68 #include "OSGMultiLightChunk.h" // MultiLightChunk Class
69 #include "OSGShaderProgramChunk.h" // ShaderProgChunk Class
71 #include "OSGClusterShadingStageBase.h"
72 #include "OSGClusterShadingStage.h"
74 #include <boost/bind.hpp>
78 /***************************************************************************\
80 \***************************************************************************/
82 /*! \class OSG::ClusterShadingStage
86 /***************************************************************************\
87 * Field Documentation *
88 \***************************************************************************/
90 /*! \var UInt32 ClusterShadingStageBase::_sfBlockSize
91 The number of compute shader work group threads per xy-direction
94 /*! \var UInt32 ClusterShadingStageBase::_sfTileSize
95 The number of pixel per cluster tile per xy-direction. The overall number if
96 clusters is then tileSize^2 * numClusterZ.
99 /*! \var UInt32 ClusterShadingStageBase::_sfNumClusterZ
100 The number of clusters in the z direction. The overall number if
101 clusters is then tileSize^2 * numClusterZ.
104 /*! \var Real32 ClusterShadingStageBase::_sfNearPlaneOffset
105 z-coords below of zNear + near_plane_offset are mapped to cluster key 0, i.e.
106 the logarithmic clustering starts at zNear + near_plane_offset with key 1. Key 0
107 is therefor artificially. With this parameter you can enhance the cluster utilization.
110 /*! \var UInt32 ClusterShadingStageBase::_sfDispatchDataBindingPnt
111 The fragment shader binding point for the clustering data UBO.
114 /*! \var UInt32 ClusterShadingStageBase::_sfClusterDataBindingPnt
115 The fragment shader binding point for the clustering data UBO.
118 /*! \var UInt32 ClusterShadingStageBase::_sfLightBindingPnt
119 The fragment shader SSBO binding point for the multi light chunk.
122 /*! \var UInt32 ClusterShadingStageBase::_sfAffectedLightIndexListBindingPnt
123 The fragment shader binding point for the index list SSBO of the view frustum affecting lights.
126 /*! \var UInt32 ClusterShadingStageBase::_sfFrustumBindingPnt
127 The frustum and cull light computation shader binding point for the SSBO frustum buffer.
130 /*! \var UInt32 ClusterShadingStageBase::_sfLightIndexListBindingPnt
131 The fragment shader binding point for the index list SSBO of the cluster shading lights.
134 /*! \var UInt32 ClusterShadingStageBase::_sfLightIndexCounterBindingPnt
135 The fragment shader binding point for the index list global counter SSBO.
138 /*! \var UInt32 ClusterShadingStageBase::_sfLightGridBindingPnt
139 The fragment shader binding point for the texture image of the light grid.
142 /*! \var std::string ClusterShadingStageBase::_sfAffectedLightIndexListBlockName
143 The shader storage buffer block name for the affected light index buffer.
146 /*! \var std::string ClusterShadingStageBase::_sfAffectedLightIndexListVariableName
147 The variable name for the affected light index buffer.
150 /*! \var std::string ClusterShadingStageBase::_sfLightIndexListBlockName
151 The shader storage buffer block name for the global light index buffer.
154 /*! \var std::string ClusterShadingStageBase::_sfLightIndexListVariableName
155 The variable name for the global light index buffer.
158 /*! \var std::string ClusterShadingStageBase::_sfClusteringDataBlockName
159 The uniform buffer block name for the clustering data buffer.
162 /*! \var std::string ClusterShadingStageBase::_sfClusteringDataVariableName
163 The variable name for the clustering data buffer.
166 /*! \var std::string ClusterShadingStageBase::_sfLightGridVariableName
167 The variable name for the uniform light grid image array .
170 /*! \var bool ClusterShadingStageBase::_sfCalcFrustumsOnCPU
171 Calculate the view frustums on the CPU.
174 /*! \var bool ClusterShadingStageBase::_sfCullLighsOnCPU
175 Cull the lights on the CPU.
178 /*! \var bool ClusterShadingStageBase::_sfDisabled
179 Disable the stage completely. The geometry fragment shaders must act accordingly.
182 /*! \var UInt32 ClusterShadingStageBase::_sfMaxLightIndexListSize
183 The maximal number of light indices, i.e. the accumulated sum of all cluster lights. If the light index
184 list is completely filled all additional lights are silently dropped.
187 /*! \var UInt32 ClusterShadingStageBase::_sfMaxClusterLightCount
188 The maximal number of lights that can be attributed to one specific cluster. Realize, that
189 the accumulated sum of all cluster attributed lights must not exceed the maxLightIndexListSize.
190 If the number of lights for one cluster exceeds this limit the excessive lights are silently dropped.
193 /*! \var Node * ClusterShadingStageBase::_sfFrustNode
194 The frustum computation node.
197 /*! \var AlgorithmComputeElement * ClusterShadingStageBase::_sfFrustAlgoElement
198 The frustum algorithm computation element.
201 /*! \var ComputeShaderAlgorithm * ClusterShadingStageBase::_sfFrustCompShaderAlgo
202 The frustum computation shader algorithm.
205 /*! \var Node * ClusterShadingStageBase::_sfCullNode
206 The frustum computation node.
209 /*! \var AlgorithmComputeElement * ClusterShadingStageBase::_sfCullAlgoElement
210 The frustum algorithm computation element.
213 /*! \var ComputeShaderAlgorithm * ClusterShadingStageBase::_sfCullCompShaderAlgo
214 The frustum computation shader algorithm.
217 /*! \var MultiLightChunk * ClusterShadingStageBase::_sfMultiLightChunk
218 The multi light chunk.
221 /*! \var ShaderProgramChunk * ClusterShadingStageBase::_sfShaderProgChunk
222 The shader program chunk.
226 /***************************************************************************\
227 * FieldType/FieldTrait Instantiation *
228 \***************************************************************************/
230 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
231 PointerType FieldTraits
<ClusterShadingStage
*, nsOSG
>::_type(
232 "ClusterShadingStagePtr",
234 ClusterShadingStage::getClassType(),
238 OSG_FIELDTRAITS_GETTYPE_NS(ClusterShadingStage
*, nsOSG
)
240 /***************************************************************************\
241 * Field Description *
242 \***************************************************************************/
244 void ClusterShadingStageBase::classDescInserter(TypeObject
&oType
)
246 FieldDescriptionBase
*pDesc
= NULL
;
249 pDesc
= new SFUInt32::Description(
250 SFUInt32::getClassType(),
252 "The number of compute shader work group threads per xy-direction\n",
253 BlockSizeFieldId
, BlockSizeFieldMask
,
255 (Field::SFDefaultFlags
| Field::FStdAccess
),
256 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleBlockSize
),
257 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleBlockSize
));
259 oType
.addInitialDesc(pDesc
);
261 pDesc
= new SFUInt32::Description(
262 SFUInt32::getClassType(),
264 "The number of pixel per cluster tile per xy-direction. The overall number if\n"
265 "clusters is then tileSize^2 * numClusterZ.\n",
266 TileSizeFieldId
, TileSizeFieldMask
,
268 (Field::SFDefaultFlags
| Field::FStdAccess
),
269 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleTileSize
),
270 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleTileSize
));
272 oType
.addInitialDesc(pDesc
);
274 pDesc
= new SFUInt32::Description(
275 SFUInt32::getClassType(),
277 "The number of clusters in the z direction. The overall number if\n"
278 "clusters is then tileSize^2 * numClusterZ.\n",
279 NumClusterZFieldId
, NumClusterZFieldMask
,
281 (Field::SFDefaultFlags
| Field::FStdAccess
),
282 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleNumClusterZ
),
283 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleNumClusterZ
));
285 oType
.addInitialDesc(pDesc
);
287 pDesc
= new SFReal32::Description(
288 SFReal32::getClassType(),
290 "z-coords below of zNear + near_plane_offset are mapped to cluster key 0, i.e.\n"
291 "the logarithmic clustering starts at zNear + near_plane_offset with key 1. Key 0\n"
292 "is therefor artificially. With this parameter you can enhance the cluster utilization.\n",
293 NearPlaneOffsetFieldId
, NearPlaneOffsetFieldMask
,
295 (Field::SFDefaultFlags
| Field::FStdAccess
),
296 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleNearPlaneOffset
),
297 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleNearPlaneOffset
));
299 oType
.addInitialDesc(pDesc
);
301 pDesc
= new SFUInt32::Description(
302 SFUInt32::getClassType(),
303 "dispatchDataBindingPnt",
304 "The fragment shader binding point for the clustering data UBO.\n",
305 DispatchDataBindingPntFieldId
, DispatchDataBindingPntFieldMask
,
307 (Field::SFDefaultFlags
| Field::FStdAccess
),
308 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleDispatchDataBindingPnt
),
309 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleDispatchDataBindingPnt
));
311 oType
.addInitialDesc(pDesc
);
313 pDesc
= new SFUInt32::Description(
314 SFUInt32::getClassType(),
315 "clusterDataBindingPnt",
316 "The fragment shader binding point for the clustering data UBO.\n",
317 ClusterDataBindingPntFieldId
, ClusterDataBindingPntFieldMask
,
319 (Field::SFDefaultFlags
| Field::FStdAccess
),
320 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleClusterDataBindingPnt
),
321 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleClusterDataBindingPnt
));
323 oType
.addInitialDesc(pDesc
);
325 pDesc
= new SFUInt32::Description(
326 SFUInt32::getClassType(),
328 "The fragment shader SSBO binding point for the multi light chunk.\n",
329 LightBindingPntFieldId
, LightBindingPntFieldMask
,
331 (Field::SFDefaultFlags
| Field::FStdAccess
),
332 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightBindingPnt
),
333 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightBindingPnt
));
335 oType
.addInitialDesc(pDesc
);
337 pDesc
= new SFUInt32::Description(
338 SFUInt32::getClassType(),
339 "affectedLightIndexListBindingPnt",
340 "The fragment shader binding point for the index list SSBO of the view frustum affecting lights.\n",
341 AffectedLightIndexListBindingPntFieldId
, AffectedLightIndexListBindingPntFieldMask
,
343 (Field::SFDefaultFlags
| Field::FStdAccess
),
344 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleAffectedLightIndexListBindingPnt
),
345 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleAffectedLightIndexListBindingPnt
));
347 oType
.addInitialDesc(pDesc
);
349 pDesc
= new SFUInt32::Description(
350 SFUInt32::getClassType(),
352 "The frustum and cull light computation shader binding point for the SSBO frustum buffer.\n",
353 FrustumBindingPntFieldId
, FrustumBindingPntFieldMask
,
355 (Field::SFDefaultFlags
| Field::FStdAccess
),
356 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleFrustumBindingPnt
),
357 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleFrustumBindingPnt
));
359 oType
.addInitialDesc(pDesc
);
361 pDesc
= new SFUInt32::Description(
362 SFUInt32::getClassType(),
363 "lightIndexListBindingPnt",
364 "The fragment shader binding point for the index list SSBO of the cluster shading lights.\n",
365 LightIndexListBindingPntFieldId
, LightIndexListBindingPntFieldMask
,
367 (Field::SFDefaultFlags
| Field::FStdAccess
),
368 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightIndexListBindingPnt
),
369 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightIndexListBindingPnt
));
371 oType
.addInitialDesc(pDesc
);
373 pDesc
= new SFUInt32::Description(
374 SFUInt32::getClassType(),
375 "lightIndexCounterBindingPnt",
376 "The fragment shader binding point for the index list global counter SSBO.\n",
377 LightIndexCounterBindingPntFieldId
, LightIndexCounterBindingPntFieldMask
,
379 (Field::SFDefaultFlags
| Field::FStdAccess
),
380 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightIndexCounterBindingPnt
),
381 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightIndexCounterBindingPnt
));
383 oType
.addInitialDesc(pDesc
);
385 pDesc
= new SFUInt32::Description(
386 SFUInt32::getClassType(),
387 "lightGridBindingPnt",
388 "The fragment shader binding point for the texture image of the light grid.\n",
389 LightGridBindingPntFieldId
, LightGridBindingPntFieldMask
,
391 (Field::SFDefaultFlags
| Field::FStdAccess
),
392 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightGridBindingPnt
),
393 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightGridBindingPnt
));
395 oType
.addInitialDesc(pDesc
);
397 pDesc
= new SFString::Description(
398 SFString::getClassType(),
399 "affectedLightIndexListBlockName",
400 "The shader storage buffer block name for the affected light index buffer.\n",
401 AffectedLightIndexListBlockNameFieldId
, AffectedLightIndexListBlockNameFieldMask
,
403 (Field::SFDefaultFlags
| Field::FStdAccess
),
404 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleAffectedLightIndexListBlockName
),
405 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleAffectedLightIndexListBlockName
));
407 oType
.addInitialDesc(pDesc
);
409 pDesc
= new SFString::Description(
410 SFString::getClassType(),
411 "affectedLightIndexListVariableName",
412 "The variable name for the affected light index buffer.\n",
413 AffectedLightIndexListVariableNameFieldId
, AffectedLightIndexListVariableNameFieldMask
,
415 (Field::SFDefaultFlags
| Field::FStdAccess
),
416 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleAffectedLightIndexListVariableName
),
417 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleAffectedLightIndexListVariableName
));
419 oType
.addInitialDesc(pDesc
);
421 pDesc
= new SFString::Description(
422 SFString::getClassType(),
423 "lightIndexListBlockName",
424 "The shader storage buffer block name for the global light index buffer.\n",
425 LightIndexListBlockNameFieldId
, LightIndexListBlockNameFieldMask
,
427 (Field::SFDefaultFlags
| Field::FStdAccess
),
428 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightIndexListBlockName
),
429 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightIndexListBlockName
));
431 oType
.addInitialDesc(pDesc
);
433 pDesc
= new SFString::Description(
434 SFString::getClassType(),
435 "lightIndexListVariableName",
436 "The variable name for the global light index buffer.\n",
437 LightIndexListVariableNameFieldId
, LightIndexListVariableNameFieldMask
,
439 (Field::SFDefaultFlags
| Field::FStdAccess
),
440 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightIndexListVariableName
),
441 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightIndexListVariableName
));
443 oType
.addInitialDesc(pDesc
);
445 pDesc
= new SFString::Description(
446 SFString::getClassType(),
447 "clusteringDataBlockName",
448 "The uniform buffer block name for the clustering data buffer.\n",
449 ClusteringDataBlockNameFieldId
, ClusteringDataBlockNameFieldMask
,
451 (Field::SFDefaultFlags
| Field::FStdAccess
),
452 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleClusteringDataBlockName
),
453 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleClusteringDataBlockName
));
455 oType
.addInitialDesc(pDesc
);
457 pDesc
= new SFString::Description(
458 SFString::getClassType(),
459 "clusteringDataVariableName",
460 "The variable name for the clustering data buffer.\n",
461 ClusteringDataVariableNameFieldId
, ClusteringDataVariableNameFieldMask
,
463 (Field::SFDefaultFlags
| Field::FStdAccess
),
464 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleClusteringDataVariableName
),
465 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleClusteringDataVariableName
));
467 oType
.addInitialDesc(pDesc
);
469 pDesc
= new SFString::Description(
470 SFString::getClassType(),
471 "lightGridVariableName",
472 "The variable name for the uniform light grid image array .\n",
473 LightGridVariableNameFieldId
, LightGridVariableNameFieldMask
,
475 (Field::SFDefaultFlags
| Field::FStdAccess
),
476 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleLightGridVariableName
),
477 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleLightGridVariableName
));
479 oType
.addInitialDesc(pDesc
);
481 pDesc
= new SFBool::Description(
482 SFBool::getClassType(),
484 "Calculate the view frustums on the CPU.\n",
485 CalcFrustumsOnCPUFieldId
, CalcFrustumsOnCPUFieldMask
,
487 (Field::SFDefaultFlags
| Field::FStdAccess
),
488 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleCalcFrustumsOnCPU
),
489 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleCalcFrustumsOnCPU
));
491 oType
.addInitialDesc(pDesc
);
493 pDesc
= new SFBool::Description(
494 SFBool::getClassType(),
496 "Cull the lights on the CPU.\n",
497 CullLighsOnCPUFieldId
, CullLighsOnCPUFieldMask
,
499 (Field::SFDefaultFlags
| Field::FStdAccess
),
500 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleCullLighsOnCPU
),
501 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleCullLighsOnCPU
));
503 oType
.addInitialDesc(pDesc
);
505 pDesc
= new SFBool::Description(
506 SFBool::getClassType(),
508 "Disable the stage completely. The geometry fragment shaders must act accordingly.\n",
509 DisabledFieldId
, DisabledFieldMask
,
511 (Field::SFDefaultFlags
| Field::FStdAccess
),
512 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleDisabled
),
513 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleDisabled
));
515 oType
.addInitialDesc(pDesc
);
517 pDesc
= new SFUInt32::Description(
518 SFUInt32::getClassType(),
519 "maxLightIndexListSize",
520 "The maximal number of light indices, i.e. the accumulated sum of all cluster lights. If the light index\n"
521 "list is completely filled all additional lights are silently dropped.\n",
522 MaxLightIndexListSizeFieldId
, MaxLightIndexListSizeFieldMask
,
524 (Field::SFDefaultFlags
| Field::FStdAccess
),
525 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleMaxLightIndexListSize
),
526 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleMaxLightIndexListSize
));
528 oType
.addInitialDesc(pDesc
);
530 pDesc
= new SFUInt32::Description(
531 SFUInt32::getClassType(),
532 "maxClusterLightCount",
533 "The maximal number of lights that can be attributed to one specific cluster. Realize, that\n"
534 "the accumulated sum of all cluster attributed lights must not exceed the maxLightIndexListSize.\n"
535 "If the number of lights for one cluster exceeds this limit the excessive lights are silently dropped.\n",
536 MaxClusterLightCountFieldId
, MaxClusterLightCountFieldMask
,
538 (Field::SFDefaultFlags
| Field::FStdAccess
),
539 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleMaxClusterLightCount
),
540 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleMaxClusterLightCount
));
542 oType
.addInitialDesc(pDesc
);
544 pDesc
= new SFUnrecNodePtr::Description(
545 SFUnrecNodePtr::getClassType(),
547 "The frustum computation node.\n",
548 FrustNodeFieldId
, FrustNodeFieldMask
,
550 (Field::SFDefaultFlags
| Field::FStdAccess
),
551 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleFrustNode
),
552 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleFrustNode
));
554 oType
.addInitialDesc(pDesc
);
556 pDesc
= new SFUnrecAlgorithmComputeElementPtr::Description(
557 SFUnrecAlgorithmComputeElementPtr::getClassType(),
559 "The frustum algorithm computation element.\n",
560 FrustAlgoElementFieldId
, FrustAlgoElementFieldMask
,
562 (Field::SFDefaultFlags
| Field::FStdAccess
),
563 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleFrustAlgoElement
),
564 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleFrustAlgoElement
));
566 oType
.addInitialDesc(pDesc
);
568 pDesc
= new SFUnrecComputeShaderAlgorithmPtr::Description(
569 SFUnrecComputeShaderAlgorithmPtr::getClassType(),
570 "frustCompShaderAlgo",
571 "The frustum computation shader algorithm.\n",
572 FrustCompShaderAlgoFieldId
, FrustCompShaderAlgoFieldMask
,
574 (Field::SFDefaultFlags
| Field::FStdAccess
),
575 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleFrustCompShaderAlgo
),
576 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleFrustCompShaderAlgo
));
578 oType
.addInitialDesc(pDesc
);
580 pDesc
= new SFUnrecNodePtr::Description(
581 SFUnrecNodePtr::getClassType(),
583 "The frustum computation node.\n",
584 CullNodeFieldId
, CullNodeFieldMask
,
586 (Field::SFDefaultFlags
| Field::FStdAccess
),
587 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleCullNode
),
588 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleCullNode
));
590 oType
.addInitialDesc(pDesc
);
592 pDesc
= new SFUnrecAlgorithmComputeElementPtr::Description(
593 SFUnrecAlgorithmComputeElementPtr::getClassType(),
595 "The frustum algorithm computation element.\n",
596 CullAlgoElementFieldId
, CullAlgoElementFieldMask
,
598 (Field::SFDefaultFlags
| Field::FStdAccess
),
599 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleCullAlgoElement
),
600 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleCullAlgoElement
));
602 oType
.addInitialDesc(pDesc
);
604 pDesc
= new SFUnrecComputeShaderAlgorithmPtr::Description(
605 SFUnrecComputeShaderAlgorithmPtr::getClassType(),
606 "cullCompShaderAlgo",
607 "The frustum computation shader algorithm.\n",
608 CullCompShaderAlgoFieldId
, CullCompShaderAlgoFieldMask
,
610 (Field::SFDefaultFlags
| Field::FStdAccess
),
611 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleCullCompShaderAlgo
),
612 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleCullCompShaderAlgo
));
614 oType
.addInitialDesc(pDesc
);
616 pDesc
= new SFUnrecMultiLightChunkPtr::Description(
617 SFUnrecMultiLightChunkPtr::getClassType(),
619 "The multi light chunk.\n",
620 MultiLightChunkFieldId
, MultiLightChunkFieldMask
,
622 (Field::SFDefaultFlags
| Field::FStdAccess
),
623 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleMultiLightChunk
),
624 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleMultiLightChunk
));
626 oType
.addInitialDesc(pDesc
);
628 pDesc
= new SFUnrecShaderProgramChunkPtr::Description(
629 SFUnrecShaderProgramChunkPtr::getClassType(),
631 "The shader program chunk.\n",
632 ShaderProgChunkFieldId
, ShaderProgChunkFieldMask
,
634 (Field::SFDefaultFlags
| Field::FStdAccess
),
635 static_cast<FieldEditMethodSig
>(&ClusterShadingStage::editHandleShaderProgChunk
),
636 static_cast<FieldGetMethodSig
>(&ClusterShadingStage::getHandleShaderProgChunk
));
638 oType
.addInitialDesc(pDesc
);
642 ClusterShadingStageBase::TypeObject
ClusterShadingStageBase::_type(
643 ClusterShadingStageBase::getClassname(),
644 Inherited::getClassname(),
647 reinterpret_cast<PrototypeCreateF
>(&ClusterShadingStageBase::createEmptyLocal
),
648 reinterpret_cast<InitContainerF
>(&ClusterShadingStage::initMethod
),
649 reinterpret_cast<ExitContainerF
>(&ClusterShadingStage::exitMethod
),
650 reinterpret_cast<InitalInsertDescFunc
>(&ClusterShadingStage::classDescInserter
),
653 "<?xml version=\"1.0\"?>\n"
656 " name=\"ClusterShadingStage\"\n"
657 " parent=\"Stage\"\n"
658 " library=\"ContribTechniques\"\n"
659 " pointerfieldtypes=\"none\"\n"
660 " structure=\"concrete\"\n"
661 " systemcomponent=\"true\"\n"
662 " parentsystemcomponent=\"true\"\n"
663 " decoratable=\"false\"\n"
664 " useLocalIncludes=\"false\"\n"
665 " isNodeCore=\"true\"\n"
666 " isBundle=\"false\"\n"
670 " name=\"blockSize\"\n"
672 " cardinality=\"single\"\n"
673 " visibility=\"external\"\n"
674 " defaultValue=\"16\"\n"
675 " access=\"public\"\n"
677 " The number of compute shader work group threads per xy-direction\n"
681 " name=\"tileSize\"\n"
683 " cardinality=\"single\"\n"
684 " visibility=\"external\"\n"
685 " defaultValue=\"64\"\n"
686 " access=\"public\"\n"
688 " The number of pixel per cluster tile per xy-direction. The overall number if\n"
689 " clusters is then tileSize^2 * numClusterZ.\n"
693 " name=\"numClusterZ\"\n"
695 " cardinality=\"single\"\n"
696 " visibility=\"external\"\n"
697 " defaultValue=\"32\"\n"
698 " access=\"public\"\n"
700 " The number of clusters in the z direction. The overall number if\n"
701 " clusters is then tileSize^2 * numClusterZ.\n"
705 " name=\"nearPlaneOffset\"\n"
707 " cardinality=\"single\"\n"
708 " visibility=\"external\"\n"
709 " defaultValue=\"5.f\"\n"
710 " access=\"public\"\n"
712 " z-coords below of zNear + near_plane_offset are mapped to cluster key 0, i.e.\n"
713 " the logarithmic clustering starts at zNear + near_plane_offset with key 1. Key 0\n"
714 " is therefor artificially. With this parameter you can enhance the cluster utilization.\n"
718 " name=\"dispatchDataBindingPnt\"\n"
720 " cardinality=\"single\"\n"
721 " visibility=\"external\"\n"
722 " defaultValue=\"1\"\n"
723 " access=\"public\"\n"
725 " The fragment shader binding point for the clustering data UBO.\n"
729 " name=\"clusterDataBindingPnt\"\n"
731 " cardinality=\"single\"\n"
732 " visibility=\"external\"\n"
733 " defaultValue=\"2\"\n"
734 " access=\"public\"\n"
736 " The fragment shader binding point for the clustering data UBO.\n"
740 " name=\"lightBindingPnt\"\n"
742 " cardinality=\"single\"\n"
743 " visibility=\"external\"\n"
744 " defaultValue=\"1\"\n"
745 " access=\"public\"\n"
747 " The fragment shader SSBO binding point for the multi light chunk.\n"
751 " name=\"affectedLightIndexListBindingPnt\"\n"
753 " cardinality=\"single\"\n"
754 " visibility=\"external\"\n"
755 " defaultValue=\"2\"\n"
756 " access=\"public\"\n"
758 " The fragment shader binding point for the index list SSBO of the view frustum affecting lights.\n"
762 " name=\"frustumBindingPnt\"\n"
764 " cardinality=\"single\"\n"
765 " visibility=\"external\"\n"
766 " defaultValue=\"3\"\n"
767 " access=\"public\"\n"
769 " The frustum and cull light computation shader binding point for the SSBO frustum buffer.\n"
773 " name=\"lightIndexListBindingPnt\"\n"
775 " cardinality=\"single\"\n"
776 " visibility=\"external\"\n"
777 " defaultValue=\"4\"\n"
778 " access=\"public\"\n"
780 " The fragment shader binding point for the index list SSBO of the cluster shading lights.\n"
784 " name=\"lightIndexCounterBindingPnt\"\n"
786 " cardinality=\"single\"\n"
787 " visibility=\"external\"\n"
788 " defaultValue=\"5\"\n"
789 " access=\"public\"\n"
791 " The fragment shader binding point for the index list global counter SSBO.\n"
795 " name=\"lightGridBindingPnt\"\n"
797 " cardinality=\"single\"\n"
798 " visibility=\"external\"\n"
799 " defaultValue=\"0\"\n"
800 " access=\"public\"\n"
802 " The fragment shader binding point for the texture image of the light grid.\n"
806 " name=\"affectedLightIndexListBlockName\"\n"
807 " type=\"std::string\"\n"
808 " cardinality=\"single\"\n"
809 " visibility=\"external\"\n"
810 " access=\"public\"\n"
811 " defaultValue='\"AffectedLightIndexList\"'\n"
813 " The shader storage buffer block name for the affected light index buffer.\n"
817 " name=\"affectedLightIndexListVariableName\"\n"
818 " type=\"std::string\"\n"
819 " cardinality=\"single\"\n"
820 " visibility=\"external\"\n"
821 " access=\"public\"\n"
822 " defaultValue='\"affectedLightIndexList\"'\n"
824 " The variable name for the affected light index buffer.\n"
828 " name=\"lightIndexListBlockName\"\n"
829 " type=\"std::string\"\n"
830 " cardinality=\"single\"\n"
831 " visibility=\"external\"\n"
832 " access=\"public\"\n"
833 " defaultValue='\"LightIndexList\"'\n"
835 " The shader storage buffer block name for the global light index buffer.\n"
839 " name=\"lightIndexListVariableName\"\n"
840 " type=\"std::string\"\n"
841 " cardinality=\"single\"\n"
842 " visibility=\"external\"\n"
843 " access=\"public\"\n"
844 " defaultValue='\"lightIndexList\"'\n"
846 " The variable name for the global light index buffer.\n"
850 " name=\"clusteringDataBlockName\"\n"
851 " type=\"std::string\"\n"
852 " cardinality=\"single\"\n"
853 " visibility=\"external\"\n"
854 " access=\"public\"\n"
855 " defaultValue='\"ClusteringData\"'\n"
857 " The uniform buffer block name for the clustering data buffer.\n"
861 " name=\"clusteringDataVariableName\"\n"
862 " type=\"std::string\"\n"
863 " cardinality=\"single\"\n"
864 " visibility=\"external\"\n"
865 " access=\"public\"\n"
866 " defaultValue='\"clusteringData\"'\n"
868 " The variable name for the clustering data buffer.\n"
872 " name=\"lightGridVariableName\"\n"
873 " type=\"std::string\"\n"
874 " cardinality=\"single\"\n"
875 " visibility=\"external\"\n"
876 " access=\"public\"\n"
877 " defaultValue='\"light_grid\"'\n"
879 " The variable name for the uniform light grid image array .\n"
883 " name=\"calcFrustumsOnCPU\"\n"
885 " cardinality=\"single\"\n"
886 " visibility=\"external\"\n"
887 " defaultValue=\"false\"\n"
888 " access=\"public\"\n"
890 " Calculate the view frustums on the CPU.\n"
894 " name=\"cullLighsOnCPU\"\n"
896 " cardinality=\"single\"\n"
897 " visibility=\"external\"\n"
898 " defaultValue=\"false\"\n"
899 " access=\"public\"\n"
901 " Cull the lights on the CPU.\n"
905 " name=\"disabled\"\n"
907 " cardinality=\"single\"\n"
908 " visibility=\"external\"\n"
909 " defaultValue=\"false\"\n"
910 " access=\"public\"\n"
912 " Disable the stage completely. The geometry fragment shaders must act accordingly.\n"
916 " name=\"maxLightIndexListSize\"\n"
918 " cardinality=\"single\"\n"
919 " visibility=\"external\"\n"
920 " defaultValue=\"2097152\"\n"
921 " access=\"public\"\n"
923 " The maximal number of light indices, i.e. the accumulated sum of all cluster lights. If the light index\n"
924 " list is completely filled all additional lights are silently dropped.\n"
928 " name=\"maxClusterLightCount\"\n"
930 " cardinality=\"single\"\n"
931 " visibility=\"external\"\n"
932 " defaultValue=\"1024\"\n"
933 " access=\"public\"\n"
935 " The maximal number of lights that can be attributed to one specific cluster. Realize, that\n"
936 " the accumulated sum of all cluster attributed lights must not exceed the maxLightIndexListSize.\n"
937 " If the number of lights for one cluster exceeds this limit the excessive lights are silently dropped.\n"
941 " name=\"frustNode\"\n"
942 " type=\"NodePtr\"\n"
943 " cardinality=\"single\"\n"
944 " visibility=\"internal\"\n"
945 " defaultValue=\"NULL\"\n"
946 " access=\"protected\"\n"
948 " The frustum computation node.\n"
952 " name=\"frustAlgoElement\"\n"
953 " type=\"AlgorithmComputeElementPtr\"\n"
954 " cardinality=\"single\"\n"
955 " visibility=\"internal\"\n"
956 " defaultValue=\"NULL\"\n"
957 " access=\"protected\"\n"
959 " The frustum algorithm computation element.\n"
963 " name=\"frustCompShaderAlgo\"\n"
964 " type=\"ComputeShaderAlgorithmPtr\"\n"
965 " cardinality=\"single\"\n"
966 " visibility=\"internal\"\n"
967 " defaultValue=\"NULL\"\n"
968 " access=\"protected\"\n"
970 " The frustum computation shader algorithm.\n"
974 " name=\"cullNode\"\n"
975 " type=\"NodePtr\"\n"
976 " cardinality=\"single\"\n"
977 " visibility=\"internal\"\n"
978 " defaultValue=\"NULL\"\n"
979 " access=\"protected\"\n"
981 " The frustum computation node.\n"
985 " name=\"cullAlgoElement\"\n"
986 " type=\"AlgorithmComputeElementPtr\"\n"
987 " cardinality=\"single\"\n"
988 " visibility=\"internal\"\n"
989 " defaultValue=\"NULL\"\n"
990 " access=\"protected\"\n"
992 " The frustum algorithm computation element.\n"
996 " name=\"cullCompShaderAlgo\"\n"
997 " type=\"ComputeShaderAlgorithmPtr\"\n"
998 " cardinality=\"single\"\n"
999 " visibility=\"internal\"\n"
1000 " defaultValue=\"NULL\"\n"
1001 " access=\"protected\"\n"
1003 " The frustum computation shader algorithm.\n"
1007 " name=\"multiLightChunk\"\n"
1008 " type=\"MultiLightChunkPtr\"\n"
1009 " cardinality=\"single\"\n"
1010 " visibility=\"external\"\n"
1011 " defaultValue=\"NULL\"\n"
1012 " access=\"public\"\n"
1014 " The multi light chunk.\n"
1018 " name=\"shaderProgChunk\"\n"
1019 " type=\"ShaderProgramChunkPtr\"\n"
1020 " cardinality=\"single\"\n"
1021 " visibility=\"internal\"\n"
1022 " defaultValue=\"NULL\"\n"
1023 " access=\"protected\"\n"
1025 " The shader program chunk.\n"
1028 "</FieldContainer>\n",
1032 /*------------------------------ get -----------------------------------*/
1034 FieldContainerType
&ClusterShadingStageBase::getType(void)
1039 const FieldContainerType
&ClusterShadingStageBase::getType(void) const
1044 UInt32
ClusterShadingStageBase::getContainerSize(void) const
1046 return sizeof(ClusterShadingStage
);
1049 /*------------------------- decorator get ------------------------------*/
1052 SFUInt32
*ClusterShadingStageBase::editSFBlockSize(void)
1054 editSField(BlockSizeFieldMask
);
1056 return &_sfBlockSize
;
1059 const SFUInt32
*ClusterShadingStageBase::getSFBlockSize(void) const
1061 return &_sfBlockSize
;
1065 SFUInt32
*ClusterShadingStageBase::editSFTileSize(void)
1067 editSField(TileSizeFieldMask
);
1069 return &_sfTileSize
;
1072 const SFUInt32
*ClusterShadingStageBase::getSFTileSize(void) const
1074 return &_sfTileSize
;
1078 SFUInt32
*ClusterShadingStageBase::editSFNumClusterZ(void)
1080 editSField(NumClusterZFieldMask
);
1082 return &_sfNumClusterZ
;
1085 const SFUInt32
*ClusterShadingStageBase::getSFNumClusterZ(void) const
1087 return &_sfNumClusterZ
;
1091 SFReal32
*ClusterShadingStageBase::editSFNearPlaneOffset(void)
1093 editSField(NearPlaneOffsetFieldMask
);
1095 return &_sfNearPlaneOffset
;
1098 const SFReal32
*ClusterShadingStageBase::getSFNearPlaneOffset(void) const
1100 return &_sfNearPlaneOffset
;
1104 SFUInt32
*ClusterShadingStageBase::editSFDispatchDataBindingPnt(void)
1106 editSField(DispatchDataBindingPntFieldMask
);
1108 return &_sfDispatchDataBindingPnt
;
1111 const SFUInt32
*ClusterShadingStageBase::getSFDispatchDataBindingPnt(void) const
1113 return &_sfDispatchDataBindingPnt
;
1117 SFUInt32
*ClusterShadingStageBase::editSFClusterDataBindingPnt(void)
1119 editSField(ClusterDataBindingPntFieldMask
);
1121 return &_sfClusterDataBindingPnt
;
1124 const SFUInt32
*ClusterShadingStageBase::getSFClusterDataBindingPnt(void) const
1126 return &_sfClusterDataBindingPnt
;
1130 SFUInt32
*ClusterShadingStageBase::editSFLightBindingPnt(void)
1132 editSField(LightBindingPntFieldMask
);
1134 return &_sfLightBindingPnt
;
1137 const SFUInt32
*ClusterShadingStageBase::getSFLightBindingPnt(void) const
1139 return &_sfLightBindingPnt
;
1143 SFUInt32
*ClusterShadingStageBase::editSFAffectedLightIndexListBindingPnt(void)
1145 editSField(AffectedLightIndexListBindingPntFieldMask
);
1147 return &_sfAffectedLightIndexListBindingPnt
;
1150 const SFUInt32
*ClusterShadingStageBase::getSFAffectedLightIndexListBindingPnt(void) const
1152 return &_sfAffectedLightIndexListBindingPnt
;
1156 SFUInt32
*ClusterShadingStageBase::editSFFrustumBindingPnt(void)
1158 editSField(FrustumBindingPntFieldMask
);
1160 return &_sfFrustumBindingPnt
;
1163 const SFUInt32
*ClusterShadingStageBase::getSFFrustumBindingPnt(void) const
1165 return &_sfFrustumBindingPnt
;
1169 SFUInt32
*ClusterShadingStageBase::editSFLightIndexListBindingPnt(void)
1171 editSField(LightIndexListBindingPntFieldMask
);
1173 return &_sfLightIndexListBindingPnt
;
1176 const SFUInt32
*ClusterShadingStageBase::getSFLightIndexListBindingPnt(void) const
1178 return &_sfLightIndexListBindingPnt
;
1182 SFUInt32
*ClusterShadingStageBase::editSFLightIndexCounterBindingPnt(void)
1184 editSField(LightIndexCounterBindingPntFieldMask
);
1186 return &_sfLightIndexCounterBindingPnt
;
1189 const SFUInt32
*ClusterShadingStageBase::getSFLightIndexCounterBindingPnt(void) const
1191 return &_sfLightIndexCounterBindingPnt
;
1195 SFUInt32
*ClusterShadingStageBase::editSFLightGridBindingPnt(void)
1197 editSField(LightGridBindingPntFieldMask
);
1199 return &_sfLightGridBindingPnt
;
1202 const SFUInt32
*ClusterShadingStageBase::getSFLightGridBindingPnt(void) const
1204 return &_sfLightGridBindingPnt
;
1208 SFString
*ClusterShadingStageBase::editSFAffectedLightIndexListBlockName(void)
1210 editSField(AffectedLightIndexListBlockNameFieldMask
);
1212 return &_sfAffectedLightIndexListBlockName
;
1215 const SFString
*ClusterShadingStageBase::getSFAffectedLightIndexListBlockName(void) const
1217 return &_sfAffectedLightIndexListBlockName
;
1221 SFString
*ClusterShadingStageBase::editSFAffectedLightIndexListVariableName(void)
1223 editSField(AffectedLightIndexListVariableNameFieldMask
);
1225 return &_sfAffectedLightIndexListVariableName
;
1228 const SFString
*ClusterShadingStageBase::getSFAffectedLightIndexListVariableName(void) const
1230 return &_sfAffectedLightIndexListVariableName
;
1234 SFString
*ClusterShadingStageBase::editSFLightIndexListBlockName(void)
1236 editSField(LightIndexListBlockNameFieldMask
);
1238 return &_sfLightIndexListBlockName
;
1241 const SFString
*ClusterShadingStageBase::getSFLightIndexListBlockName(void) const
1243 return &_sfLightIndexListBlockName
;
1247 SFString
*ClusterShadingStageBase::editSFLightIndexListVariableName(void)
1249 editSField(LightIndexListVariableNameFieldMask
);
1251 return &_sfLightIndexListVariableName
;
1254 const SFString
*ClusterShadingStageBase::getSFLightIndexListVariableName(void) const
1256 return &_sfLightIndexListVariableName
;
1260 SFString
*ClusterShadingStageBase::editSFClusteringDataBlockName(void)
1262 editSField(ClusteringDataBlockNameFieldMask
);
1264 return &_sfClusteringDataBlockName
;
1267 const SFString
*ClusterShadingStageBase::getSFClusteringDataBlockName(void) const
1269 return &_sfClusteringDataBlockName
;
1273 SFString
*ClusterShadingStageBase::editSFClusteringDataVariableName(void)
1275 editSField(ClusteringDataVariableNameFieldMask
);
1277 return &_sfClusteringDataVariableName
;
1280 const SFString
*ClusterShadingStageBase::getSFClusteringDataVariableName(void) const
1282 return &_sfClusteringDataVariableName
;
1286 SFString
*ClusterShadingStageBase::editSFLightGridVariableName(void)
1288 editSField(LightGridVariableNameFieldMask
);
1290 return &_sfLightGridVariableName
;
1293 const SFString
*ClusterShadingStageBase::getSFLightGridVariableName(void) const
1295 return &_sfLightGridVariableName
;
1299 SFBool
*ClusterShadingStageBase::editSFCalcFrustumsOnCPU(void)
1301 editSField(CalcFrustumsOnCPUFieldMask
);
1303 return &_sfCalcFrustumsOnCPU
;
1306 const SFBool
*ClusterShadingStageBase::getSFCalcFrustumsOnCPU(void) const
1308 return &_sfCalcFrustumsOnCPU
;
1312 SFBool
*ClusterShadingStageBase::editSFCullLighsOnCPU(void)
1314 editSField(CullLighsOnCPUFieldMask
);
1316 return &_sfCullLighsOnCPU
;
1319 const SFBool
*ClusterShadingStageBase::getSFCullLighsOnCPU(void) const
1321 return &_sfCullLighsOnCPU
;
1325 SFBool
*ClusterShadingStageBase::editSFDisabled(void)
1327 editSField(DisabledFieldMask
);
1329 return &_sfDisabled
;
1332 const SFBool
*ClusterShadingStageBase::getSFDisabled(void) const
1334 return &_sfDisabled
;
1338 SFUInt32
*ClusterShadingStageBase::editSFMaxLightIndexListSize(void)
1340 editSField(MaxLightIndexListSizeFieldMask
);
1342 return &_sfMaxLightIndexListSize
;
1345 const SFUInt32
*ClusterShadingStageBase::getSFMaxLightIndexListSize(void) const
1347 return &_sfMaxLightIndexListSize
;
1351 SFUInt32
*ClusterShadingStageBase::editSFMaxClusterLightCount(void)
1353 editSField(MaxClusterLightCountFieldMask
);
1355 return &_sfMaxClusterLightCount
;
1358 const SFUInt32
*ClusterShadingStageBase::getSFMaxClusterLightCount(void) const
1360 return &_sfMaxClusterLightCount
;
1364 //! Get the ClusterShadingStage::_sfFrustNode field.
1365 const SFUnrecNodePtr
*ClusterShadingStageBase::getSFFrustNode(void) const
1367 return &_sfFrustNode
;
1370 SFUnrecNodePtr
*ClusterShadingStageBase::editSFFrustNode (void)
1372 editSField(FrustNodeFieldMask
);
1374 return &_sfFrustNode
;
1377 //! Get the value of the ClusterShadingStage::_sfFrustNode field.
1378 Node
* ClusterShadingStageBase::getFrustNode(void) const
1380 return _sfFrustNode
.getValue();
1383 //! Set the value of the ClusterShadingStage::_sfFrustNode field.
1384 void ClusterShadingStageBase::setFrustNode(Node
* const value
)
1386 editSField(FrustNodeFieldMask
);
1388 _sfFrustNode
.setValue(value
);
1392 //! Get the ClusterShadingStage::_sfFrustAlgoElement field.
1393 const SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::getSFFrustAlgoElement(void) const
1395 return &_sfFrustAlgoElement
;
1398 SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::editSFFrustAlgoElement(void)
1400 editSField(FrustAlgoElementFieldMask
);
1402 return &_sfFrustAlgoElement
;
1405 //! Get the value of the ClusterShadingStage::_sfFrustAlgoElement field.
1406 AlgorithmComputeElement
* ClusterShadingStageBase::getFrustAlgoElement(void) const
1408 return _sfFrustAlgoElement
.getValue();
1411 //! Set the value of the ClusterShadingStage::_sfFrustAlgoElement field.
1412 void ClusterShadingStageBase::setFrustAlgoElement(AlgorithmComputeElement
* const value
)
1414 editSField(FrustAlgoElementFieldMask
);
1416 _sfFrustAlgoElement
.setValue(value
);
1420 //! Get the ClusterShadingStage::_sfFrustCompShaderAlgo field.
1421 const SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::getSFFrustCompShaderAlgo(void) const
1423 return &_sfFrustCompShaderAlgo
;
1426 SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::editSFFrustCompShaderAlgo(void)
1428 editSField(FrustCompShaderAlgoFieldMask
);
1430 return &_sfFrustCompShaderAlgo
;
1433 //! Get the value of the ClusterShadingStage::_sfFrustCompShaderAlgo field.
1434 ComputeShaderAlgorithm
* ClusterShadingStageBase::getFrustCompShaderAlgo(void) const
1436 return _sfFrustCompShaderAlgo
.getValue();
1439 //! Set the value of the ClusterShadingStage::_sfFrustCompShaderAlgo field.
1440 void ClusterShadingStageBase::setFrustCompShaderAlgo(ComputeShaderAlgorithm
* const value
)
1442 editSField(FrustCompShaderAlgoFieldMask
);
1444 _sfFrustCompShaderAlgo
.setValue(value
);
1448 //! Get the ClusterShadingStage::_sfCullNode field.
1449 const SFUnrecNodePtr
*ClusterShadingStageBase::getSFCullNode(void) const
1451 return &_sfCullNode
;
1454 SFUnrecNodePtr
*ClusterShadingStageBase::editSFCullNode (void)
1456 editSField(CullNodeFieldMask
);
1458 return &_sfCullNode
;
1461 //! Get the value of the ClusterShadingStage::_sfCullNode field.
1462 Node
* ClusterShadingStageBase::getCullNode(void) const
1464 return _sfCullNode
.getValue();
1467 //! Set the value of the ClusterShadingStage::_sfCullNode field.
1468 void ClusterShadingStageBase::setCullNode(Node
* const value
)
1470 editSField(CullNodeFieldMask
);
1472 _sfCullNode
.setValue(value
);
1476 //! Get the ClusterShadingStage::_sfCullAlgoElement field.
1477 const SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::getSFCullAlgoElement(void) const
1479 return &_sfCullAlgoElement
;
1482 SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::editSFCullAlgoElement(void)
1484 editSField(CullAlgoElementFieldMask
);
1486 return &_sfCullAlgoElement
;
1489 //! Get the value of the ClusterShadingStage::_sfCullAlgoElement field.
1490 AlgorithmComputeElement
* ClusterShadingStageBase::getCullAlgoElement(void) const
1492 return _sfCullAlgoElement
.getValue();
1495 //! Set the value of the ClusterShadingStage::_sfCullAlgoElement field.
1496 void ClusterShadingStageBase::setCullAlgoElement(AlgorithmComputeElement
* const value
)
1498 editSField(CullAlgoElementFieldMask
);
1500 _sfCullAlgoElement
.setValue(value
);
1504 //! Get the ClusterShadingStage::_sfCullCompShaderAlgo field.
1505 const SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::getSFCullCompShaderAlgo(void) const
1507 return &_sfCullCompShaderAlgo
;
1510 SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::editSFCullCompShaderAlgo(void)
1512 editSField(CullCompShaderAlgoFieldMask
);
1514 return &_sfCullCompShaderAlgo
;
1517 //! Get the value of the ClusterShadingStage::_sfCullCompShaderAlgo field.
1518 ComputeShaderAlgorithm
* ClusterShadingStageBase::getCullCompShaderAlgo(void) const
1520 return _sfCullCompShaderAlgo
.getValue();
1523 //! Set the value of the ClusterShadingStage::_sfCullCompShaderAlgo field.
1524 void ClusterShadingStageBase::setCullCompShaderAlgo(ComputeShaderAlgorithm
* const value
)
1526 editSField(CullCompShaderAlgoFieldMask
);
1528 _sfCullCompShaderAlgo
.setValue(value
);
1532 //! Get the ClusterShadingStage::_sfMultiLightChunk field.
1533 const SFUnrecMultiLightChunkPtr
*ClusterShadingStageBase::getSFMultiLightChunk(void) const
1535 return &_sfMultiLightChunk
;
1538 SFUnrecMultiLightChunkPtr
*ClusterShadingStageBase::editSFMultiLightChunk(void)
1540 editSField(MultiLightChunkFieldMask
);
1542 return &_sfMultiLightChunk
;
1545 //! Get the value of the ClusterShadingStage::_sfMultiLightChunk field.
1546 MultiLightChunk
* ClusterShadingStageBase::getMultiLightChunk(void) const
1548 return _sfMultiLightChunk
.getValue();
1551 //! Set the value of the ClusterShadingStage::_sfMultiLightChunk field.
1552 void ClusterShadingStageBase::setMultiLightChunk(MultiLightChunk
* const value
)
1554 editSField(MultiLightChunkFieldMask
);
1556 _sfMultiLightChunk
.setValue(value
);
1560 //! Get the ClusterShadingStage::_sfShaderProgChunk field.
1561 const SFUnrecShaderProgramChunkPtr
*ClusterShadingStageBase::getSFShaderProgChunk(void) const
1563 return &_sfShaderProgChunk
;
1566 SFUnrecShaderProgramChunkPtr
*ClusterShadingStageBase::editSFShaderProgChunk(void)
1568 editSField(ShaderProgChunkFieldMask
);
1570 return &_sfShaderProgChunk
;
1573 //! Get the value of the ClusterShadingStage::_sfShaderProgChunk field.
1574 ShaderProgramChunk
* ClusterShadingStageBase::getShaderProgChunk(void) const
1576 return _sfShaderProgChunk
.getValue();
1579 //! Set the value of the ClusterShadingStage::_sfShaderProgChunk field.
1580 void ClusterShadingStageBase::setShaderProgChunk(ShaderProgramChunk
* const value
)
1582 editSField(ShaderProgChunkFieldMask
);
1584 _sfShaderProgChunk
.setValue(value
);
1592 /*------------------------------ access -----------------------------------*/
1594 SizeT
ClusterShadingStageBase::getBinSize(ConstFieldMaskArg whichField
)
1596 SizeT returnValue
= Inherited::getBinSize(whichField
);
1598 if(FieldBits::NoField
!= (BlockSizeFieldMask
& whichField
))
1600 returnValue
+= _sfBlockSize
.getBinSize();
1602 if(FieldBits::NoField
!= (TileSizeFieldMask
& whichField
))
1604 returnValue
+= _sfTileSize
.getBinSize();
1606 if(FieldBits::NoField
!= (NumClusterZFieldMask
& whichField
))
1608 returnValue
+= _sfNumClusterZ
.getBinSize();
1610 if(FieldBits::NoField
!= (NearPlaneOffsetFieldMask
& whichField
))
1612 returnValue
+= _sfNearPlaneOffset
.getBinSize();
1614 if(FieldBits::NoField
!= (DispatchDataBindingPntFieldMask
& whichField
))
1616 returnValue
+= _sfDispatchDataBindingPnt
.getBinSize();
1618 if(FieldBits::NoField
!= (ClusterDataBindingPntFieldMask
& whichField
))
1620 returnValue
+= _sfClusterDataBindingPnt
.getBinSize();
1622 if(FieldBits::NoField
!= (LightBindingPntFieldMask
& whichField
))
1624 returnValue
+= _sfLightBindingPnt
.getBinSize();
1626 if(FieldBits::NoField
!= (AffectedLightIndexListBindingPntFieldMask
& whichField
))
1628 returnValue
+= _sfAffectedLightIndexListBindingPnt
.getBinSize();
1630 if(FieldBits::NoField
!= (FrustumBindingPntFieldMask
& whichField
))
1632 returnValue
+= _sfFrustumBindingPnt
.getBinSize();
1634 if(FieldBits::NoField
!= (LightIndexListBindingPntFieldMask
& whichField
))
1636 returnValue
+= _sfLightIndexListBindingPnt
.getBinSize();
1638 if(FieldBits::NoField
!= (LightIndexCounterBindingPntFieldMask
& whichField
))
1640 returnValue
+= _sfLightIndexCounterBindingPnt
.getBinSize();
1642 if(FieldBits::NoField
!= (LightGridBindingPntFieldMask
& whichField
))
1644 returnValue
+= _sfLightGridBindingPnt
.getBinSize();
1646 if(FieldBits::NoField
!= (AffectedLightIndexListBlockNameFieldMask
& whichField
))
1648 returnValue
+= _sfAffectedLightIndexListBlockName
.getBinSize();
1650 if(FieldBits::NoField
!= (AffectedLightIndexListVariableNameFieldMask
& whichField
))
1652 returnValue
+= _sfAffectedLightIndexListVariableName
.getBinSize();
1654 if(FieldBits::NoField
!= (LightIndexListBlockNameFieldMask
& whichField
))
1656 returnValue
+= _sfLightIndexListBlockName
.getBinSize();
1658 if(FieldBits::NoField
!= (LightIndexListVariableNameFieldMask
& whichField
))
1660 returnValue
+= _sfLightIndexListVariableName
.getBinSize();
1662 if(FieldBits::NoField
!= (ClusteringDataBlockNameFieldMask
& whichField
))
1664 returnValue
+= _sfClusteringDataBlockName
.getBinSize();
1666 if(FieldBits::NoField
!= (ClusteringDataVariableNameFieldMask
& whichField
))
1668 returnValue
+= _sfClusteringDataVariableName
.getBinSize();
1670 if(FieldBits::NoField
!= (LightGridVariableNameFieldMask
& whichField
))
1672 returnValue
+= _sfLightGridVariableName
.getBinSize();
1674 if(FieldBits::NoField
!= (CalcFrustumsOnCPUFieldMask
& whichField
))
1676 returnValue
+= _sfCalcFrustumsOnCPU
.getBinSize();
1678 if(FieldBits::NoField
!= (CullLighsOnCPUFieldMask
& whichField
))
1680 returnValue
+= _sfCullLighsOnCPU
.getBinSize();
1682 if(FieldBits::NoField
!= (DisabledFieldMask
& whichField
))
1684 returnValue
+= _sfDisabled
.getBinSize();
1686 if(FieldBits::NoField
!= (MaxLightIndexListSizeFieldMask
& whichField
))
1688 returnValue
+= _sfMaxLightIndexListSize
.getBinSize();
1690 if(FieldBits::NoField
!= (MaxClusterLightCountFieldMask
& whichField
))
1692 returnValue
+= _sfMaxClusterLightCount
.getBinSize();
1694 if(FieldBits::NoField
!= (FrustNodeFieldMask
& whichField
))
1696 returnValue
+= _sfFrustNode
.getBinSize();
1698 if(FieldBits::NoField
!= (FrustAlgoElementFieldMask
& whichField
))
1700 returnValue
+= _sfFrustAlgoElement
.getBinSize();
1702 if(FieldBits::NoField
!= (FrustCompShaderAlgoFieldMask
& whichField
))
1704 returnValue
+= _sfFrustCompShaderAlgo
.getBinSize();
1706 if(FieldBits::NoField
!= (CullNodeFieldMask
& whichField
))
1708 returnValue
+= _sfCullNode
.getBinSize();
1710 if(FieldBits::NoField
!= (CullAlgoElementFieldMask
& whichField
))
1712 returnValue
+= _sfCullAlgoElement
.getBinSize();
1714 if(FieldBits::NoField
!= (CullCompShaderAlgoFieldMask
& whichField
))
1716 returnValue
+= _sfCullCompShaderAlgo
.getBinSize();
1718 if(FieldBits::NoField
!= (MultiLightChunkFieldMask
& whichField
))
1720 returnValue
+= _sfMultiLightChunk
.getBinSize();
1722 if(FieldBits::NoField
!= (ShaderProgChunkFieldMask
& whichField
))
1724 returnValue
+= _sfShaderProgChunk
.getBinSize();
1730 void ClusterShadingStageBase::copyToBin(BinaryDataHandler
&pMem
,
1731 ConstFieldMaskArg whichField
)
1733 Inherited::copyToBin(pMem
, whichField
);
1735 if(FieldBits::NoField
!= (BlockSizeFieldMask
& whichField
))
1737 _sfBlockSize
.copyToBin(pMem
);
1739 if(FieldBits::NoField
!= (TileSizeFieldMask
& whichField
))
1741 _sfTileSize
.copyToBin(pMem
);
1743 if(FieldBits::NoField
!= (NumClusterZFieldMask
& whichField
))
1745 _sfNumClusterZ
.copyToBin(pMem
);
1747 if(FieldBits::NoField
!= (NearPlaneOffsetFieldMask
& whichField
))
1749 _sfNearPlaneOffset
.copyToBin(pMem
);
1751 if(FieldBits::NoField
!= (DispatchDataBindingPntFieldMask
& whichField
))
1753 _sfDispatchDataBindingPnt
.copyToBin(pMem
);
1755 if(FieldBits::NoField
!= (ClusterDataBindingPntFieldMask
& whichField
))
1757 _sfClusterDataBindingPnt
.copyToBin(pMem
);
1759 if(FieldBits::NoField
!= (LightBindingPntFieldMask
& whichField
))
1761 _sfLightBindingPnt
.copyToBin(pMem
);
1763 if(FieldBits::NoField
!= (AffectedLightIndexListBindingPntFieldMask
& whichField
))
1765 _sfAffectedLightIndexListBindingPnt
.copyToBin(pMem
);
1767 if(FieldBits::NoField
!= (FrustumBindingPntFieldMask
& whichField
))
1769 _sfFrustumBindingPnt
.copyToBin(pMem
);
1771 if(FieldBits::NoField
!= (LightIndexListBindingPntFieldMask
& whichField
))
1773 _sfLightIndexListBindingPnt
.copyToBin(pMem
);
1775 if(FieldBits::NoField
!= (LightIndexCounterBindingPntFieldMask
& whichField
))
1777 _sfLightIndexCounterBindingPnt
.copyToBin(pMem
);
1779 if(FieldBits::NoField
!= (LightGridBindingPntFieldMask
& whichField
))
1781 _sfLightGridBindingPnt
.copyToBin(pMem
);
1783 if(FieldBits::NoField
!= (AffectedLightIndexListBlockNameFieldMask
& whichField
))
1785 _sfAffectedLightIndexListBlockName
.copyToBin(pMem
);
1787 if(FieldBits::NoField
!= (AffectedLightIndexListVariableNameFieldMask
& whichField
))
1789 _sfAffectedLightIndexListVariableName
.copyToBin(pMem
);
1791 if(FieldBits::NoField
!= (LightIndexListBlockNameFieldMask
& whichField
))
1793 _sfLightIndexListBlockName
.copyToBin(pMem
);
1795 if(FieldBits::NoField
!= (LightIndexListVariableNameFieldMask
& whichField
))
1797 _sfLightIndexListVariableName
.copyToBin(pMem
);
1799 if(FieldBits::NoField
!= (ClusteringDataBlockNameFieldMask
& whichField
))
1801 _sfClusteringDataBlockName
.copyToBin(pMem
);
1803 if(FieldBits::NoField
!= (ClusteringDataVariableNameFieldMask
& whichField
))
1805 _sfClusteringDataVariableName
.copyToBin(pMem
);
1807 if(FieldBits::NoField
!= (LightGridVariableNameFieldMask
& whichField
))
1809 _sfLightGridVariableName
.copyToBin(pMem
);
1811 if(FieldBits::NoField
!= (CalcFrustumsOnCPUFieldMask
& whichField
))
1813 _sfCalcFrustumsOnCPU
.copyToBin(pMem
);
1815 if(FieldBits::NoField
!= (CullLighsOnCPUFieldMask
& whichField
))
1817 _sfCullLighsOnCPU
.copyToBin(pMem
);
1819 if(FieldBits::NoField
!= (DisabledFieldMask
& whichField
))
1821 _sfDisabled
.copyToBin(pMem
);
1823 if(FieldBits::NoField
!= (MaxLightIndexListSizeFieldMask
& whichField
))
1825 _sfMaxLightIndexListSize
.copyToBin(pMem
);
1827 if(FieldBits::NoField
!= (MaxClusterLightCountFieldMask
& whichField
))
1829 _sfMaxClusterLightCount
.copyToBin(pMem
);
1831 if(FieldBits::NoField
!= (FrustNodeFieldMask
& whichField
))
1833 _sfFrustNode
.copyToBin(pMem
);
1835 if(FieldBits::NoField
!= (FrustAlgoElementFieldMask
& whichField
))
1837 _sfFrustAlgoElement
.copyToBin(pMem
);
1839 if(FieldBits::NoField
!= (FrustCompShaderAlgoFieldMask
& whichField
))
1841 _sfFrustCompShaderAlgo
.copyToBin(pMem
);
1843 if(FieldBits::NoField
!= (CullNodeFieldMask
& whichField
))
1845 _sfCullNode
.copyToBin(pMem
);
1847 if(FieldBits::NoField
!= (CullAlgoElementFieldMask
& whichField
))
1849 _sfCullAlgoElement
.copyToBin(pMem
);
1851 if(FieldBits::NoField
!= (CullCompShaderAlgoFieldMask
& whichField
))
1853 _sfCullCompShaderAlgo
.copyToBin(pMem
);
1855 if(FieldBits::NoField
!= (MultiLightChunkFieldMask
& whichField
))
1857 _sfMultiLightChunk
.copyToBin(pMem
);
1859 if(FieldBits::NoField
!= (ShaderProgChunkFieldMask
& whichField
))
1861 _sfShaderProgChunk
.copyToBin(pMem
);
1865 void ClusterShadingStageBase::copyFromBin(BinaryDataHandler
&pMem
,
1866 ConstFieldMaskArg whichField
)
1868 Inherited::copyFromBin(pMem
, whichField
);
1870 if(FieldBits::NoField
!= (BlockSizeFieldMask
& whichField
))
1872 editSField(BlockSizeFieldMask
);
1873 _sfBlockSize
.copyFromBin(pMem
);
1875 if(FieldBits::NoField
!= (TileSizeFieldMask
& whichField
))
1877 editSField(TileSizeFieldMask
);
1878 _sfTileSize
.copyFromBin(pMem
);
1880 if(FieldBits::NoField
!= (NumClusterZFieldMask
& whichField
))
1882 editSField(NumClusterZFieldMask
);
1883 _sfNumClusterZ
.copyFromBin(pMem
);
1885 if(FieldBits::NoField
!= (NearPlaneOffsetFieldMask
& whichField
))
1887 editSField(NearPlaneOffsetFieldMask
);
1888 _sfNearPlaneOffset
.copyFromBin(pMem
);
1890 if(FieldBits::NoField
!= (DispatchDataBindingPntFieldMask
& whichField
))
1892 editSField(DispatchDataBindingPntFieldMask
);
1893 _sfDispatchDataBindingPnt
.copyFromBin(pMem
);
1895 if(FieldBits::NoField
!= (ClusterDataBindingPntFieldMask
& whichField
))
1897 editSField(ClusterDataBindingPntFieldMask
);
1898 _sfClusterDataBindingPnt
.copyFromBin(pMem
);
1900 if(FieldBits::NoField
!= (LightBindingPntFieldMask
& whichField
))
1902 editSField(LightBindingPntFieldMask
);
1903 _sfLightBindingPnt
.copyFromBin(pMem
);
1905 if(FieldBits::NoField
!= (AffectedLightIndexListBindingPntFieldMask
& whichField
))
1907 editSField(AffectedLightIndexListBindingPntFieldMask
);
1908 _sfAffectedLightIndexListBindingPnt
.copyFromBin(pMem
);
1910 if(FieldBits::NoField
!= (FrustumBindingPntFieldMask
& whichField
))
1912 editSField(FrustumBindingPntFieldMask
);
1913 _sfFrustumBindingPnt
.copyFromBin(pMem
);
1915 if(FieldBits::NoField
!= (LightIndexListBindingPntFieldMask
& whichField
))
1917 editSField(LightIndexListBindingPntFieldMask
);
1918 _sfLightIndexListBindingPnt
.copyFromBin(pMem
);
1920 if(FieldBits::NoField
!= (LightIndexCounterBindingPntFieldMask
& whichField
))
1922 editSField(LightIndexCounterBindingPntFieldMask
);
1923 _sfLightIndexCounterBindingPnt
.copyFromBin(pMem
);
1925 if(FieldBits::NoField
!= (LightGridBindingPntFieldMask
& whichField
))
1927 editSField(LightGridBindingPntFieldMask
);
1928 _sfLightGridBindingPnt
.copyFromBin(pMem
);
1930 if(FieldBits::NoField
!= (AffectedLightIndexListBlockNameFieldMask
& whichField
))
1932 editSField(AffectedLightIndexListBlockNameFieldMask
);
1933 _sfAffectedLightIndexListBlockName
.copyFromBin(pMem
);
1935 if(FieldBits::NoField
!= (AffectedLightIndexListVariableNameFieldMask
& whichField
))
1937 editSField(AffectedLightIndexListVariableNameFieldMask
);
1938 _sfAffectedLightIndexListVariableName
.copyFromBin(pMem
);
1940 if(FieldBits::NoField
!= (LightIndexListBlockNameFieldMask
& whichField
))
1942 editSField(LightIndexListBlockNameFieldMask
);
1943 _sfLightIndexListBlockName
.copyFromBin(pMem
);
1945 if(FieldBits::NoField
!= (LightIndexListVariableNameFieldMask
& whichField
))
1947 editSField(LightIndexListVariableNameFieldMask
);
1948 _sfLightIndexListVariableName
.copyFromBin(pMem
);
1950 if(FieldBits::NoField
!= (ClusteringDataBlockNameFieldMask
& whichField
))
1952 editSField(ClusteringDataBlockNameFieldMask
);
1953 _sfClusteringDataBlockName
.copyFromBin(pMem
);
1955 if(FieldBits::NoField
!= (ClusteringDataVariableNameFieldMask
& whichField
))
1957 editSField(ClusteringDataVariableNameFieldMask
);
1958 _sfClusteringDataVariableName
.copyFromBin(pMem
);
1960 if(FieldBits::NoField
!= (LightGridVariableNameFieldMask
& whichField
))
1962 editSField(LightGridVariableNameFieldMask
);
1963 _sfLightGridVariableName
.copyFromBin(pMem
);
1965 if(FieldBits::NoField
!= (CalcFrustumsOnCPUFieldMask
& whichField
))
1967 editSField(CalcFrustumsOnCPUFieldMask
);
1968 _sfCalcFrustumsOnCPU
.copyFromBin(pMem
);
1970 if(FieldBits::NoField
!= (CullLighsOnCPUFieldMask
& whichField
))
1972 editSField(CullLighsOnCPUFieldMask
);
1973 _sfCullLighsOnCPU
.copyFromBin(pMem
);
1975 if(FieldBits::NoField
!= (DisabledFieldMask
& whichField
))
1977 editSField(DisabledFieldMask
);
1978 _sfDisabled
.copyFromBin(pMem
);
1980 if(FieldBits::NoField
!= (MaxLightIndexListSizeFieldMask
& whichField
))
1982 editSField(MaxLightIndexListSizeFieldMask
);
1983 _sfMaxLightIndexListSize
.copyFromBin(pMem
);
1985 if(FieldBits::NoField
!= (MaxClusterLightCountFieldMask
& whichField
))
1987 editSField(MaxClusterLightCountFieldMask
);
1988 _sfMaxClusterLightCount
.copyFromBin(pMem
);
1990 if(FieldBits::NoField
!= (FrustNodeFieldMask
& whichField
))
1992 editSField(FrustNodeFieldMask
);
1993 _sfFrustNode
.copyFromBin(pMem
);
1995 if(FieldBits::NoField
!= (FrustAlgoElementFieldMask
& whichField
))
1997 editSField(FrustAlgoElementFieldMask
);
1998 _sfFrustAlgoElement
.copyFromBin(pMem
);
2000 if(FieldBits::NoField
!= (FrustCompShaderAlgoFieldMask
& whichField
))
2002 editSField(FrustCompShaderAlgoFieldMask
);
2003 _sfFrustCompShaderAlgo
.copyFromBin(pMem
);
2005 if(FieldBits::NoField
!= (CullNodeFieldMask
& whichField
))
2007 editSField(CullNodeFieldMask
);
2008 _sfCullNode
.copyFromBin(pMem
);
2010 if(FieldBits::NoField
!= (CullAlgoElementFieldMask
& whichField
))
2012 editSField(CullAlgoElementFieldMask
);
2013 _sfCullAlgoElement
.copyFromBin(pMem
);
2015 if(FieldBits::NoField
!= (CullCompShaderAlgoFieldMask
& whichField
))
2017 editSField(CullCompShaderAlgoFieldMask
);
2018 _sfCullCompShaderAlgo
.copyFromBin(pMem
);
2020 if(FieldBits::NoField
!= (MultiLightChunkFieldMask
& whichField
))
2022 editSField(MultiLightChunkFieldMask
);
2023 _sfMultiLightChunk
.copyFromBin(pMem
);
2025 if(FieldBits::NoField
!= (ShaderProgChunkFieldMask
& whichField
))
2027 editSField(ShaderProgChunkFieldMask
);
2028 _sfShaderProgChunk
.copyFromBin(pMem
);
2032 //! create a new instance of the class
2033 ClusterShadingStageTransitPtr
ClusterShadingStageBase::createLocal(BitVector bFlags
)
2035 ClusterShadingStageTransitPtr fc
;
2037 if(getClassType().getPrototype() != NULL
)
2039 FieldContainerTransitPtr tmpPtr
=
2040 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
2042 fc
= dynamic_pointer_cast
<ClusterShadingStage
>(tmpPtr
);
2048 //! create a new instance of the class, copy the container flags
2049 ClusterShadingStageTransitPtr
ClusterShadingStageBase::createDependent(BitVector bFlags
)
2051 ClusterShadingStageTransitPtr fc
;
2053 if(getClassType().getPrototype() != NULL
)
2055 FieldContainerTransitPtr tmpPtr
=
2056 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
2058 fc
= dynamic_pointer_cast
<ClusterShadingStage
>(tmpPtr
);
2064 //! create a new instance of the class
2065 ClusterShadingStageTransitPtr
ClusterShadingStageBase::create(void)
2067 ClusterShadingStageTransitPtr fc
;
2069 if(getClassType().getPrototype() != NULL
)
2071 FieldContainerTransitPtr tmpPtr
=
2072 getClassType().getPrototype()-> shallowCopy();
2074 fc
= dynamic_pointer_cast
<ClusterShadingStage
>(tmpPtr
);
2080 ClusterShadingStage
*ClusterShadingStageBase::createEmptyLocal(BitVector bFlags
)
2082 ClusterShadingStage
*returnValue
;
2084 newPtr
<ClusterShadingStage
>(returnValue
, bFlags
);
2086 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
2091 //! create an empty new instance of the class, do not copy the prototype
2092 ClusterShadingStage
*ClusterShadingStageBase::createEmpty(void)
2094 ClusterShadingStage
*returnValue
;
2096 newPtr
<ClusterShadingStage
>(returnValue
, Thread::getCurrentLocalFlags());
2098 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
2099 ~Thread::getCurrentLocalFlags();
2105 FieldContainerTransitPtr
ClusterShadingStageBase::shallowCopyLocal(
2106 BitVector bFlags
) const
2108 ClusterShadingStage
*tmpPtr
;
2110 newPtr(tmpPtr
, dynamic_cast<const ClusterShadingStage
*>(this), bFlags
);
2112 FieldContainerTransitPtr
returnValue(tmpPtr
);
2114 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
2119 FieldContainerTransitPtr
ClusterShadingStageBase::shallowCopyDependent(
2120 BitVector bFlags
) const
2122 ClusterShadingStage
*tmpPtr
;
2124 newPtr(tmpPtr
, dynamic_cast<const ClusterShadingStage
*>(this), ~bFlags
);
2126 FieldContainerTransitPtr
returnValue(tmpPtr
);
2128 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
2133 FieldContainerTransitPtr
ClusterShadingStageBase::shallowCopy(void) const
2135 ClusterShadingStage
*tmpPtr
;
2138 dynamic_cast<const ClusterShadingStage
*>(this),
2139 Thread::getCurrentLocalFlags());
2141 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
2143 FieldContainerTransitPtr
returnValue(tmpPtr
);
2151 /*------------------------- constructors ----------------------------------*/
2153 ClusterShadingStageBase::ClusterShadingStageBase(void) :
2155 _sfBlockSize (UInt32(16)),
2156 _sfTileSize (UInt32(64)),
2157 _sfNumClusterZ (UInt32(32)),
2158 _sfNearPlaneOffset (Real32(5.f
)),
2159 _sfDispatchDataBindingPnt (UInt32(1)),
2160 _sfClusterDataBindingPnt (UInt32(2)),
2161 _sfLightBindingPnt (UInt32(1)),
2162 _sfAffectedLightIndexListBindingPnt(UInt32(2)),
2163 _sfFrustumBindingPnt (UInt32(3)),
2164 _sfLightIndexListBindingPnt(UInt32(4)),
2165 _sfLightIndexCounterBindingPnt(UInt32(5)),
2166 _sfLightGridBindingPnt (UInt32(0)),
2167 _sfAffectedLightIndexListBlockName(std::string("AffectedLightIndexList")),
2168 _sfAffectedLightIndexListVariableName(std::string("affectedLightIndexList")),
2169 _sfLightIndexListBlockName(std::string("LightIndexList")),
2170 _sfLightIndexListVariableName(std::string("lightIndexList")),
2171 _sfClusteringDataBlockName(std::string("ClusteringData")),
2172 _sfClusteringDataVariableName(std::string("clusteringData")),
2173 _sfLightGridVariableName (std::string("light_grid")),
2174 _sfCalcFrustumsOnCPU (bool(false)),
2175 _sfCullLighsOnCPU (bool(false)),
2176 _sfDisabled (bool(false)),
2177 _sfMaxLightIndexListSize (UInt32(2097152)),
2178 _sfMaxClusterLightCount (UInt32(1024)),
2179 _sfFrustNode (NULL
),
2180 _sfFrustAlgoElement (NULL
),
2181 _sfFrustCompShaderAlgo (NULL
),
2183 _sfCullAlgoElement (NULL
),
2184 _sfCullCompShaderAlgo (NULL
),
2185 _sfMultiLightChunk (NULL
),
2186 _sfShaderProgChunk (NULL
)
2190 ClusterShadingStageBase::ClusterShadingStageBase(const ClusterShadingStageBase
&source
) :
2192 _sfBlockSize (source
._sfBlockSize
),
2193 _sfTileSize (source
._sfTileSize
),
2194 _sfNumClusterZ (source
._sfNumClusterZ
),
2195 _sfNearPlaneOffset (source
._sfNearPlaneOffset
),
2196 _sfDispatchDataBindingPnt (source
._sfDispatchDataBindingPnt
),
2197 _sfClusterDataBindingPnt (source
._sfClusterDataBindingPnt
),
2198 _sfLightBindingPnt (source
._sfLightBindingPnt
),
2199 _sfAffectedLightIndexListBindingPnt(source
._sfAffectedLightIndexListBindingPnt
),
2200 _sfFrustumBindingPnt (source
._sfFrustumBindingPnt
),
2201 _sfLightIndexListBindingPnt(source
._sfLightIndexListBindingPnt
),
2202 _sfLightIndexCounterBindingPnt(source
._sfLightIndexCounterBindingPnt
),
2203 _sfLightGridBindingPnt (source
._sfLightGridBindingPnt
),
2204 _sfAffectedLightIndexListBlockName(source
._sfAffectedLightIndexListBlockName
),
2205 _sfAffectedLightIndexListVariableName(source
._sfAffectedLightIndexListVariableName
),
2206 _sfLightIndexListBlockName(source
._sfLightIndexListBlockName
),
2207 _sfLightIndexListVariableName(source
._sfLightIndexListVariableName
),
2208 _sfClusteringDataBlockName(source
._sfClusteringDataBlockName
),
2209 _sfClusteringDataVariableName(source
._sfClusteringDataVariableName
),
2210 _sfLightGridVariableName (source
._sfLightGridVariableName
),
2211 _sfCalcFrustumsOnCPU (source
._sfCalcFrustumsOnCPU
),
2212 _sfCullLighsOnCPU (source
._sfCullLighsOnCPU
),
2213 _sfDisabled (source
._sfDisabled
),
2214 _sfMaxLightIndexListSize (source
._sfMaxLightIndexListSize
),
2215 _sfMaxClusterLightCount (source
._sfMaxClusterLightCount
),
2216 _sfFrustNode (NULL
),
2217 _sfFrustAlgoElement (NULL
),
2218 _sfFrustCompShaderAlgo (NULL
),
2220 _sfCullAlgoElement (NULL
),
2221 _sfCullCompShaderAlgo (NULL
),
2222 _sfMultiLightChunk (NULL
),
2223 _sfShaderProgChunk (NULL
)
2228 /*-------------------------- destructors ----------------------------------*/
2230 ClusterShadingStageBase::~ClusterShadingStageBase(void)
2234 void ClusterShadingStageBase::onCreate(const ClusterShadingStage
*source
)
2236 Inherited::onCreate(source
);
2240 ClusterShadingStage
*pThis
= static_cast<ClusterShadingStage
*>(this);
2242 pThis
->setFrustNode(source
->getFrustNode());
2244 pThis
->setFrustAlgoElement(source
->getFrustAlgoElement());
2246 pThis
->setFrustCompShaderAlgo(source
->getFrustCompShaderAlgo());
2248 pThis
->setCullNode(source
->getCullNode());
2250 pThis
->setCullAlgoElement(source
->getCullAlgoElement());
2252 pThis
->setCullCompShaderAlgo(source
->getCullCompShaderAlgo());
2254 pThis
->setMultiLightChunk(source
->getMultiLightChunk());
2256 pThis
->setShaderProgChunk(source
->getShaderProgChunk());
2260 GetFieldHandlePtr
ClusterShadingStageBase::getHandleBlockSize (void) const
2262 SFUInt32::GetHandlePtr
returnValue(
2263 new SFUInt32::GetHandle(
2265 this->getType().getFieldDesc(BlockSizeFieldId
),
2266 const_cast<ClusterShadingStageBase
*>(this)));
2271 EditFieldHandlePtr
ClusterShadingStageBase::editHandleBlockSize (void)
2273 SFUInt32::EditHandlePtr
returnValue(
2274 new SFUInt32::EditHandle(
2276 this->getType().getFieldDesc(BlockSizeFieldId
),
2280 editSField(BlockSizeFieldMask
);
2285 GetFieldHandlePtr
ClusterShadingStageBase::getHandleTileSize (void) const
2287 SFUInt32::GetHandlePtr
returnValue(
2288 new SFUInt32::GetHandle(
2290 this->getType().getFieldDesc(TileSizeFieldId
),
2291 const_cast<ClusterShadingStageBase
*>(this)));
2296 EditFieldHandlePtr
ClusterShadingStageBase::editHandleTileSize (void)
2298 SFUInt32::EditHandlePtr
returnValue(
2299 new SFUInt32::EditHandle(
2301 this->getType().getFieldDesc(TileSizeFieldId
),
2305 editSField(TileSizeFieldMask
);
2310 GetFieldHandlePtr
ClusterShadingStageBase::getHandleNumClusterZ (void) const
2312 SFUInt32::GetHandlePtr
returnValue(
2313 new SFUInt32::GetHandle(
2315 this->getType().getFieldDesc(NumClusterZFieldId
),
2316 const_cast<ClusterShadingStageBase
*>(this)));
2321 EditFieldHandlePtr
ClusterShadingStageBase::editHandleNumClusterZ (void)
2323 SFUInt32::EditHandlePtr
returnValue(
2324 new SFUInt32::EditHandle(
2326 this->getType().getFieldDesc(NumClusterZFieldId
),
2330 editSField(NumClusterZFieldMask
);
2335 GetFieldHandlePtr
ClusterShadingStageBase::getHandleNearPlaneOffset (void) const
2337 SFReal32::GetHandlePtr
returnValue(
2338 new SFReal32::GetHandle(
2339 &_sfNearPlaneOffset
,
2340 this->getType().getFieldDesc(NearPlaneOffsetFieldId
),
2341 const_cast<ClusterShadingStageBase
*>(this)));
2346 EditFieldHandlePtr
ClusterShadingStageBase::editHandleNearPlaneOffset(void)
2348 SFReal32::EditHandlePtr
returnValue(
2349 new SFReal32::EditHandle(
2350 &_sfNearPlaneOffset
,
2351 this->getType().getFieldDesc(NearPlaneOffsetFieldId
),
2355 editSField(NearPlaneOffsetFieldMask
);
2360 GetFieldHandlePtr
ClusterShadingStageBase::getHandleDispatchDataBindingPnt (void) const
2362 SFUInt32::GetHandlePtr
returnValue(
2363 new SFUInt32::GetHandle(
2364 &_sfDispatchDataBindingPnt
,
2365 this->getType().getFieldDesc(DispatchDataBindingPntFieldId
),
2366 const_cast<ClusterShadingStageBase
*>(this)));
2371 EditFieldHandlePtr
ClusterShadingStageBase::editHandleDispatchDataBindingPnt(void)
2373 SFUInt32::EditHandlePtr
returnValue(
2374 new SFUInt32::EditHandle(
2375 &_sfDispatchDataBindingPnt
,
2376 this->getType().getFieldDesc(DispatchDataBindingPntFieldId
),
2380 editSField(DispatchDataBindingPntFieldMask
);
2385 GetFieldHandlePtr
ClusterShadingStageBase::getHandleClusterDataBindingPnt (void) const
2387 SFUInt32::GetHandlePtr
returnValue(
2388 new SFUInt32::GetHandle(
2389 &_sfClusterDataBindingPnt
,
2390 this->getType().getFieldDesc(ClusterDataBindingPntFieldId
),
2391 const_cast<ClusterShadingStageBase
*>(this)));
2396 EditFieldHandlePtr
ClusterShadingStageBase::editHandleClusterDataBindingPnt(void)
2398 SFUInt32::EditHandlePtr
returnValue(
2399 new SFUInt32::EditHandle(
2400 &_sfClusterDataBindingPnt
,
2401 this->getType().getFieldDesc(ClusterDataBindingPntFieldId
),
2405 editSField(ClusterDataBindingPntFieldMask
);
2410 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightBindingPnt (void) const
2412 SFUInt32::GetHandlePtr
returnValue(
2413 new SFUInt32::GetHandle(
2414 &_sfLightBindingPnt
,
2415 this->getType().getFieldDesc(LightBindingPntFieldId
),
2416 const_cast<ClusterShadingStageBase
*>(this)));
2421 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightBindingPnt(void)
2423 SFUInt32::EditHandlePtr
returnValue(
2424 new SFUInt32::EditHandle(
2425 &_sfLightBindingPnt
,
2426 this->getType().getFieldDesc(LightBindingPntFieldId
),
2430 editSField(LightBindingPntFieldMask
);
2435 GetFieldHandlePtr
ClusterShadingStageBase::getHandleAffectedLightIndexListBindingPnt (void) const
2437 SFUInt32::GetHandlePtr
returnValue(
2438 new SFUInt32::GetHandle(
2439 &_sfAffectedLightIndexListBindingPnt
,
2440 this->getType().getFieldDesc(AffectedLightIndexListBindingPntFieldId
),
2441 const_cast<ClusterShadingStageBase
*>(this)));
2446 EditFieldHandlePtr
ClusterShadingStageBase::editHandleAffectedLightIndexListBindingPnt(void)
2448 SFUInt32::EditHandlePtr
returnValue(
2449 new SFUInt32::EditHandle(
2450 &_sfAffectedLightIndexListBindingPnt
,
2451 this->getType().getFieldDesc(AffectedLightIndexListBindingPntFieldId
),
2455 editSField(AffectedLightIndexListBindingPntFieldMask
);
2460 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustumBindingPnt (void) const
2462 SFUInt32::GetHandlePtr
returnValue(
2463 new SFUInt32::GetHandle(
2464 &_sfFrustumBindingPnt
,
2465 this->getType().getFieldDesc(FrustumBindingPntFieldId
),
2466 const_cast<ClusterShadingStageBase
*>(this)));
2471 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustumBindingPnt(void)
2473 SFUInt32::EditHandlePtr
returnValue(
2474 new SFUInt32::EditHandle(
2475 &_sfFrustumBindingPnt
,
2476 this->getType().getFieldDesc(FrustumBindingPntFieldId
),
2480 editSField(FrustumBindingPntFieldMask
);
2485 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexListBindingPnt (void) const
2487 SFUInt32::GetHandlePtr
returnValue(
2488 new SFUInt32::GetHandle(
2489 &_sfLightIndexListBindingPnt
,
2490 this->getType().getFieldDesc(LightIndexListBindingPntFieldId
),
2491 const_cast<ClusterShadingStageBase
*>(this)));
2496 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexListBindingPnt(void)
2498 SFUInt32::EditHandlePtr
returnValue(
2499 new SFUInt32::EditHandle(
2500 &_sfLightIndexListBindingPnt
,
2501 this->getType().getFieldDesc(LightIndexListBindingPntFieldId
),
2505 editSField(LightIndexListBindingPntFieldMask
);
2510 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexCounterBindingPnt (void) const
2512 SFUInt32::GetHandlePtr
returnValue(
2513 new SFUInt32::GetHandle(
2514 &_sfLightIndexCounterBindingPnt
,
2515 this->getType().getFieldDesc(LightIndexCounterBindingPntFieldId
),
2516 const_cast<ClusterShadingStageBase
*>(this)));
2521 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexCounterBindingPnt(void)
2523 SFUInt32::EditHandlePtr
returnValue(
2524 new SFUInt32::EditHandle(
2525 &_sfLightIndexCounterBindingPnt
,
2526 this->getType().getFieldDesc(LightIndexCounterBindingPntFieldId
),
2530 editSField(LightIndexCounterBindingPntFieldMask
);
2535 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightGridBindingPnt (void) const
2537 SFUInt32::GetHandlePtr
returnValue(
2538 new SFUInt32::GetHandle(
2539 &_sfLightGridBindingPnt
,
2540 this->getType().getFieldDesc(LightGridBindingPntFieldId
),
2541 const_cast<ClusterShadingStageBase
*>(this)));
2546 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightGridBindingPnt(void)
2548 SFUInt32::EditHandlePtr
returnValue(
2549 new SFUInt32::EditHandle(
2550 &_sfLightGridBindingPnt
,
2551 this->getType().getFieldDesc(LightGridBindingPntFieldId
),
2555 editSField(LightGridBindingPntFieldMask
);
2560 GetFieldHandlePtr
ClusterShadingStageBase::getHandleAffectedLightIndexListBlockName (void) const
2562 SFString::GetHandlePtr
returnValue(
2563 new SFString::GetHandle(
2564 &_sfAffectedLightIndexListBlockName
,
2565 this->getType().getFieldDesc(AffectedLightIndexListBlockNameFieldId
),
2566 const_cast<ClusterShadingStageBase
*>(this)));
2571 EditFieldHandlePtr
ClusterShadingStageBase::editHandleAffectedLightIndexListBlockName(void)
2573 SFString::EditHandlePtr
returnValue(
2574 new SFString::EditHandle(
2575 &_sfAffectedLightIndexListBlockName
,
2576 this->getType().getFieldDesc(AffectedLightIndexListBlockNameFieldId
),
2580 editSField(AffectedLightIndexListBlockNameFieldMask
);
2585 GetFieldHandlePtr
ClusterShadingStageBase::getHandleAffectedLightIndexListVariableName (void) const
2587 SFString::GetHandlePtr
returnValue(
2588 new SFString::GetHandle(
2589 &_sfAffectedLightIndexListVariableName
,
2590 this->getType().getFieldDesc(AffectedLightIndexListVariableNameFieldId
),
2591 const_cast<ClusterShadingStageBase
*>(this)));
2596 EditFieldHandlePtr
ClusterShadingStageBase::editHandleAffectedLightIndexListVariableName(void)
2598 SFString::EditHandlePtr
returnValue(
2599 new SFString::EditHandle(
2600 &_sfAffectedLightIndexListVariableName
,
2601 this->getType().getFieldDesc(AffectedLightIndexListVariableNameFieldId
),
2605 editSField(AffectedLightIndexListVariableNameFieldMask
);
2610 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexListBlockName (void) const
2612 SFString::GetHandlePtr
returnValue(
2613 new SFString::GetHandle(
2614 &_sfLightIndexListBlockName
,
2615 this->getType().getFieldDesc(LightIndexListBlockNameFieldId
),
2616 const_cast<ClusterShadingStageBase
*>(this)));
2621 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexListBlockName(void)
2623 SFString::EditHandlePtr
returnValue(
2624 new SFString::EditHandle(
2625 &_sfLightIndexListBlockName
,
2626 this->getType().getFieldDesc(LightIndexListBlockNameFieldId
),
2630 editSField(LightIndexListBlockNameFieldMask
);
2635 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexListVariableName (void) const
2637 SFString::GetHandlePtr
returnValue(
2638 new SFString::GetHandle(
2639 &_sfLightIndexListVariableName
,
2640 this->getType().getFieldDesc(LightIndexListVariableNameFieldId
),
2641 const_cast<ClusterShadingStageBase
*>(this)));
2646 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexListVariableName(void)
2648 SFString::EditHandlePtr
returnValue(
2649 new SFString::EditHandle(
2650 &_sfLightIndexListVariableName
,
2651 this->getType().getFieldDesc(LightIndexListVariableNameFieldId
),
2655 editSField(LightIndexListVariableNameFieldMask
);
2660 GetFieldHandlePtr
ClusterShadingStageBase::getHandleClusteringDataBlockName (void) const
2662 SFString::GetHandlePtr
returnValue(
2663 new SFString::GetHandle(
2664 &_sfClusteringDataBlockName
,
2665 this->getType().getFieldDesc(ClusteringDataBlockNameFieldId
),
2666 const_cast<ClusterShadingStageBase
*>(this)));
2671 EditFieldHandlePtr
ClusterShadingStageBase::editHandleClusteringDataBlockName(void)
2673 SFString::EditHandlePtr
returnValue(
2674 new SFString::EditHandle(
2675 &_sfClusteringDataBlockName
,
2676 this->getType().getFieldDesc(ClusteringDataBlockNameFieldId
),
2680 editSField(ClusteringDataBlockNameFieldMask
);
2685 GetFieldHandlePtr
ClusterShadingStageBase::getHandleClusteringDataVariableName (void) const
2687 SFString::GetHandlePtr
returnValue(
2688 new SFString::GetHandle(
2689 &_sfClusteringDataVariableName
,
2690 this->getType().getFieldDesc(ClusteringDataVariableNameFieldId
),
2691 const_cast<ClusterShadingStageBase
*>(this)));
2696 EditFieldHandlePtr
ClusterShadingStageBase::editHandleClusteringDataVariableName(void)
2698 SFString::EditHandlePtr
returnValue(
2699 new SFString::EditHandle(
2700 &_sfClusteringDataVariableName
,
2701 this->getType().getFieldDesc(ClusteringDataVariableNameFieldId
),
2705 editSField(ClusteringDataVariableNameFieldMask
);
2710 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightGridVariableName (void) const
2712 SFString::GetHandlePtr
returnValue(
2713 new SFString::GetHandle(
2714 &_sfLightGridVariableName
,
2715 this->getType().getFieldDesc(LightGridVariableNameFieldId
),
2716 const_cast<ClusterShadingStageBase
*>(this)));
2721 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightGridVariableName(void)
2723 SFString::EditHandlePtr
returnValue(
2724 new SFString::EditHandle(
2725 &_sfLightGridVariableName
,
2726 this->getType().getFieldDesc(LightGridVariableNameFieldId
),
2730 editSField(LightGridVariableNameFieldMask
);
2735 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCalcFrustumsOnCPU (void) const
2737 SFBool::GetHandlePtr
returnValue(
2738 new SFBool::GetHandle(
2739 &_sfCalcFrustumsOnCPU
,
2740 this->getType().getFieldDesc(CalcFrustumsOnCPUFieldId
),
2741 const_cast<ClusterShadingStageBase
*>(this)));
2746 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCalcFrustumsOnCPU(void)
2748 SFBool::EditHandlePtr
returnValue(
2749 new SFBool::EditHandle(
2750 &_sfCalcFrustumsOnCPU
,
2751 this->getType().getFieldDesc(CalcFrustumsOnCPUFieldId
),
2755 editSField(CalcFrustumsOnCPUFieldMask
);
2760 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullLighsOnCPU (void) const
2762 SFBool::GetHandlePtr
returnValue(
2763 new SFBool::GetHandle(
2765 this->getType().getFieldDesc(CullLighsOnCPUFieldId
),
2766 const_cast<ClusterShadingStageBase
*>(this)));
2771 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullLighsOnCPU (void)
2773 SFBool::EditHandlePtr
returnValue(
2774 new SFBool::EditHandle(
2776 this->getType().getFieldDesc(CullLighsOnCPUFieldId
),
2780 editSField(CullLighsOnCPUFieldMask
);
2785 GetFieldHandlePtr
ClusterShadingStageBase::getHandleDisabled (void) const
2787 SFBool::GetHandlePtr
returnValue(
2788 new SFBool::GetHandle(
2790 this->getType().getFieldDesc(DisabledFieldId
),
2791 const_cast<ClusterShadingStageBase
*>(this)));
2796 EditFieldHandlePtr
ClusterShadingStageBase::editHandleDisabled (void)
2798 SFBool::EditHandlePtr
returnValue(
2799 new SFBool::EditHandle(
2801 this->getType().getFieldDesc(DisabledFieldId
),
2805 editSField(DisabledFieldMask
);
2810 GetFieldHandlePtr
ClusterShadingStageBase::getHandleMaxLightIndexListSize (void) const
2812 SFUInt32::GetHandlePtr
returnValue(
2813 new SFUInt32::GetHandle(
2814 &_sfMaxLightIndexListSize
,
2815 this->getType().getFieldDesc(MaxLightIndexListSizeFieldId
),
2816 const_cast<ClusterShadingStageBase
*>(this)));
2821 EditFieldHandlePtr
ClusterShadingStageBase::editHandleMaxLightIndexListSize(void)
2823 SFUInt32::EditHandlePtr
returnValue(
2824 new SFUInt32::EditHandle(
2825 &_sfMaxLightIndexListSize
,
2826 this->getType().getFieldDesc(MaxLightIndexListSizeFieldId
),
2830 editSField(MaxLightIndexListSizeFieldMask
);
2835 GetFieldHandlePtr
ClusterShadingStageBase::getHandleMaxClusterLightCount (void) const
2837 SFUInt32::GetHandlePtr
returnValue(
2838 new SFUInt32::GetHandle(
2839 &_sfMaxClusterLightCount
,
2840 this->getType().getFieldDesc(MaxClusterLightCountFieldId
),
2841 const_cast<ClusterShadingStageBase
*>(this)));
2846 EditFieldHandlePtr
ClusterShadingStageBase::editHandleMaxClusterLightCount(void)
2848 SFUInt32::EditHandlePtr
returnValue(
2849 new SFUInt32::EditHandle(
2850 &_sfMaxClusterLightCount
,
2851 this->getType().getFieldDesc(MaxClusterLightCountFieldId
),
2855 editSField(MaxClusterLightCountFieldMask
);
2860 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustNode (void) const
2862 SFUnrecNodePtr::GetHandlePtr
returnValue(
2863 new SFUnrecNodePtr::GetHandle(
2865 this->getType().getFieldDesc(FrustNodeFieldId
),
2866 const_cast<ClusterShadingStageBase
*>(this)));
2871 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustNode (void)
2873 SFUnrecNodePtr::EditHandlePtr
returnValue(
2874 new SFUnrecNodePtr::EditHandle(
2876 this->getType().getFieldDesc(FrustNodeFieldId
),
2879 returnValue
->setSetMethod(
2880 boost::bind(&ClusterShadingStage::setFrustNode
,
2881 static_cast<ClusterShadingStage
*>(this), _1
));
2883 editSField(FrustNodeFieldMask
);
2888 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustAlgoElement (void) const
2890 SFUnrecAlgorithmComputeElementPtr::GetHandlePtr
returnValue(
2891 new SFUnrecAlgorithmComputeElementPtr::GetHandle(
2892 &_sfFrustAlgoElement
,
2893 this->getType().getFieldDesc(FrustAlgoElementFieldId
),
2894 const_cast<ClusterShadingStageBase
*>(this)));
2899 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustAlgoElement(void)
2901 SFUnrecAlgorithmComputeElementPtr::EditHandlePtr
returnValue(
2902 new SFUnrecAlgorithmComputeElementPtr::EditHandle(
2903 &_sfFrustAlgoElement
,
2904 this->getType().getFieldDesc(FrustAlgoElementFieldId
),
2907 returnValue
->setSetMethod(
2908 boost::bind(&ClusterShadingStage::setFrustAlgoElement
,
2909 static_cast<ClusterShadingStage
*>(this), _1
));
2911 editSField(FrustAlgoElementFieldMask
);
2916 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustCompShaderAlgo (void) const
2918 SFUnrecComputeShaderAlgorithmPtr::GetHandlePtr
returnValue(
2919 new SFUnrecComputeShaderAlgorithmPtr::GetHandle(
2920 &_sfFrustCompShaderAlgo
,
2921 this->getType().getFieldDesc(FrustCompShaderAlgoFieldId
),
2922 const_cast<ClusterShadingStageBase
*>(this)));
2927 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustCompShaderAlgo(void)
2929 SFUnrecComputeShaderAlgorithmPtr::EditHandlePtr
returnValue(
2930 new SFUnrecComputeShaderAlgorithmPtr::EditHandle(
2931 &_sfFrustCompShaderAlgo
,
2932 this->getType().getFieldDesc(FrustCompShaderAlgoFieldId
),
2935 returnValue
->setSetMethod(
2936 boost::bind(&ClusterShadingStage::setFrustCompShaderAlgo
,
2937 static_cast<ClusterShadingStage
*>(this), _1
));
2939 editSField(FrustCompShaderAlgoFieldMask
);
2944 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullNode (void) const
2946 SFUnrecNodePtr::GetHandlePtr
returnValue(
2947 new SFUnrecNodePtr::GetHandle(
2949 this->getType().getFieldDesc(CullNodeFieldId
),
2950 const_cast<ClusterShadingStageBase
*>(this)));
2955 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullNode (void)
2957 SFUnrecNodePtr::EditHandlePtr
returnValue(
2958 new SFUnrecNodePtr::EditHandle(
2960 this->getType().getFieldDesc(CullNodeFieldId
),
2963 returnValue
->setSetMethod(
2964 boost::bind(&ClusterShadingStage::setCullNode
,
2965 static_cast<ClusterShadingStage
*>(this), _1
));
2967 editSField(CullNodeFieldMask
);
2972 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullAlgoElement (void) const
2974 SFUnrecAlgorithmComputeElementPtr::GetHandlePtr
returnValue(
2975 new SFUnrecAlgorithmComputeElementPtr::GetHandle(
2976 &_sfCullAlgoElement
,
2977 this->getType().getFieldDesc(CullAlgoElementFieldId
),
2978 const_cast<ClusterShadingStageBase
*>(this)));
2983 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullAlgoElement(void)
2985 SFUnrecAlgorithmComputeElementPtr::EditHandlePtr
returnValue(
2986 new SFUnrecAlgorithmComputeElementPtr::EditHandle(
2987 &_sfCullAlgoElement
,
2988 this->getType().getFieldDesc(CullAlgoElementFieldId
),
2991 returnValue
->setSetMethod(
2992 boost::bind(&ClusterShadingStage::setCullAlgoElement
,
2993 static_cast<ClusterShadingStage
*>(this), _1
));
2995 editSField(CullAlgoElementFieldMask
);
3000 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullCompShaderAlgo (void) const
3002 SFUnrecComputeShaderAlgorithmPtr::GetHandlePtr
returnValue(
3003 new SFUnrecComputeShaderAlgorithmPtr::GetHandle(
3004 &_sfCullCompShaderAlgo
,
3005 this->getType().getFieldDesc(CullCompShaderAlgoFieldId
),
3006 const_cast<ClusterShadingStageBase
*>(this)));
3011 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullCompShaderAlgo(void)
3013 SFUnrecComputeShaderAlgorithmPtr::EditHandlePtr
returnValue(
3014 new SFUnrecComputeShaderAlgorithmPtr::EditHandle(
3015 &_sfCullCompShaderAlgo
,
3016 this->getType().getFieldDesc(CullCompShaderAlgoFieldId
),
3019 returnValue
->setSetMethod(
3020 boost::bind(&ClusterShadingStage::setCullCompShaderAlgo
,
3021 static_cast<ClusterShadingStage
*>(this), _1
));
3023 editSField(CullCompShaderAlgoFieldMask
);
3028 GetFieldHandlePtr
ClusterShadingStageBase::getHandleMultiLightChunk (void) const
3030 SFUnrecMultiLightChunkPtr::GetHandlePtr
returnValue(
3031 new SFUnrecMultiLightChunkPtr::GetHandle(
3032 &_sfMultiLightChunk
,
3033 this->getType().getFieldDesc(MultiLightChunkFieldId
),
3034 const_cast<ClusterShadingStageBase
*>(this)));
3039 EditFieldHandlePtr
ClusterShadingStageBase::editHandleMultiLightChunk(void)
3041 SFUnrecMultiLightChunkPtr::EditHandlePtr
returnValue(
3042 new SFUnrecMultiLightChunkPtr::EditHandle(
3043 &_sfMultiLightChunk
,
3044 this->getType().getFieldDesc(MultiLightChunkFieldId
),
3047 returnValue
->setSetMethod(
3048 boost::bind(&ClusterShadingStage::setMultiLightChunk
,
3049 static_cast<ClusterShadingStage
*>(this), _1
));
3051 editSField(MultiLightChunkFieldMask
);
3056 GetFieldHandlePtr
ClusterShadingStageBase::getHandleShaderProgChunk (void) const
3058 SFUnrecShaderProgramChunkPtr::GetHandlePtr
returnValue(
3059 new SFUnrecShaderProgramChunkPtr::GetHandle(
3060 &_sfShaderProgChunk
,
3061 this->getType().getFieldDesc(ShaderProgChunkFieldId
),
3062 const_cast<ClusterShadingStageBase
*>(this)));
3067 EditFieldHandlePtr
ClusterShadingStageBase::editHandleShaderProgChunk(void)
3069 SFUnrecShaderProgramChunkPtr::EditHandlePtr
returnValue(
3070 new SFUnrecShaderProgramChunkPtr::EditHandle(
3071 &_sfShaderProgChunk
,
3072 this->getType().getFieldDesc(ShaderProgChunkFieldId
),
3075 returnValue
->setSetMethod(
3076 boost::bind(&ClusterShadingStage::setShaderProgChunk
,
3077 static_cast<ClusterShadingStage
*>(this), _1
));
3079 editSField(ShaderProgChunkFieldMask
);
3085 #ifdef OSG_MT_CPTR_ASPECT
3086 void ClusterShadingStageBase::execSyncV( FieldContainer
&oFrom
,
3087 ConstFieldMaskArg whichField
,
3088 AspectOffsetStore
&oOffsets
,
3089 ConstFieldMaskArg syncMode
,
3090 const UInt32 uiSyncInfo
)
3092 ClusterShadingStage
*pThis
= static_cast<ClusterShadingStage
*>(this);
3094 pThis
->execSync(static_cast<ClusterShadingStage
*>(&oFrom
),
3103 #ifdef OSG_MT_CPTR_ASPECT
3104 FieldContainer
*ClusterShadingStageBase::createAspectCopy(
3105 const FieldContainer
*pRefAspect
) const
3107 ClusterShadingStage
*returnValue
;
3109 newAspectCopy(returnValue
,
3110 dynamic_cast<const ClusterShadingStage
*>(pRefAspect
),
3111 dynamic_cast<const ClusterShadingStage
*>(this));
3117 void ClusterShadingStageBase::resolveLinks(void)
3119 Inherited::resolveLinks();
3121 static_cast<ClusterShadingStage
*>(this)->setFrustNode(NULL
);
3123 static_cast<ClusterShadingStage
*>(this)->setFrustAlgoElement(NULL
);
3125 static_cast<ClusterShadingStage
*>(this)->setFrustCompShaderAlgo(NULL
);
3127 static_cast<ClusterShadingStage
*>(this)->setCullNode(NULL
);
3129 static_cast<ClusterShadingStage
*>(this)->setCullAlgoElement(NULL
);
3131 static_cast<ClusterShadingStage
*>(this)->setCullCompShaderAlgo(NULL
);
3133 static_cast<ClusterShadingStage
*>(this)->setMultiLightChunk(NULL
);
3135 static_cast<ClusterShadingStage
*>(this)->setShaderProgChunk(NULL
);