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
>(
651 reinterpret_cast<void *>(&ClusterShadingStage::classDescInserter
)),
654 "<?xml version=\"1.0\"?>\n"
657 " name=\"ClusterShadingStage\"\n"
658 " parent=\"Stage\"\n"
659 " library=\"ContribTechniques\"\n"
660 " pointerfieldtypes=\"none\"\n"
661 " structure=\"concrete\"\n"
662 " systemcomponent=\"true\"\n"
663 " parentsystemcomponent=\"true\"\n"
664 " decoratable=\"false\"\n"
665 " useLocalIncludes=\"false\"\n"
666 " isNodeCore=\"true\"\n"
667 " isBundle=\"false\"\n"
671 " name=\"blockSize\"\n"
673 " cardinality=\"single\"\n"
674 " visibility=\"external\"\n"
675 " defaultValue=\"16\"\n"
676 " access=\"public\"\n"
678 " The number of compute shader work group threads per xy-direction\n"
682 " name=\"tileSize\"\n"
684 " cardinality=\"single\"\n"
685 " visibility=\"external\"\n"
686 " defaultValue=\"64\"\n"
687 " access=\"public\"\n"
689 " The number of pixel per cluster tile per xy-direction. The overall number if\n"
690 " clusters is then tileSize^2 * numClusterZ.\n"
694 " name=\"numClusterZ\"\n"
696 " cardinality=\"single\"\n"
697 " visibility=\"external\"\n"
698 " defaultValue=\"32\"\n"
699 " access=\"public\"\n"
701 " The number of clusters in the z direction. The overall number if\n"
702 " clusters is then tileSize^2 * numClusterZ.\n"
706 " name=\"nearPlaneOffset\"\n"
708 " cardinality=\"single\"\n"
709 " visibility=\"external\"\n"
710 " defaultValue=\"5.f\"\n"
711 " access=\"public\"\n"
713 " z-coords below of zNear + near_plane_offset are mapped to cluster key 0, i.e.\n"
714 " the logarithmic clustering starts at zNear + near_plane_offset with key 1. Key 0\n"
715 " is therefor artificially. With this parameter you can enhance the cluster utilization.\n"
719 " name=\"dispatchDataBindingPnt\"\n"
721 " cardinality=\"single\"\n"
722 " visibility=\"external\"\n"
723 " defaultValue=\"1\"\n"
724 " access=\"public\"\n"
726 " The fragment shader binding point for the clustering data UBO.\n"
730 " name=\"clusterDataBindingPnt\"\n"
732 " cardinality=\"single\"\n"
733 " visibility=\"external\"\n"
734 " defaultValue=\"2\"\n"
735 " access=\"public\"\n"
737 " The fragment shader binding point for the clustering data UBO.\n"
741 " name=\"lightBindingPnt\"\n"
743 " cardinality=\"single\"\n"
744 " visibility=\"external\"\n"
745 " defaultValue=\"1\"\n"
746 " access=\"public\"\n"
748 " The fragment shader SSBO binding point for the multi light chunk.\n"
752 " name=\"affectedLightIndexListBindingPnt\"\n"
754 " cardinality=\"single\"\n"
755 " visibility=\"external\"\n"
756 " defaultValue=\"2\"\n"
757 " access=\"public\"\n"
759 " The fragment shader binding point for the index list SSBO of the view frustum affecting lights.\n"
763 " name=\"frustumBindingPnt\"\n"
765 " cardinality=\"single\"\n"
766 " visibility=\"external\"\n"
767 " defaultValue=\"3\"\n"
768 " access=\"public\"\n"
770 " The frustum and cull light computation shader binding point for the SSBO frustum buffer.\n"
774 " name=\"lightIndexListBindingPnt\"\n"
776 " cardinality=\"single\"\n"
777 " visibility=\"external\"\n"
778 " defaultValue=\"4\"\n"
779 " access=\"public\"\n"
781 " The fragment shader binding point for the index list SSBO of the cluster shading lights.\n"
785 " name=\"lightIndexCounterBindingPnt\"\n"
787 " cardinality=\"single\"\n"
788 " visibility=\"external\"\n"
789 " defaultValue=\"5\"\n"
790 " access=\"public\"\n"
792 " The fragment shader binding point for the index list global counter SSBO.\n"
796 " name=\"lightGridBindingPnt\"\n"
798 " cardinality=\"single\"\n"
799 " visibility=\"external\"\n"
800 " defaultValue=\"0\"\n"
801 " access=\"public\"\n"
803 " The fragment shader binding point for the texture image of the light grid.\n"
807 " name=\"affectedLightIndexListBlockName\"\n"
808 " type=\"std::string\"\n"
809 " cardinality=\"single\"\n"
810 " visibility=\"external\"\n"
811 " access=\"public\"\n"
812 " defaultValue='\"AffectedLightIndexList\"'\n"
814 " The shader storage buffer block name for the affected light index buffer.\n"
818 " name=\"affectedLightIndexListVariableName\"\n"
819 " type=\"std::string\"\n"
820 " cardinality=\"single\"\n"
821 " visibility=\"external\"\n"
822 " access=\"public\"\n"
823 " defaultValue='\"affectedLightIndexList\"'\n"
825 " The variable name for the affected light index buffer.\n"
829 " name=\"lightIndexListBlockName\"\n"
830 " type=\"std::string\"\n"
831 " cardinality=\"single\"\n"
832 " visibility=\"external\"\n"
833 " access=\"public\"\n"
834 " defaultValue='\"LightIndexList\"'\n"
836 " The shader storage buffer block name for the global light index buffer.\n"
840 " name=\"lightIndexListVariableName\"\n"
841 " type=\"std::string\"\n"
842 " cardinality=\"single\"\n"
843 " visibility=\"external\"\n"
844 " access=\"public\"\n"
845 " defaultValue='\"lightIndexList\"'\n"
847 " The variable name for the global light index buffer.\n"
851 " name=\"clusteringDataBlockName\"\n"
852 " type=\"std::string\"\n"
853 " cardinality=\"single\"\n"
854 " visibility=\"external\"\n"
855 " access=\"public\"\n"
856 " defaultValue='\"ClusteringData\"'\n"
858 " The uniform buffer block name for the clustering data buffer.\n"
862 " name=\"clusteringDataVariableName\"\n"
863 " type=\"std::string\"\n"
864 " cardinality=\"single\"\n"
865 " visibility=\"external\"\n"
866 " access=\"public\"\n"
867 " defaultValue='\"clusteringData\"'\n"
869 " The variable name for the clustering data buffer.\n"
873 " name=\"lightGridVariableName\"\n"
874 " type=\"std::string\"\n"
875 " cardinality=\"single\"\n"
876 " visibility=\"external\"\n"
877 " access=\"public\"\n"
878 " defaultValue='\"light_grid\"'\n"
880 " The variable name for the uniform light grid image array .\n"
884 " name=\"calcFrustumsOnCPU\"\n"
886 " cardinality=\"single\"\n"
887 " visibility=\"external\"\n"
888 " defaultValue=\"false\"\n"
889 " access=\"public\"\n"
891 " Calculate the view frustums on the CPU.\n"
895 " name=\"cullLighsOnCPU\"\n"
897 " cardinality=\"single\"\n"
898 " visibility=\"external\"\n"
899 " defaultValue=\"false\"\n"
900 " access=\"public\"\n"
902 " Cull the lights on the CPU.\n"
906 " name=\"disabled\"\n"
908 " cardinality=\"single\"\n"
909 " visibility=\"external\"\n"
910 " defaultValue=\"false\"\n"
911 " access=\"public\"\n"
913 " Disable the stage completely. The geometry fragment shaders must act accordingly.\n"
917 " name=\"maxLightIndexListSize\"\n"
919 " cardinality=\"single\"\n"
920 " visibility=\"external\"\n"
921 " defaultValue=\"2097152\"\n"
922 " access=\"public\"\n"
924 " The maximal number of light indices, i.e. the accumulated sum of all cluster lights. If the light index\n"
925 " list is completely filled all additional lights are silently dropped.\n"
929 " name=\"maxClusterLightCount\"\n"
931 " cardinality=\"single\"\n"
932 " visibility=\"external\"\n"
933 " defaultValue=\"1024\"\n"
934 " access=\"public\"\n"
936 " The maximal number of lights that can be attributed to one specific cluster. Realize, that\n"
937 " the accumulated sum of all cluster attributed lights must not exceed the maxLightIndexListSize.\n"
938 " If the number of lights for one cluster exceeds this limit the excessive lights are silently dropped.\n"
942 " name=\"frustNode\"\n"
943 " type=\"NodePtr\"\n"
944 " cardinality=\"single\"\n"
945 " visibility=\"internal\"\n"
946 " defaultValue=\"NULL\"\n"
947 " access=\"protected\"\n"
949 " The frustum computation node.\n"
953 " name=\"frustAlgoElement\"\n"
954 " type=\"AlgorithmComputeElementPtr\"\n"
955 " cardinality=\"single\"\n"
956 " visibility=\"internal\"\n"
957 " defaultValue=\"NULL\"\n"
958 " access=\"protected\"\n"
960 " The frustum algorithm computation element.\n"
964 " name=\"frustCompShaderAlgo\"\n"
965 " type=\"ComputeShaderAlgorithmPtr\"\n"
966 " cardinality=\"single\"\n"
967 " visibility=\"internal\"\n"
968 " defaultValue=\"NULL\"\n"
969 " access=\"protected\"\n"
971 " The frustum computation shader algorithm.\n"
975 " name=\"cullNode\"\n"
976 " type=\"NodePtr\"\n"
977 " cardinality=\"single\"\n"
978 " visibility=\"internal\"\n"
979 " defaultValue=\"NULL\"\n"
980 " access=\"protected\"\n"
982 " The frustum computation node.\n"
986 " name=\"cullAlgoElement\"\n"
987 " type=\"AlgorithmComputeElementPtr\"\n"
988 " cardinality=\"single\"\n"
989 " visibility=\"internal\"\n"
990 " defaultValue=\"NULL\"\n"
991 " access=\"protected\"\n"
993 " The frustum algorithm computation element.\n"
997 " name=\"cullCompShaderAlgo\"\n"
998 " type=\"ComputeShaderAlgorithmPtr\"\n"
999 " cardinality=\"single\"\n"
1000 " visibility=\"internal\"\n"
1001 " defaultValue=\"NULL\"\n"
1002 " access=\"protected\"\n"
1004 " The frustum computation shader algorithm.\n"
1008 " name=\"multiLightChunk\"\n"
1009 " type=\"MultiLightChunkPtr\"\n"
1010 " cardinality=\"single\"\n"
1011 " visibility=\"external\"\n"
1012 " defaultValue=\"NULL\"\n"
1013 " access=\"public\"\n"
1015 " The multi light chunk.\n"
1019 " name=\"shaderProgChunk\"\n"
1020 " type=\"ShaderProgramChunkPtr\"\n"
1021 " cardinality=\"single\"\n"
1022 " visibility=\"internal\"\n"
1023 " defaultValue=\"NULL\"\n"
1024 " access=\"protected\"\n"
1026 " The shader program chunk.\n"
1029 "</FieldContainer>\n",
1033 /*------------------------------ get -----------------------------------*/
1035 FieldContainerType
&ClusterShadingStageBase::getType(void)
1040 const FieldContainerType
&ClusterShadingStageBase::getType(void) const
1045 UInt32
ClusterShadingStageBase::getContainerSize(void) const
1047 return sizeof(ClusterShadingStage
);
1050 /*------------------------- decorator get ------------------------------*/
1053 SFUInt32
*ClusterShadingStageBase::editSFBlockSize(void)
1055 editSField(BlockSizeFieldMask
);
1057 return &_sfBlockSize
;
1060 const SFUInt32
*ClusterShadingStageBase::getSFBlockSize(void) const
1062 return &_sfBlockSize
;
1066 SFUInt32
*ClusterShadingStageBase::editSFTileSize(void)
1068 editSField(TileSizeFieldMask
);
1070 return &_sfTileSize
;
1073 const SFUInt32
*ClusterShadingStageBase::getSFTileSize(void) const
1075 return &_sfTileSize
;
1079 SFUInt32
*ClusterShadingStageBase::editSFNumClusterZ(void)
1081 editSField(NumClusterZFieldMask
);
1083 return &_sfNumClusterZ
;
1086 const SFUInt32
*ClusterShadingStageBase::getSFNumClusterZ(void) const
1088 return &_sfNumClusterZ
;
1092 SFReal32
*ClusterShadingStageBase::editSFNearPlaneOffset(void)
1094 editSField(NearPlaneOffsetFieldMask
);
1096 return &_sfNearPlaneOffset
;
1099 const SFReal32
*ClusterShadingStageBase::getSFNearPlaneOffset(void) const
1101 return &_sfNearPlaneOffset
;
1105 SFUInt32
*ClusterShadingStageBase::editSFDispatchDataBindingPnt(void)
1107 editSField(DispatchDataBindingPntFieldMask
);
1109 return &_sfDispatchDataBindingPnt
;
1112 const SFUInt32
*ClusterShadingStageBase::getSFDispatchDataBindingPnt(void) const
1114 return &_sfDispatchDataBindingPnt
;
1118 SFUInt32
*ClusterShadingStageBase::editSFClusterDataBindingPnt(void)
1120 editSField(ClusterDataBindingPntFieldMask
);
1122 return &_sfClusterDataBindingPnt
;
1125 const SFUInt32
*ClusterShadingStageBase::getSFClusterDataBindingPnt(void) const
1127 return &_sfClusterDataBindingPnt
;
1131 SFUInt32
*ClusterShadingStageBase::editSFLightBindingPnt(void)
1133 editSField(LightBindingPntFieldMask
);
1135 return &_sfLightBindingPnt
;
1138 const SFUInt32
*ClusterShadingStageBase::getSFLightBindingPnt(void) const
1140 return &_sfLightBindingPnt
;
1144 SFUInt32
*ClusterShadingStageBase::editSFAffectedLightIndexListBindingPnt(void)
1146 editSField(AffectedLightIndexListBindingPntFieldMask
);
1148 return &_sfAffectedLightIndexListBindingPnt
;
1151 const SFUInt32
*ClusterShadingStageBase::getSFAffectedLightIndexListBindingPnt(void) const
1153 return &_sfAffectedLightIndexListBindingPnt
;
1157 SFUInt32
*ClusterShadingStageBase::editSFFrustumBindingPnt(void)
1159 editSField(FrustumBindingPntFieldMask
);
1161 return &_sfFrustumBindingPnt
;
1164 const SFUInt32
*ClusterShadingStageBase::getSFFrustumBindingPnt(void) const
1166 return &_sfFrustumBindingPnt
;
1170 SFUInt32
*ClusterShadingStageBase::editSFLightIndexListBindingPnt(void)
1172 editSField(LightIndexListBindingPntFieldMask
);
1174 return &_sfLightIndexListBindingPnt
;
1177 const SFUInt32
*ClusterShadingStageBase::getSFLightIndexListBindingPnt(void) const
1179 return &_sfLightIndexListBindingPnt
;
1183 SFUInt32
*ClusterShadingStageBase::editSFLightIndexCounterBindingPnt(void)
1185 editSField(LightIndexCounterBindingPntFieldMask
);
1187 return &_sfLightIndexCounterBindingPnt
;
1190 const SFUInt32
*ClusterShadingStageBase::getSFLightIndexCounterBindingPnt(void) const
1192 return &_sfLightIndexCounterBindingPnt
;
1196 SFUInt32
*ClusterShadingStageBase::editSFLightGridBindingPnt(void)
1198 editSField(LightGridBindingPntFieldMask
);
1200 return &_sfLightGridBindingPnt
;
1203 const SFUInt32
*ClusterShadingStageBase::getSFLightGridBindingPnt(void) const
1205 return &_sfLightGridBindingPnt
;
1209 SFString
*ClusterShadingStageBase::editSFAffectedLightIndexListBlockName(void)
1211 editSField(AffectedLightIndexListBlockNameFieldMask
);
1213 return &_sfAffectedLightIndexListBlockName
;
1216 const SFString
*ClusterShadingStageBase::getSFAffectedLightIndexListBlockName(void) const
1218 return &_sfAffectedLightIndexListBlockName
;
1222 SFString
*ClusterShadingStageBase::editSFAffectedLightIndexListVariableName(void)
1224 editSField(AffectedLightIndexListVariableNameFieldMask
);
1226 return &_sfAffectedLightIndexListVariableName
;
1229 const SFString
*ClusterShadingStageBase::getSFAffectedLightIndexListVariableName(void) const
1231 return &_sfAffectedLightIndexListVariableName
;
1235 SFString
*ClusterShadingStageBase::editSFLightIndexListBlockName(void)
1237 editSField(LightIndexListBlockNameFieldMask
);
1239 return &_sfLightIndexListBlockName
;
1242 const SFString
*ClusterShadingStageBase::getSFLightIndexListBlockName(void) const
1244 return &_sfLightIndexListBlockName
;
1248 SFString
*ClusterShadingStageBase::editSFLightIndexListVariableName(void)
1250 editSField(LightIndexListVariableNameFieldMask
);
1252 return &_sfLightIndexListVariableName
;
1255 const SFString
*ClusterShadingStageBase::getSFLightIndexListVariableName(void) const
1257 return &_sfLightIndexListVariableName
;
1261 SFString
*ClusterShadingStageBase::editSFClusteringDataBlockName(void)
1263 editSField(ClusteringDataBlockNameFieldMask
);
1265 return &_sfClusteringDataBlockName
;
1268 const SFString
*ClusterShadingStageBase::getSFClusteringDataBlockName(void) const
1270 return &_sfClusteringDataBlockName
;
1274 SFString
*ClusterShadingStageBase::editSFClusteringDataVariableName(void)
1276 editSField(ClusteringDataVariableNameFieldMask
);
1278 return &_sfClusteringDataVariableName
;
1281 const SFString
*ClusterShadingStageBase::getSFClusteringDataVariableName(void) const
1283 return &_sfClusteringDataVariableName
;
1287 SFString
*ClusterShadingStageBase::editSFLightGridVariableName(void)
1289 editSField(LightGridVariableNameFieldMask
);
1291 return &_sfLightGridVariableName
;
1294 const SFString
*ClusterShadingStageBase::getSFLightGridVariableName(void) const
1296 return &_sfLightGridVariableName
;
1300 SFBool
*ClusterShadingStageBase::editSFCalcFrustumsOnCPU(void)
1302 editSField(CalcFrustumsOnCPUFieldMask
);
1304 return &_sfCalcFrustumsOnCPU
;
1307 const SFBool
*ClusterShadingStageBase::getSFCalcFrustumsOnCPU(void) const
1309 return &_sfCalcFrustumsOnCPU
;
1313 SFBool
*ClusterShadingStageBase::editSFCullLighsOnCPU(void)
1315 editSField(CullLighsOnCPUFieldMask
);
1317 return &_sfCullLighsOnCPU
;
1320 const SFBool
*ClusterShadingStageBase::getSFCullLighsOnCPU(void) const
1322 return &_sfCullLighsOnCPU
;
1326 SFBool
*ClusterShadingStageBase::editSFDisabled(void)
1328 editSField(DisabledFieldMask
);
1330 return &_sfDisabled
;
1333 const SFBool
*ClusterShadingStageBase::getSFDisabled(void) const
1335 return &_sfDisabled
;
1339 SFUInt32
*ClusterShadingStageBase::editSFMaxLightIndexListSize(void)
1341 editSField(MaxLightIndexListSizeFieldMask
);
1343 return &_sfMaxLightIndexListSize
;
1346 const SFUInt32
*ClusterShadingStageBase::getSFMaxLightIndexListSize(void) const
1348 return &_sfMaxLightIndexListSize
;
1352 SFUInt32
*ClusterShadingStageBase::editSFMaxClusterLightCount(void)
1354 editSField(MaxClusterLightCountFieldMask
);
1356 return &_sfMaxClusterLightCount
;
1359 const SFUInt32
*ClusterShadingStageBase::getSFMaxClusterLightCount(void) const
1361 return &_sfMaxClusterLightCount
;
1365 //! Get the ClusterShadingStage::_sfFrustNode field.
1366 const SFUnrecNodePtr
*ClusterShadingStageBase::getSFFrustNode(void) const
1368 return &_sfFrustNode
;
1371 SFUnrecNodePtr
*ClusterShadingStageBase::editSFFrustNode (void)
1373 editSField(FrustNodeFieldMask
);
1375 return &_sfFrustNode
;
1378 //! Get the value of the ClusterShadingStage::_sfFrustNode field.
1379 Node
* ClusterShadingStageBase::getFrustNode(void) const
1381 return _sfFrustNode
.getValue();
1384 //! Set the value of the ClusterShadingStage::_sfFrustNode field.
1385 void ClusterShadingStageBase::setFrustNode(Node
* const value
)
1387 editSField(FrustNodeFieldMask
);
1389 _sfFrustNode
.setValue(value
);
1393 //! Get the ClusterShadingStage::_sfFrustAlgoElement field.
1394 const SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::getSFFrustAlgoElement(void) const
1396 return &_sfFrustAlgoElement
;
1399 SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::editSFFrustAlgoElement(void)
1401 editSField(FrustAlgoElementFieldMask
);
1403 return &_sfFrustAlgoElement
;
1406 //! Get the value of the ClusterShadingStage::_sfFrustAlgoElement field.
1407 AlgorithmComputeElement
* ClusterShadingStageBase::getFrustAlgoElement(void) const
1409 return _sfFrustAlgoElement
.getValue();
1412 //! Set the value of the ClusterShadingStage::_sfFrustAlgoElement field.
1413 void ClusterShadingStageBase::setFrustAlgoElement(AlgorithmComputeElement
* const value
)
1415 editSField(FrustAlgoElementFieldMask
);
1417 _sfFrustAlgoElement
.setValue(value
);
1421 //! Get the ClusterShadingStage::_sfFrustCompShaderAlgo field.
1422 const SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::getSFFrustCompShaderAlgo(void) const
1424 return &_sfFrustCompShaderAlgo
;
1427 SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::editSFFrustCompShaderAlgo(void)
1429 editSField(FrustCompShaderAlgoFieldMask
);
1431 return &_sfFrustCompShaderAlgo
;
1434 //! Get the value of the ClusterShadingStage::_sfFrustCompShaderAlgo field.
1435 ComputeShaderAlgorithm
* ClusterShadingStageBase::getFrustCompShaderAlgo(void) const
1437 return _sfFrustCompShaderAlgo
.getValue();
1440 //! Set the value of the ClusterShadingStage::_sfFrustCompShaderAlgo field.
1441 void ClusterShadingStageBase::setFrustCompShaderAlgo(ComputeShaderAlgorithm
* const value
)
1443 editSField(FrustCompShaderAlgoFieldMask
);
1445 _sfFrustCompShaderAlgo
.setValue(value
);
1449 //! Get the ClusterShadingStage::_sfCullNode field.
1450 const SFUnrecNodePtr
*ClusterShadingStageBase::getSFCullNode(void) const
1452 return &_sfCullNode
;
1455 SFUnrecNodePtr
*ClusterShadingStageBase::editSFCullNode (void)
1457 editSField(CullNodeFieldMask
);
1459 return &_sfCullNode
;
1462 //! Get the value of the ClusterShadingStage::_sfCullNode field.
1463 Node
* ClusterShadingStageBase::getCullNode(void) const
1465 return _sfCullNode
.getValue();
1468 //! Set the value of the ClusterShadingStage::_sfCullNode field.
1469 void ClusterShadingStageBase::setCullNode(Node
* const value
)
1471 editSField(CullNodeFieldMask
);
1473 _sfCullNode
.setValue(value
);
1477 //! Get the ClusterShadingStage::_sfCullAlgoElement field.
1478 const SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::getSFCullAlgoElement(void) const
1480 return &_sfCullAlgoElement
;
1483 SFUnrecAlgorithmComputeElementPtr
*ClusterShadingStageBase::editSFCullAlgoElement(void)
1485 editSField(CullAlgoElementFieldMask
);
1487 return &_sfCullAlgoElement
;
1490 //! Get the value of the ClusterShadingStage::_sfCullAlgoElement field.
1491 AlgorithmComputeElement
* ClusterShadingStageBase::getCullAlgoElement(void) const
1493 return _sfCullAlgoElement
.getValue();
1496 //! Set the value of the ClusterShadingStage::_sfCullAlgoElement field.
1497 void ClusterShadingStageBase::setCullAlgoElement(AlgorithmComputeElement
* const value
)
1499 editSField(CullAlgoElementFieldMask
);
1501 _sfCullAlgoElement
.setValue(value
);
1505 //! Get the ClusterShadingStage::_sfCullCompShaderAlgo field.
1506 const SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::getSFCullCompShaderAlgo(void) const
1508 return &_sfCullCompShaderAlgo
;
1511 SFUnrecComputeShaderAlgorithmPtr
*ClusterShadingStageBase::editSFCullCompShaderAlgo(void)
1513 editSField(CullCompShaderAlgoFieldMask
);
1515 return &_sfCullCompShaderAlgo
;
1518 //! Get the value of the ClusterShadingStage::_sfCullCompShaderAlgo field.
1519 ComputeShaderAlgorithm
* ClusterShadingStageBase::getCullCompShaderAlgo(void) const
1521 return _sfCullCompShaderAlgo
.getValue();
1524 //! Set the value of the ClusterShadingStage::_sfCullCompShaderAlgo field.
1525 void ClusterShadingStageBase::setCullCompShaderAlgo(ComputeShaderAlgorithm
* const value
)
1527 editSField(CullCompShaderAlgoFieldMask
);
1529 _sfCullCompShaderAlgo
.setValue(value
);
1533 //! Get the ClusterShadingStage::_sfMultiLightChunk field.
1534 const SFUnrecMultiLightChunkPtr
*ClusterShadingStageBase::getSFMultiLightChunk(void) const
1536 return &_sfMultiLightChunk
;
1539 SFUnrecMultiLightChunkPtr
*ClusterShadingStageBase::editSFMultiLightChunk(void)
1541 editSField(MultiLightChunkFieldMask
);
1543 return &_sfMultiLightChunk
;
1546 //! Get the value of the ClusterShadingStage::_sfMultiLightChunk field.
1547 MultiLightChunk
* ClusterShadingStageBase::getMultiLightChunk(void) const
1549 return _sfMultiLightChunk
.getValue();
1552 //! Set the value of the ClusterShadingStage::_sfMultiLightChunk field.
1553 void ClusterShadingStageBase::setMultiLightChunk(MultiLightChunk
* const value
)
1555 editSField(MultiLightChunkFieldMask
);
1557 _sfMultiLightChunk
.setValue(value
);
1561 //! Get the ClusterShadingStage::_sfShaderProgChunk field.
1562 const SFUnrecShaderProgramChunkPtr
*ClusterShadingStageBase::getSFShaderProgChunk(void) const
1564 return &_sfShaderProgChunk
;
1567 SFUnrecShaderProgramChunkPtr
*ClusterShadingStageBase::editSFShaderProgChunk(void)
1569 editSField(ShaderProgChunkFieldMask
);
1571 return &_sfShaderProgChunk
;
1574 //! Get the value of the ClusterShadingStage::_sfShaderProgChunk field.
1575 ShaderProgramChunk
* ClusterShadingStageBase::getShaderProgChunk(void) const
1577 return _sfShaderProgChunk
.getValue();
1580 //! Set the value of the ClusterShadingStage::_sfShaderProgChunk field.
1581 void ClusterShadingStageBase::setShaderProgChunk(ShaderProgramChunk
* const value
)
1583 editSField(ShaderProgChunkFieldMask
);
1585 _sfShaderProgChunk
.setValue(value
);
1593 /*------------------------------ access -----------------------------------*/
1595 SizeT
ClusterShadingStageBase::getBinSize(ConstFieldMaskArg whichField
)
1597 SizeT returnValue
= Inherited::getBinSize(whichField
);
1599 if(FieldBits::NoField
!= (BlockSizeFieldMask
& whichField
))
1601 returnValue
+= _sfBlockSize
.getBinSize();
1603 if(FieldBits::NoField
!= (TileSizeFieldMask
& whichField
))
1605 returnValue
+= _sfTileSize
.getBinSize();
1607 if(FieldBits::NoField
!= (NumClusterZFieldMask
& whichField
))
1609 returnValue
+= _sfNumClusterZ
.getBinSize();
1611 if(FieldBits::NoField
!= (NearPlaneOffsetFieldMask
& whichField
))
1613 returnValue
+= _sfNearPlaneOffset
.getBinSize();
1615 if(FieldBits::NoField
!= (DispatchDataBindingPntFieldMask
& whichField
))
1617 returnValue
+= _sfDispatchDataBindingPnt
.getBinSize();
1619 if(FieldBits::NoField
!= (ClusterDataBindingPntFieldMask
& whichField
))
1621 returnValue
+= _sfClusterDataBindingPnt
.getBinSize();
1623 if(FieldBits::NoField
!= (LightBindingPntFieldMask
& whichField
))
1625 returnValue
+= _sfLightBindingPnt
.getBinSize();
1627 if(FieldBits::NoField
!= (AffectedLightIndexListBindingPntFieldMask
& whichField
))
1629 returnValue
+= _sfAffectedLightIndexListBindingPnt
.getBinSize();
1631 if(FieldBits::NoField
!= (FrustumBindingPntFieldMask
& whichField
))
1633 returnValue
+= _sfFrustumBindingPnt
.getBinSize();
1635 if(FieldBits::NoField
!= (LightIndexListBindingPntFieldMask
& whichField
))
1637 returnValue
+= _sfLightIndexListBindingPnt
.getBinSize();
1639 if(FieldBits::NoField
!= (LightIndexCounterBindingPntFieldMask
& whichField
))
1641 returnValue
+= _sfLightIndexCounterBindingPnt
.getBinSize();
1643 if(FieldBits::NoField
!= (LightGridBindingPntFieldMask
& whichField
))
1645 returnValue
+= _sfLightGridBindingPnt
.getBinSize();
1647 if(FieldBits::NoField
!= (AffectedLightIndexListBlockNameFieldMask
& whichField
))
1649 returnValue
+= _sfAffectedLightIndexListBlockName
.getBinSize();
1651 if(FieldBits::NoField
!= (AffectedLightIndexListVariableNameFieldMask
& whichField
))
1653 returnValue
+= _sfAffectedLightIndexListVariableName
.getBinSize();
1655 if(FieldBits::NoField
!= (LightIndexListBlockNameFieldMask
& whichField
))
1657 returnValue
+= _sfLightIndexListBlockName
.getBinSize();
1659 if(FieldBits::NoField
!= (LightIndexListVariableNameFieldMask
& whichField
))
1661 returnValue
+= _sfLightIndexListVariableName
.getBinSize();
1663 if(FieldBits::NoField
!= (ClusteringDataBlockNameFieldMask
& whichField
))
1665 returnValue
+= _sfClusteringDataBlockName
.getBinSize();
1667 if(FieldBits::NoField
!= (ClusteringDataVariableNameFieldMask
& whichField
))
1669 returnValue
+= _sfClusteringDataVariableName
.getBinSize();
1671 if(FieldBits::NoField
!= (LightGridVariableNameFieldMask
& whichField
))
1673 returnValue
+= _sfLightGridVariableName
.getBinSize();
1675 if(FieldBits::NoField
!= (CalcFrustumsOnCPUFieldMask
& whichField
))
1677 returnValue
+= _sfCalcFrustumsOnCPU
.getBinSize();
1679 if(FieldBits::NoField
!= (CullLighsOnCPUFieldMask
& whichField
))
1681 returnValue
+= _sfCullLighsOnCPU
.getBinSize();
1683 if(FieldBits::NoField
!= (DisabledFieldMask
& whichField
))
1685 returnValue
+= _sfDisabled
.getBinSize();
1687 if(FieldBits::NoField
!= (MaxLightIndexListSizeFieldMask
& whichField
))
1689 returnValue
+= _sfMaxLightIndexListSize
.getBinSize();
1691 if(FieldBits::NoField
!= (MaxClusterLightCountFieldMask
& whichField
))
1693 returnValue
+= _sfMaxClusterLightCount
.getBinSize();
1695 if(FieldBits::NoField
!= (FrustNodeFieldMask
& whichField
))
1697 returnValue
+= _sfFrustNode
.getBinSize();
1699 if(FieldBits::NoField
!= (FrustAlgoElementFieldMask
& whichField
))
1701 returnValue
+= _sfFrustAlgoElement
.getBinSize();
1703 if(FieldBits::NoField
!= (FrustCompShaderAlgoFieldMask
& whichField
))
1705 returnValue
+= _sfFrustCompShaderAlgo
.getBinSize();
1707 if(FieldBits::NoField
!= (CullNodeFieldMask
& whichField
))
1709 returnValue
+= _sfCullNode
.getBinSize();
1711 if(FieldBits::NoField
!= (CullAlgoElementFieldMask
& whichField
))
1713 returnValue
+= _sfCullAlgoElement
.getBinSize();
1715 if(FieldBits::NoField
!= (CullCompShaderAlgoFieldMask
& whichField
))
1717 returnValue
+= _sfCullCompShaderAlgo
.getBinSize();
1719 if(FieldBits::NoField
!= (MultiLightChunkFieldMask
& whichField
))
1721 returnValue
+= _sfMultiLightChunk
.getBinSize();
1723 if(FieldBits::NoField
!= (ShaderProgChunkFieldMask
& whichField
))
1725 returnValue
+= _sfShaderProgChunk
.getBinSize();
1731 void ClusterShadingStageBase::copyToBin(BinaryDataHandler
&pMem
,
1732 ConstFieldMaskArg whichField
)
1734 Inherited::copyToBin(pMem
, whichField
);
1736 if(FieldBits::NoField
!= (BlockSizeFieldMask
& whichField
))
1738 _sfBlockSize
.copyToBin(pMem
);
1740 if(FieldBits::NoField
!= (TileSizeFieldMask
& whichField
))
1742 _sfTileSize
.copyToBin(pMem
);
1744 if(FieldBits::NoField
!= (NumClusterZFieldMask
& whichField
))
1746 _sfNumClusterZ
.copyToBin(pMem
);
1748 if(FieldBits::NoField
!= (NearPlaneOffsetFieldMask
& whichField
))
1750 _sfNearPlaneOffset
.copyToBin(pMem
);
1752 if(FieldBits::NoField
!= (DispatchDataBindingPntFieldMask
& whichField
))
1754 _sfDispatchDataBindingPnt
.copyToBin(pMem
);
1756 if(FieldBits::NoField
!= (ClusterDataBindingPntFieldMask
& whichField
))
1758 _sfClusterDataBindingPnt
.copyToBin(pMem
);
1760 if(FieldBits::NoField
!= (LightBindingPntFieldMask
& whichField
))
1762 _sfLightBindingPnt
.copyToBin(pMem
);
1764 if(FieldBits::NoField
!= (AffectedLightIndexListBindingPntFieldMask
& whichField
))
1766 _sfAffectedLightIndexListBindingPnt
.copyToBin(pMem
);
1768 if(FieldBits::NoField
!= (FrustumBindingPntFieldMask
& whichField
))
1770 _sfFrustumBindingPnt
.copyToBin(pMem
);
1772 if(FieldBits::NoField
!= (LightIndexListBindingPntFieldMask
& whichField
))
1774 _sfLightIndexListBindingPnt
.copyToBin(pMem
);
1776 if(FieldBits::NoField
!= (LightIndexCounterBindingPntFieldMask
& whichField
))
1778 _sfLightIndexCounterBindingPnt
.copyToBin(pMem
);
1780 if(FieldBits::NoField
!= (LightGridBindingPntFieldMask
& whichField
))
1782 _sfLightGridBindingPnt
.copyToBin(pMem
);
1784 if(FieldBits::NoField
!= (AffectedLightIndexListBlockNameFieldMask
& whichField
))
1786 _sfAffectedLightIndexListBlockName
.copyToBin(pMem
);
1788 if(FieldBits::NoField
!= (AffectedLightIndexListVariableNameFieldMask
& whichField
))
1790 _sfAffectedLightIndexListVariableName
.copyToBin(pMem
);
1792 if(FieldBits::NoField
!= (LightIndexListBlockNameFieldMask
& whichField
))
1794 _sfLightIndexListBlockName
.copyToBin(pMem
);
1796 if(FieldBits::NoField
!= (LightIndexListVariableNameFieldMask
& whichField
))
1798 _sfLightIndexListVariableName
.copyToBin(pMem
);
1800 if(FieldBits::NoField
!= (ClusteringDataBlockNameFieldMask
& whichField
))
1802 _sfClusteringDataBlockName
.copyToBin(pMem
);
1804 if(FieldBits::NoField
!= (ClusteringDataVariableNameFieldMask
& whichField
))
1806 _sfClusteringDataVariableName
.copyToBin(pMem
);
1808 if(FieldBits::NoField
!= (LightGridVariableNameFieldMask
& whichField
))
1810 _sfLightGridVariableName
.copyToBin(pMem
);
1812 if(FieldBits::NoField
!= (CalcFrustumsOnCPUFieldMask
& whichField
))
1814 _sfCalcFrustumsOnCPU
.copyToBin(pMem
);
1816 if(FieldBits::NoField
!= (CullLighsOnCPUFieldMask
& whichField
))
1818 _sfCullLighsOnCPU
.copyToBin(pMem
);
1820 if(FieldBits::NoField
!= (DisabledFieldMask
& whichField
))
1822 _sfDisabled
.copyToBin(pMem
);
1824 if(FieldBits::NoField
!= (MaxLightIndexListSizeFieldMask
& whichField
))
1826 _sfMaxLightIndexListSize
.copyToBin(pMem
);
1828 if(FieldBits::NoField
!= (MaxClusterLightCountFieldMask
& whichField
))
1830 _sfMaxClusterLightCount
.copyToBin(pMem
);
1832 if(FieldBits::NoField
!= (FrustNodeFieldMask
& whichField
))
1834 _sfFrustNode
.copyToBin(pMem
);
1836 if(FieldBits::NoField
!= (FrustAlgoElementFieldMask
& whichField
))
1838 _sfFrustAlgoElement
.copyToBin(pMem
);
1840 if(FieldBits::NoField
!= (FrustCompShaderAlgoFieldMask
& whichField
))
1842 _sfFrustCompShaderAlgo
.copyToBin(pMem
);
1844 if(FieldBits::NoField
!= (CullNodeFieldMask
& whichField
))
1846 _sfCullNode
.copyToBin(pMem
);
1848 if(FieldBits::NoField
!= (CullAlgoElementFieldMask
& whichField
))
1850 _sfCullAlgoElement
.copyToBin(pMem
);
1852 if(FieldBits::NoField
!= (CullCompShaderAlgoFieldMask
& whichField
))
1854 _sfCullCompShaderAlgo
.copyToBin(pMem
);
1856 if(FieldBits::NoField
!= (MultiLightChunkFieldMask
& whichField
))
1858 _sfMultiLightChunk
.copyToBin(pMem
);
1860 if(FieldBits::NoField
!= (ShaderProgChunkFieldMask
& whichField
))
1862 _sfShaderProgChunk
.copyToBin(pMem
);
1866 void ClusterShadingStageBase::copyFromBin(BinaryDataHandler
&pMem
,
1867 ConstFieldMaskArg whichField
)
1869 Inherited::copyFromBin(pMem
, whichField
);
1871 if(FieldBits::NoField
!= (BlockSizeFieldMask
& whichField
))
1873 editSField(BlockSizeFieldMask
);
1874 _sfBlockSize
.copyFromBin(pMem
);
1876 if(FieldBits::NoField
!= (TileSizeFieldMask
& whichField
))
1878 editSField(TileSizeFieldMask
);
1879 _sfTileSize
.copyFromBin(pMem
);
1881 if(FieldBits::NoField
!= (NumClusterZFieldMask
& whichField
))
1883 editSField(NumClusterZFieldMask
);
1884 _sfNumClusterZ
.copyFromBin(pMem
);
1886 if(FieldBits::NoField
!= (NearPlaneOffsetFieldMask
& whichField
))
1888 editSField(NearPlaneOffsetFieldMask
);
1889 _sfNearPlaneOffset
.copyFromBin(pMem
);
1891 if(FieldBits::NoField
!= (DispatchDataBindingPntFieldMask
& whichField
))
1893 editSField(DispatchDataBindingPntFieldMask
);
1894 _sfDispatchDataBindingPnt
.copyFromBin(pMem
);
1896 if(FieldBits::NoField
!= (ClusterDataBindingPntFieldMask
& whichField
))
1898 editSField(ClusterDataBindingPntFieldMask
);
1899 _sfClusterDataBindingPnt
.copyFromBin(pMem
);
1901 if(FieldBits::NoField
!= (LightBindingPntFieldMask
& whichField
))
1903 editSField(LightBindingPntFieldMask
);
1904 _sfLightBindingPnt
.copyFromBin(pMem
);
1906 if(FieldBits::NoField
!= (AffectedLightIndexListBindingPntFieldMask
& whichField
))
1908 editSField(AffectedLightIndexListBindingPntFieldMask
);
1909 _sfAffectedLightIndexListBindingPnt
.copyFromBin(pMem
);
1911 if(FieldBits::NoField
!= (FrustumBindingPntFieldMask
& whichField
))
1913 editSField(FrustumBindingPntFieldMask
);
1914 _sfFrustumBindingPnt
.copyFromBin(pMem
);
1916 if(FieldBits::NoField
!= (LightIndexListBindingPntFieldMask
& whichField
))
1918 editSField(LightIndexListBindingPntFieldMask
);
1919 _sfLightIndexListBindingPnt
.copyFromBin(pMem
);
1921 if(FieldBits::NoField
!= (LightIndexCounterBindingPntFieldMask
& whichField
))
1923 editSField(LightIndexCounterBindingPntFieldMask
);
1924 _sfLightIndexCounterBindingPnt
.copyFromBin(pMem
);
1926 if(FieldBits::NoField
!= (LightGridBindingPntFieldMask
& whichField
))
1928 editSField(LightGridBindingPntFieldMask
);
1929 _sfLightGridBindingPnt
.copyFromBin(pMem
);
1931 if(FieldBits::NoField
!= (AffectedLightIndexListBlockNameFieldMask
& whichField
))
1933 editSField(AffectedLightIndexListBlockNameFieldMask
);
1934 _sfAffectedLightIndexListBlockName
.copyFromBin(pMem
);
1936 if(FieldBits::NoField
!= (AffectedLightIndexListVariableNameFieldMask
& whichField
))
1938 editSField(AffectedLightIndexListVariableNameFieldMask
);
1939 _sfAffectedLightIndexListVariableName
.copyFromBin(pMem
);
1941 if(FieldBits::NoField
!= (LightIndexListBlockNameFieldMask
& whichField
))
1943 editSField(LightIndexListBlockNameFieldMask
);
1944 _sfLightIndexListBlockName
.copyFromBin(pMem
);
1946 if(FieldBits::NoField
!= (LightIndexListVariableNameFieldMask
& whichField
))
1948 editSField(LightIndexListVariableNameFieldMask
);
1949 _sfLightIndexListVariableName
.copyFromBin(pMem
);
1951 if(FieldBits::NoField
!= (ClusteringDataBlockNameFieldMask
& whichField
))
1953 editSField(ClusteringDataBlockNameFieldMask
);
1954 _sfClusteringDataBlockName
.copyFromBin(pMem
);
1956 if(FieldBits::NoField
!= (ClusteringDataVariableNameFieldMask
& whichField
))
1958 editSField(ClusteringDataVariableNameFieldMask
);
1959 _sfClusteringDataVariableName
.copyFromBin(pMem
);
1961 if(FieldBits::NoField
!= (LightGridVariableNameFieldMask
& whichField
))
1963 editSField(LightGridVariableNameFieldMask
);
1964 _sfLightGridVariableName
.copyFromBin(pMem
);
1966 if(FieldBits::NoField
!= (CalcFrustumsOnCPUFieldMask
& whichField
))
1968 editSField(CalcFrustumsOnCPUFieldMask
);
1969 _sfCalcFrustumsOnCPU
.copyFromBin(pMem
);
1971 if(FieldBits::NoField
!= (CullLighsOnCPUFieldMask
& whichField
))
1973 editSField(CullLighsOnCPUFieldMask
);
1974 _sfCullLighsOnCPU
.copyFromBin(pMem
);
1976 if(FieldBits::NoField
!= (DisabledFieldMask
& whichField
))
1978 editSField(DisabledFieldMask
);
1979 _sfDisabled
.copyFromBin(pMem
);
1981 if(FieldBits::NoField
!= (MaxLightIndexListSizeFieldMask
& whichField
))
1983 editSField(MaxLightIndexListSizeFieldMask
);
1984 _sfMaxLightIndexListSize
.copyFromBin(pMem
);
1986 if(FieldBits::NoField
!= (MaxClusterLightCountFieldMask
& whichField
))
1988 editSField(MaxClusterLightCountFieldMask
);
1989 _sfMaxClusterLightCount
.copyFromBin(pMem
);
1991 if(FieldBits::NoField
!= (FrustNodeFieldMask
& whichField
))
1993 editSField(FrustNodeFieldMask
);
1994 _sfFrustNode
.copyFromBin(pMem
);
1996 if(FieldBits::NoField
!= (FrustAlgoElementFieldMask
& whichField
))
1998 editSField(FrustAlgoElementFieldMask
);
1999 _sfFrustAlgoElement
.copyFromBin(pMem
);
2001 if(FieldBits::NoField
!= (FrustCompShaderAlgoFieldMask
& whichField
))
2003 editSField(FrustCompShaderAlgoFieldMask
);
2004 _sfFrustCompShaderAlgo
.copyFromBin(pMem
);
2006 if(FieldBits::NoField
!= (CullNodeFieldMask
& whichField
))
2008 editSField(CullNodeFieldMask
);
2009 _sfCullNode
.copyFromBin(pMem
);
2011 if(FieldBits::NoField
!= (CullAlgoElementFieldMask
& whichField
))
2013 editSField(CullAlgoElementFieldMask
);
2014 _sfCullAlgoElement
.copyFromBin(pMem
);
2016 if(FieldBits::NoField
!= (CullCompShaderAlgoFieldMask
& whichField
))
2018 editSField(CullCompShaderAlgoFieldMask
);
2019 _sfCullCompShaderAlgo
.copyFromBin(pMem
);
2021 if(FieldBits::NoField
!= (MultiLightChunkFieldMask
& whichField
))
2023 editSField(MultiLightChunkFieldMask
);
2024 _sfMultiLightChunk
.copyFromBin(pMem
);
2026 if(FieldBits::NoField
!= (ShaderProgChunkFieldMask
& whichField
))
2028 editSField(ShaderProgChunkFieldMask
);
2029 _sfShaderProgChunk
.copyFromBin(pMem
);
2033 //! create a new instance of the class
2034 ClusterShadingStageTransitPtr
ClusterShadingStageBase::createLocal(BitVector bFlags
)
2036 ClusterShadingStageTransitPtr fc
;
2038 if(getClassType().getPrototype() != NULL
)
2040 FieldContainerTransitPtr tmpPtr
=
2041 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
2043 fc
= dynamic_pointer_cast
<ClusterShadingStage
>(tmpPtr
);
2049 //! create a new instance of the class, copy the container flags
2050 ClusterShadingStageTransitPtr
ClusterShadingStageBase::createDependent(BitVector bFlags
)
2052 ClusterShadingStageTransitPtr fc
;
2054 if(getClassType().getPrototype() != NULL
)
2056 FieldContainerTransitPtr tmpPtr
=
2057 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
2059 fc
= dynamic_pointer_cast
<ClusterShadingStage
>(tmpPtr
);
2065 //! create a new instance of the class
2066 ClusterShadingStageTransitPtr
ClusterShadingStageBase::create(void)
2068 ClusterShadingStageTransitPtr fc
;
2070 if(getClassType().getPrototype() != NULL
)
2072 FieldContainerTransitPtr tmpPtr
=
2073 getClassType().getPrototype()-> shallowCopy();
2075 fc
= dynamic_pointer_cast
<ClusterShadingStage
>(tmpPtr
);
2081 ClusterShadingStage
*ClusterShadingStageBase::createEmptyLocal(BitVector bFlags
)
2083 ClusterShadingStage
*returnValue
;
2085 newPtr
<ClusterShadingStage
>(returnValue
, bFlags
);
2087 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
2092 //! create an empty new instance of the class, do not copy the prototype
2093 ClusterShadingStage
*ClusterShadingStageBase::createEmpty(void)
2095 ClusterShadingStage
*returnValue
;
2097 newPtr
<ClusterShadingStage
>(returnValue
, Thread::getCurrentLocalFlags());
2099 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
2100 ~Thread::getCurrentLocalFlags();
2106 FieldContainerTransitPtr
ClusterShadingStageBase::shallowCopyLocal(
2107 BitVector bFlags
) const
2109 ClusterShadingStage
*tmpPtr
;
2111 newPtr(tmpPtr
, dynamic_cast<const ClusterShadingStage
*>(this), bFlags
);
2113 FieldContainerTransitPtr
returnValue(tmpPtr
);
2115 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
2120 FieldContainerTransitPtr
ClusterShadingStageBase::shallowCopyDependent(
2121 BitVector bFlags
) const
2123 ClusterShadingStage
*tmpPtr
;
2125 newPtr(tmpPtr
, dynamic_cast<const ClusterShadingStage
*>(this), ~bFlags
);
2127 FieldContainerTransitPtr
returnValue(tmpPtr
);
2129 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
2134 FieldContainerTransitPtr
ClusterShadingStageBase::shallowCopy(void) const
2136 ClusterShadingStage
*tmpPtr
;
2139 dynamic_cast<const ClusterShadingStage
*>(this),
2140 Thread::getCurrentLocalFlags());
2142 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
2144 FieldContainerTransitPtr
returnValue(tmpPtr
);
2152 /*------------------------- constructors ----------------------------------*/
2154 ClusterShadingStageBase::ClusterShadingStageBase(void) :
2156 _sfBlockSize (UInt32(16)),
2157 _sfTileSize (UInt32(64)),
2158 _sfNumClusterZ (UInt32(32)),
2159 _sfNearPlaneOffset (Real32(5.f
)),
2160 _sfDispatchDataBindingPnt (UInt32(1)),
2161 _sfClusterDataBindingPnt (UInt32(2)),
2162 _sfLightBindingPnt (UInt32(1)),
2163 _sfAffectedLightIndexListBindingPnt(UInt32(2)),
2164 _sfFrustumBindingPnt (UInt32(3)),
2165 _sfLightIndexListBindingPnt(UInt32(4)),
2166 _sfLightIndexCounterBindingPnt(UInt32(5)),
2167 _sfLightGridBindingPnt (UInt32(0)),
2168 _sfAffectedLightIndexListBlockName(std::string("AffectedLightIndexList")),
2169 _sfAffectedLightIndexListVariableName(std::string("affectedLightIndexList")),
2170 _sfLightIndexListBlockName(std::string("LightIndexList")),
2171 _sfLightIndexListVariableName(std::string("lightIndexList")),
2172 _sfClusteringDataBlockName(std::string("ClusteringData")),
2173 _sfClusteringDataVariableName(std::string("clusteringData")),
2174 _sfLightGridVariableName (std::string("light_grid")),
2175 _sfCalcFrustumsOnCPU (bool(false)),
2176 _sfCullLighsOnCPU (bool(false)),
2177 _sfDisabled (bool(false)),
2178 _sfMaxLightIndexListSize (UInt32(2097152)),
2179 _sfMaxClusterLightCount (UInt32(1024)),
2180 _sfFrustNode (NULL
),
2181 _sfFrustAlgoElement (NULL
),
2182 _sfFrustCompShaderAlgo (NULL
),
2184 _sfCullAlgoElement (NULL
),
2185 _sfCullCompShaderAlgo (NULL
),
2186 _sfMultiLightChunk (NULL
),
2187 _sfShaderProgChunk (NULL
)
2191 ClusterShadingStageBase::ClusterShadingStageBase(const ClusterShadingStageBase
&source
) :
2193 _sfBlockSize (source
._sfBlockSize
),
2194 _sfTileSize (source
._sfTileSize
),
2195 _sfNumClusterZ (source
._sfNumClusterZ
),
2196 _sfNearPlaneOffset (source
._sfNearPlaneOffset
),
2197 _sfDispatchDataBindingPnt (source
._sfDispatchDataBindingPnt
),
2198 _sfClusterDataBindingPnt (source
._sfClusterDataBindingPnt
),
2199 _sfLightBindingPnt (source
._sfLightBindingPnt
),
2200 _sfAffectedLightIndexListBindingPnt(source
._sfAffectedLightIndexListBindingPnt
),
2201 _sfFrustumBindingPnt (source
._sfFrustumBindingPnt
),
2202 _sfLightIndexListBindingPnt(source
._sfLightIndexListBindingPnt
),
2203 _sfLightIndexCounterBindingPnt(source
._sfLightIndexCounterBindingPnt
),
2204 _sfLightGridBindingPnt (source
._sfLightGridBindingPnt
),
2205 _sfAffectedLightIndexListBlockName(source
._sfAffectedLightIndexListBlockName
),
2206 _sfAffectedLightIndexListVariableName(source
._sfAffectedLightIndexListVariableName
),
2207 _sfLightIndexListBlockName(source
._sfLightIndexListBlockName
),
2208 _sfLightIndexListVariableName(source
._sfLightIndexListVariableName
),
2209 _sfClusteringDataBlockName(source
._sfClusteringDataBlockName
),
2210 _sfClusteringDataVariableName(source
._sfClusteringDataVariableName
),
2211 _sfLightGridVariableName (source
._sfLightGridVariableName
),
2212 _sfCalcFrustumsOnCPU (source
._sfCalcFrustumsOnCPU
),
2213 _sfCullLighsOnCPU (source
._sfCullLighsOnCPU
),
2214 _sfDisabled (source
._sfDisabled
),
2215 _sfMaxLightIndexListSize (source
._sfMaxLightIndexListSize
),
2216 _sfMaxClusterLightCount (source
._sfMaxClusterLightCount
),
2217 _sfFrustNode (NULL
),
2218 _sfFrustAlgoElement (NULL
),
2219 _sfFrustCompShaderAlgo (NULL
),
2221 _sfCullAlgoElement (NULL
),
2222 _sfCullCompShaderAlgo (NULL
),
2223 _sfMultiLightChunk (NULL
),
2224 _sfShaderProgChunk (NULL
)
2229 /*-------------------------- destructors ----------------------------------*/
2231 ClusterShadingStageBase::~ClusterShadingStageBase(void)
2235 void ClusterShadingStageBase::onCreate(const ClusterShadingStage
*source
)
2237 Inherited::onCreate(source
);
2241 ClusterShadingStage
*pThis
= static_cast<ClusterShadingStage
*>(this);
2243 pThis
->setFrustNode(source
->getFrustNode());
2245 pThis
->setFrustAlgoElement(source
->getFrustAlgoElement());
2247 pThis
->setFrustCompShaderAlgo(source
->getFrustCompShaderAlgo());
2249 pThis
->setCullNode(source
->getCullNode());
2251 pThis
->setCullAlgoElement(source
->getCullAlgoElement());
2253 pThis
->setCullCompShaderAlgo(source
->getCullCompShaderAlgo());
2255 pThis
->setMultiLightChunk(source
->getMultiLightChunk());
2257 pThis
->setShaderProgChunk(source
->getShaderProgChunk());
2261 GetFieldHandlePtr
ClusterShadingStageBase::getHandleBlockSize (void) const
2263 SFUInt32::GetHandlePtr
returnValue(
2264 new SFUInt32::GetHandle(
2266 this->getType().getFieldDesc(BlockSizeFieldId
),
2267 const_cast<ClusterShadingStageBase
*>(this)));
2272 EditFieldHandlePtr
ClusterShadingStageBase::editHandleBlockSize (void)
2274 SFUInt32::EditHandlePtr
returnValue(
2275 new SFUInt32::EditHandle(
2277 this->getType().getFieldDesc(BlockSizeFieldId
),
2281 editSField(BlockSizeFieldMask
);
2286 GetFieldHandlePtr
ClusterShadingStageBase::getHandleTileSize (void) const
2288 SFUInt32::GetHandlePtr
returnValue(
2289 new SFUInt32::GetHandle(
2291 this->getType().getFieldDesc(TileSizeFieldId
),
2292 const_cast<ClusterShadingStageBase
*>(this)));
2297 EditFieldHandlePtr
ClusterShadingStageBase::editHandleTileSize (void)
2299 SFUInt32::EditHandlePtr
returnValue(
2300 new SFUInt32::EditHandle(
2302 this->getType().getFieldDesc(TileSizeFieldId
),
2306 editSField(TileSizeFieldMask
);
2311 GetFieldHandlePtr
ClusterShadingStageBase::getHandleNumClusterZ (void) const
2313 SFUInt32::GetHandlePtr
returnValue(
2314 new SFUInt32::GetHandle(
2316 this->getType().getFieldDesc(NumClusterZFieldId
),
2317 const_cast<ClusterShadingStageBase
*>(this)));
2322 EditFieldHandlePtr
ClusterShadingStageBase::editHandleNumClusterZ (void)
2324 SFUInt32::EditHandlePtr
returnValue(
2325 new SFUInt32::EditHandle(
2327 this->getType().getFieldDesc(NumClusterZFieldId
),
2331 editSField(NumClusterZFieldMask
);
2336 GetFieldHandlePtr
ClusterShadingStageBase::getHandleNearPlaneOffset (void) const
2338 SFReal32::GetHandlePtr
returnValue(
2339 new SFReal32::GetHandle(
2340 &_sfNearPlaneOffset
,
2341 this->getType().getFieldDesc(NearPlaneOffsetFieldId
),
2342 const_cast<ClusterShadingStageBase
*>(this)));
2347 EditFieldHandlePtr
ClusterShadingStageBase::editHandleNearPlaneOffset(void)
2349 SFReal32::EditHandlePtr
returnValue(
2350 new SFReal32::EditHandle(
2351 &_sfNearPlaneOffset
,
2352 this->getType().getFieldDesc(NearPlaneOffsetFieldId
),
2356 editSField(NearPlaneOffsetFieldMask
);
2361 GetFieldHandlePtr
ClusterShadingStageBase::getHandleDispatchDataBindingPnt (void) const
2363 SFUInt32::GetHandlePtr
returnValue(
2364 new SFUInt32::GetHandle(
2365 &_sfDispatchDataBindingPnt
,
2366 this->getType().getFieldDesc(DispatchDataBindingPntFieldId
),
2367 const_cast<ClusterShadingStageBase
*>(this)));
2372 EditFieldHandlePtr
ClusterShadingStageBase::editHandleDispatchDataBindingPnt(void)
2374 SFUInt32::EditHandlePtr
returnValue(
2375 new SFUInt32::EditHandle(
2376 &_sfDispatchDataBindingPnt
,
2377 this->getType().getFieldDesc(DispatchDataBindingPntFieldId
),
2381 editSField(DispatchDataBindingPntFieldMask
);
2386 GetFieldHandlePtr
ClusterShadingStageBase::getHandleClusterDataBindingPnt (void) const
2388 SFUInt32::GetHandlePtr
returnValue(
2389 new SFUInt32::GetHandle(
2390 &_sfClusterDataBindingPnt
,
2391 this->getType().getFieldDesc(ClusterDataBindingPntFieldId
),
2392 const_cast<ClusterShadingStageBase
*>(this)));
2397 EditFieldHandlePtr
ClusterShadingStageBase::editHandleClusterDataBindingPnt(void)
2399 SFUInt32::EditHandlePtr
returnValue(
2400 new SFUInt32::EditHandle(
2401 &_sfClusterDataBindingPnt
,
2402 this->getType().getFieldDesc(ClusterDataBindingPntFieldId
),
2406 editSField(ClusterDataBindingPntFieldMask
);
2411 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightBindingPnt (void) const
2413 SFUInt32::GetHandlePtr
returnValue(
2414 new SFUInt32::GetHandle(
2415 &_sfLightBindingPnt
,
2416 this->getType().getFieldDesc(LightBindingPntFieldId
),
2417 const_cast<ClusterShadingStageBase
*>(this)));
2422 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightBindingPnt(void)
2424 SFUInt32::EditHandlePtr
returnValue(
2425 new SFUInt32::EditHandle(
2426 &_sfLightBindingPnt
,
2427 this->getType().getFieldDesc(LightBindingPntFieldId
),
2431 editSField(LightBindingPntFieldMask
);
2436 GetFieldHandlePtr
ClusterShadingStageBase::getHandleAffectedLightIndexListBindingPnt (void) const
2438 SFUInt32::GetHandlePtr
returnValue(
2439 new SFUInt32::GetHandle(
2440 &_sfAffectedLightIndexListBindingPnt
,
2441 this->getType().getFieldDesc(AffectedLightIndexListBindingPntFieldId
),
2442 const_cast<ClusterShadingStageBase
*>(this)));
2447 EditFieldHandlePtr
ClusterShadingStageBase::editHandleAffectedLightIndexListBindingPnt(void)
2449 SFUInt32::EditHandlePtr
returnValue(
2450 new SFUInt32::EditHandle(
2451 &_sfAffectedLightIndexListBindingPnt
,
2452 this->getType().getFieldDesc(AffectedLightIndexListBindingPntFieldId
),
2456 editSField(AffectedLightIndexListBindingPntFieldMask
);
2461 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustumBindingPnt (void) const
2463 SFUInt32::GetHandlePtr
returnValue(
2464 new SFUInt32::GetHandle(
2465 &_sfFrustumBindingPnt
,
2466 this->getType().getFieldDesc(FrustumBindingPntFieldId
),
2467 const_cast<ClusterShadingStageBase
*>(this)));
2472 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustumBindingPnt(void)
2474 SFUInt32::EditHandlePtr
returnValue(
2475 new SFUInt32::EditHandle(
2476 &_sfFrustumBindingPnt
,
2477 this->getType().getFieldDesc(FrustumBindingPntFieldId
),
2481 editSField(FrustumBindingPntFieldMask
);
2486 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexListBindingPnt (void) const
2488 SFUInt32::GetHandlePtr
returnValue(
2489 new SFUInt32::GetHandle(
2490 &_sfLightIndexListBindingPnt
,
2491 this->getType().getFieldDesc(LightIndexListBindingPntFieldId
),
2492 const_cast<ClusterShadingStageBase
*>(this)));
2497 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexListBindingPnt(void)
2499 SFUInt32::EditHandlePtr
returnValue(
2500 new SFUInt32::EditHandle(
2501 &_sfLightIndexListBindingPnt
,
2502 this->getType().getFieldDesc(LightIndexListBindingPntFieldId
),
2506 editSField(LightIndexListBindingPntFieldMask
);
2511 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexCounterBindingPnt (void) const
2513 SFUInt32::GetHandlePtr
returnValue(
2514 new SFUInt32::GetHandle(
2515 &_sfLightIndexCounterBindingPnt
,
2516 this->getType().getFieldDesc(LightIndexCounterBindingPntFieldId
),
2517 const_cast<ClusterShadingStageBase
*>(this)));
2522 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexCounterBindingPnt(void)
2524 SFUInt32::EditHandlePtr
returnValue(
2525 new SFUInt32::EditHandle(
2526 &_sfLightIndexCounterBindingPnt
,
2527 this->getType().getFieldDesc(LightIndexCounterBindingPntFieldId
),
2531 editSField(LightIndexCounterBindingPntFieldMask
);
2536 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightGridBindingPnt (void) const
2538 SFUInt32::GetHandlePtr
returnValue(
2539 new SFUInt32::GetHandle(
2540 &_sfLightGridBindingPnt
,
2541 this->getType().getFieldDesc(LightGridBindingPntFieldId
),
2542 const_cast<ClusterShadingStageBase
*>(this)));
2547 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightGridBindingPnt(void)
2549 SFUInt32::EditHandlePtr
returnValue(
2550 new SFUInt32::EditHandle(
2551 &_sfLightGridBindingPnt
,
2552 this->getType().getFieldDesc(LightGridBindingPntFieldId
),
2556 editSField(LightGridBindingPntFieldMask
);
2561 GetFieldHandlePtr
ClusterShadingStageBase::getHandleAffectedLightIndexListBlockName (void) const
2563 SFString::GetHandlePtr
returnValue(
2564 new SFString::GetHandle(
2565 &_sfAffectedLightIndexListBlockName
,
2566 this->getType().getFieldDesc(AffectedLightIndexListBlockNameFieldId
),
2567 const_cast<ClusterShadingStageBase
*>(this)));
2572 EditFieldHandlePtr
ClusterShadingStageBase::editHandleAffectedLightIndexListBlockName(void)
2574 SFString::EditHandlePtr
returnValue(
2575 new SFString::EditHandle(
2576 &_sfAffectedLightIndexListBlockName
,
2577 this->getType().getFieldDesc(AffectedLightIndexListBlockNameFieldId
),
2581 editSField(AffectedLightIndexListBlockNameFieldMask
);
2586 GetFieldHandlePtr
ClusterShadingStageBase::getHandleAffectedLightIndexListVariableName (void) const
2588 SFString::GetHandlePtr
returnValue(
2589 new SFString::GetHandle(
2590 &_sfAffectedLightIndexListVariableName
,
2591 this->getType().getFieldDesc(AffectedLightIndexListVariableNameFieldId
),
2592 const_cast<ClusterShadingStageBase
*>(this)));
2597 EditFieldHandlePtr
ClusterShadingStageBase::editHandleAffectedLightIndexListVariableName(void)
2599 SFString::EditHandlePtr
returnValue(
2600 new SFString::EditHandle(
2601 &_sfAffectedLightIndexListVariableName
,
2602 this->getType().getFieldDesc(AffectedLightIndexListVariableNameFieldId
),
2606 editSField(AffectedLightIndexListVariableNameFieldMask
);
2611 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexListBlockName (void) const
2613 SFString::GetHandlePtr
returnValue(
2614 new SFString::GetHandle(
2615 &_sfLightIndexListBlockName
,
2616 this->getType().getFieldDesc(LightIndexListBlockNameFieldId
),
2617 const_cast<ClusterShadingStageBase
*>(this)));
2622 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexListBlockName(void)
2624 SFString::EditHandlePtr
returnValue(
2625 new SFString::EditHandle(
2626 &_sfLightIndexListBlockName
,
2627 this->getType().getFieldDesc(LightIndexListBlockNameFieldId
),
2631 editSField(LightIndexListBlockNameFieldMask
);
2636 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightIndexListVariableName (void) const
2638 SFString::GetHandlePtr
returnValue(
2639 new SFString::GetHandle(
2640 &_sfLightIndexListVariableName
,
2641 this->getType().getFieldDesc(LightIndexListVariableNameFieldId
),
2642 const_cast<ClusterShadingStageBase
*>(this)));
2647 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightIndexListVariableName(void)
2649 SFString::EditHandlePtr
returnValue(
2650 new SFString::EditHandle(
2651 &_sfLightIndexListVariableName
,
2652 this->getType().getFieldDesc(LightIndexListVariableNameFieldId
),
2656 editSField(LightIndexListVariableNameFieldMask
);
2661 GetFieldHandlePtr
ClusterShadingStageBase::getHandleClusteringDataBlockName (void) const
2663 SFString::GetHandlePtr
returnValue(
2664 new SFString::GetHandle(
2665 &_sfClusteringDataBlockName
,
2666 this->getType().getFieldDesc(ClusteringDataBlockNameFieldId
),
2667 const_cast<ClusterShadingStageBase
*>(this)));
2672 EditFieldHandlePtr
ClusterShadingStageBase::editHandleClusteringDataBlockName(void)
2674 SFString::EditHandlePtr
returnValue(
2675 new SFString::EditHandle(
2676 &_sfClusteringDataBlockName
,
2677 this->getType().getFieldDesc(ClusteringDataBlockNameFieldId
),
2681 editSField(ClusteringDataBlockNameFieldMask
);
2686 GetFieldHandlePtr
ClusterShadingStageBase::getHandleClusteringDataVariableName (void) const
2688 SFString::GetHandlePtr
returnValue(
2689 new SFString::GetHandle(
2690 &_sfClusteringDataVariableName
,
2691 this->getType().getFieldDesc(ClusteringDataVariableNameFieldId
),
2692 const_cast<ClusterShadingStageBase
*>(this)));
2697 EditFieldHandlePtr
ClusterShadingStageBase::editHandleClusteringDataVariableName(void)
2699 SFString::EditHandlePtr
returnValue(
2700 new SFString::EditHandle(
2701 &_sfClusteringDataVariableName
,
2702 this->getType().getFieldDesc(ClusteringDataVariableNameFieldId
),
2706 editSField(ClusteringDataVariableNameFieldMask
);
2711 GetFieldHandlePtr
ClusterShadingStageBase::getHandleLightGridVariableName (void) const
2713 SFString::GetHandlePtr
returnValue(
2714 new SFString::GetHandle(
2715 &_sfLightGridVariableName
,
2716 this->getType().getFieldDesc(LightGridVariableNameFieldId
),
2717 const_cast<ClusterShadingStageBase
*>(this)));
2722 EditFieldHandlePtr
ClusterShadingStageBase::editHandleLightGridVariableName(void)
2724 SFString::EditHandlePtr
returnValue(
2725 new SFString::EditHandle(
2726 &_sfLightGridVariableName
,
2727 this->getType().getFieldDesc(LightGridVariableNameFieldId
),
2731 editSField(LightGridVariableNameFieldMask
);
2736 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCalcFrustumsOnCPU (void) const
2738 SFBool::GetHandlePtr
returnValue(
2739 new SFBool::GetHandle(
2740 &_sfCalcFrustumsOnCPU
,
2741 this->getType().getFieldDesc(CalcFrustumsOnCPUFieldId
),
2742 const_cast<ClusterShadingStageBase
*>(this)));
2747 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCalcFrustumsOnCPU(void)
2749 SFBool::EditHandlePtr
returnValue(
2750 new SFBool::EditHandle(
2751 &_sfCalcFrustumsOnCPU
,
2752 this->getType().getFieldDesc(CalcFrustumsOnCPUFieldId
),
2756 editSField(CalcFrustumsOnCPUFieldMask
);
2761 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullLighsOnCPU (void) const
2763 SFBool::GetHandlePtr
returnValue(
2764 new SFBool::GetHandle(
2766 this->getType().getFieldDesc(CullLighsOnCPUFieldId
),
2767 const_cast<ClusterShadingStageBase
*>(this)));
2772 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullLighsOnCPU (void)
2774 SFBool::EditHandlePtr
returnValue(
2775 new SFBool::EditHandle(
2777 this->getType().getFieldDesc(CullLighsOnCPUFieldId
),
2781 editSField(CullLighsOnCPUFieldMask
);
2786 GetFieldHandlePtr
ClusterShadingStageBase::getHandleDisabled (void) const
2788 SFBool::GetHandlePtr
returnValue(
2789 new SFBool::GetHandle(
2791 this->getType().getFieldDesc(DisabledFieldId
),
2792 const_cast<ClusterShadingStageBase
*>(this)));
2797 EditFieldHandlePtr
ClusterShadingStageBase::editHandleDisabled (void)
2799 SFBool::EditHandlePtr
returnValue(
2800 new SFBool::EditHandle(
2802 this->getType().getFieldDesc(DisabledFieldId
),
2806 editSField(DisabledFieldMask
);
2811 GetFieldHandlePtr
ClusterShadingStageBase::getHandleMaxLightIndexListSize (void) const
2813 SFUInt32::GetHandlePtr
returnValue(
2814 new SFUInt32::GetHandle(
2815 &_sfMaxLightIndexListSize
,
2816 this->getType().getFieldDesc(MaxLightIndexListSizeFieldId
),
2817 const_cast<ClusterShadingStageBase
*>(this)));
2822 EditFieldHandlePtr
ClusterShadingStageBase::editHandleMaxLightIndexListSize(void)
2824 SFUInt32::EditHandlePtr
returnValue(
2825 new SFUInt32::EditHandle(
2826 &_sfMaxLightIndexListSize
,
2827 this->getType().getFieldDesc(MaxLightIndexListSizeFieldId
),
2831 editSField(MaxLightIndexListSizeFieldMask
);
2836 GetFieldHandlePtr
ClusterShadingStageBase::getHandleMaxClusterLightCount (void) const
2838 SFUInt32::GetHandlePtr
returnValue(
2839 new SFUInt32::GetHandle(
2840 &_sfMaxClusterLightCount
,
2841 this->getType().getFieldDesc(MaxClusterLightCountFieldId
),
2842 const_cast<ClusterShadingStageBase
*>(this)));
2847 EditFieldHandlePtr
ClusterShadingStageBase::editHandleMaxClusterLightCount(void)
2849 SFUInt32::EditHandlePtr
returnValue(
2850 new SFUInt32::EditHandle(
2851 &_sfMaxClusterLightCount
,
2852 this->getType().getFieldDesc(MaxClusterLightCountFieldId
),
2856 editSField(MaxClusterLightCountFieldMask
);
2861 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustNode (void) const
2863 SFUnrecNodePtr::GetHandlePtr
returnValue(
2864 new SFUnrecNodePtr::GetHandle(
2866 this->getType().getFieldDesc(FrustNodeFieldId
),
2867 const_cast<ClusterShadingStageBase
*>(this)));
2872 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustNode (void)
2874 SFUnrecNodePtr::EditHandlePtr
returnValue(
2875 new SFUnrecNodePtr::EditHandle(
2877 this->getType().getFieldDesc(FrustNodeFieldId
),
2880 returnValue
->setSetMethod(
2881 boost::bind(&ClusterShadingStage::setFrustNode
,
2882 static_cast<ClusterShadingStage
*>(this), _1
));
2884 editSField(FrustNodeFieldMask
);
2889 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustAlgoElement (void) const
2891 SFUnrecAlgorithmComputeElementPtr::GetHandlePtr
returnValue(
2892 new SFUnrecAlgorithmComputeElementPtr::GetHandle(
2893 &_sfFrustAlgoElement
,
2894 this->getType().getFieldDesc(FrustAlgoElementFieldId
),
2895 const_cast<ClusterShadingStageBase
*>(this)));
2900 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustAlgoElement(void)
2902 SFUnrecAlgorithmComputeElementPtr::EditHandlePtr
returnValue(
2903 new SFUnrecAlgorithmComputeElementPtr::EditHandle(
2904 &_sfFrustAlgoElement
,
2905 this->getType().getFieldDesc(FrustAlgoElementFieldId
),
2908 returnValue
->setSetMethod(
2909 boost::bind(&ClusterShadingStage::setFrustAlgoElement
,
2910 static_cast<ClusterShadingStage
*>(this), _1
));
2912 editSField(FrustAlgoElementFieldMask
);
2917 GetFieldHandlePtr
ClusterShadingStageBase::getHandleFrustCompShaderAlgo (void) const
2919 SFUnrecComputeShaderAlgorithmPtr::GetHandlePtr
returnValue(
2920 new SFUnrecComputeShaderAlgorithmPtr::GetHandle(
2921 &_sfFrustCompShaderAlgo
,
2922 this->getType().getFieldDesc(FrustCompShaderAlgoFieldId
),
2923 const_cast<ClusterShadingStageBase
*>(this)));
2928 EditFieldHandlePtr
ClusterShadingStageBase::editHandleFrustCompShaderAlgo(void)
2930 SFUnrecComputeShaderAlgorithmPtr::EditHandlePtr
returnValue(
2931 new SFUnrecComputeShaderAlgorithmPtr::EditHandle(
2932 &_sfFrustCompShaderAlgo
,
2933 this->getType().getFieldDesc(FrustCompShaderAlgoFieldId
),
2936 returnValue
->setSetMethod(
2937 boost::bind(&ClusterShadingStage::setFrustCompShaderAlgo
,
2938 static_cast<ClusterShadingStage
*>(this), _1
));
2940 editSField(FrustCompShaderAlgoFieldMask
);
2945 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullNode (void) const
2947 SFUnrecNodePtr::GetHandlePtr
returnValue(
2948 new SFUnrecNodePtr::GetHandle(
2950 this->getType().getFieldDesc(CullNodeFieldId
),
2951 const_cast<ClusterShadingStageBase
*>(this)));
2956 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullNode (void)
2958 SFUnrecNodePtr::EditHandlePtr
returnValue(
2959 new SFUnrecNodePtr::EditHandle(
2961 this->getType().getFieldDesc(CullNodeFieldId
),
2964 returnValue
->setSetMethod(
2965 boost::bind(&ClusterShadingStage::setCullNode
,
2966 static_cast<ClusterShadingStage
*>(this), _1
));
2968 editSField(CullNodeFieldMask
);
2973 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullAlgoElement (void) const
2975 SFUnrecAlgorithmComputeElementPtr::GetHandlePtr
returnValue(
2976 new SFUnrecAlgorithmComputeElementPtr::GetHandle(
2977 &_sfCullAlgoElement
,
2978 this->getType().getFieldDesc(CullAlgoElementFieldId
),
2979 const_cast<ClusterShadingStageBase
*>(this)));
2984 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullAlgoElement(void)
2986 SFUnrecAlgorithmComputeElementPtr::EditHandlePtr
returnValue(
2987 new SFUnrecAlgorithmComputeElementPtr::EditHandle(
2988 &_sfCullAlgoElement
,
2989 this->getType().getFieldDesc(CullAlgoElementFieldId
),
2992 returnValue
->setSetMethod(
2993 boost::bind(&ClusterShadingStage::setCullAlgoElement
,
2994 static_cast<ClusterShadingStage
*>(this), _1
));
2996 editSField(CullAlgoElementFieldMask
);
3001 GetFieldHandlePtr
ClusterShadingStageBase::getHandleCullCompShaderAlgo (void) const
3003 SFUnrecComputeShaderAlgorithmPtr::GetHandlePtr
returnValue(
3004 new SFUnrecComputeShaderAlgorithmPtr::GetHandle(
3005 &_sfCullCompShaderAlgo
,
3006 this->getType().getFieldDesc(CullCompShaderAlgoFieldId
),
3007 const_cast<ClusterShadingStageBase
*>(this)));
3012 EditFieldHandlePtr
ClusterShadingStageBase::editHandleCullCompShaderAlgo(void)
3014 SFUnrecComputeShaderAlgorithmPtr::EditHandlePtr
returnValue(
3015 new SFUnrecComputeShaderAlgorithmPtr::EditHandle(
3016 &_sfCullCompShaderAlgo
,
3017 this->getType().getFieldDesc(CullCompShaderAlgoFieldId
),
3020 returnValue
->setSetMethod(
3021 boost::bind(&ClusterShadingStage::setCullCompShaderAlgo
,
3022 static_cast<ClusterShadingStage
*>(this), _1
));
3024 editSField(CullCompShaderAlgoFieldMask
);
3029 GetFieldHandlePtr
ClusterShadingStageBase::getHandleMultiLightChunk (void) const
3031 SFUnrecMultiLightChunkPtr::GetHandlePtr
returnValue(
3032 new SFUnrecMultiLightChunkPtr::GetHandle(
3033 &_sfMultiLightChunk
,
3034 this->getType().getFieldDesc(MultiLightChunkFieldId
),
3035 const_cast<ClusterShadingStageBase
*>(this)));
3040 EditFieldHandlePtr
ClusterShadingStageBase::editHandleMultiLightChunk(void)
3042 SFUnrecMultiLightChunkPtr::EditHandlePtr
returnValue(
3043 new SFUnrecMultiLightChunkPtr::EditHandle(
3044 &_sfMultiLightChunk
,
3045 this->getType().getFieldDesc(MultiLightChunkFieldId
),
3048 returnValue
->setSetMethod(
3049 boost::bind(&ClusterShadingStage::setMultiLightChunk
,
3050 static_cast<ClusterShadingStage
*>(this), _1
));
3052 editSField(MultiLightChunkFieldMask
);
3057 GetFieldHandlePtr
ClusterShadingStageBase::getHandleShaderProgChunk (void) const
3059 SFUnrecShaderProgramChunkPtr::GetHandlePtr
returnValue(
3060 new SFUnrecShaderProgramChunkPtr::GetHandle(
3061 &_sfShaderProgChunk
,
3062 this->getType().getFieldDesc(ShaderProgChunkFieldId
),
3063 const_cast<ClusterShadingStageBase
*>(this)));
3068 EditFieldHandlePtr
ClusterShadingStageBase::editHandleShaderProgChunk(void)
3070 SFUnrecShaderProgramChunkPtr::EditHandlePtr
returnValue(
3071 new SFUnrecShaderProgramChunkPtr::EditHandle(
3072 &_sfShaderProgChunk
,
3073 this->getType().getFieldDesc(ShaderProgChunkFieldId
),
3076 returnValue
->setSetMethod(
3077 boost::bind(&ClusterShadingStage::setShaderProgChunk
,
3078 static_cast<ClusterShadingStage
*>(this), _1
));
3080 editSField(ShaderProgChunkFieldMask
);
3086 #ifdef OSG_MT_CPTR_ASPECT
3087 void ClusterShadingStageBase::execSyncV( FieldContainer
&oFrom
,
3088 ConstFieldMaskArg whichField
,
3089 AspectOffsetStore
&oOffsets
,
3090 ConstFieldMaskArg syncMode
,
3091 const UInt32 uiSyncInfo
)
3093 ClusterShadingStage
*pThis
= static_cast<ClusterShadingStage
*>(this);
3095 pThis
->execSync(static_cast<ClusterShadingStage
*>(&oFrom
),
3104 #ifdef OSG_MT_CPTR_ASPECT
3105 FieldContainer
*ClusterShadingStageBase::createAspectCopy(
3106 const FieldContainer
*pRefAspect
) const
3108 ClusterShadingStage
*returnValue
;
3110 newAspectCopy(returnValue
,
3111 dynamic_cast<const ClusterShadingStage
*>(pRefAspect
),
3112 dynamic_cast<const ClusterShadingStage
*>(this));
3118 void ClusterShadingStageBase::resolveLinks(void)
3120 Inherited::resolveLinks();
3122 static_cast<ClusterShadingStage
*>(this)->setFrustNode(NULL
);
3124 static_cast<ClusterShadingStage
*>(this)->setFrustAlgoElement(NULL
);
3126 static_cast<ClusterShadingStage
*>(this)->setFrustCompShaderAlgo(NULL
);
3128 static_cast<ClusterShadingStage
*>(this)->setCullNode(NULL
);
3130 static_cast<ClusterShadingStage
*>(this)->setCullAlgoElement(NULL
);
3132 static_cast<ClusterShadingStage
*>(this)->setCullCompShaderAlgo(NULL
);
3134 static_cast<ClusterShadingStage
*>(this)->setMultiLightChunk(NULL
);
3136 static_cast<ClusterShadingStage
*>(this)->setShaderProgChunk(NULL
);