PySide6.Qt3DRender.Qt3DRender.QRenderPass¶
- class QRenderPass¶
- Encapsulates a Render Pass. More… - Synopsis¶- Properties¶- Methods¶- def - __init__()
- def - addFilterKey()
- def - addParameter()
- def - addRenderState()
- def - filterKeys()
- def - parameters()
- def - renderStates()
- def - shaderProgram()
 - Slots¶- Signals¶- Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- A - QRenderPassspecifies a single rendering pass - an instance of shader program execution - used by- QTechnique. Render pass consists of a- QShaderProgramand a list of- QFilterKeyobjects, a list of- QRenderStateobjects and a list of- QParameterobjects.- QRenderPassexecutes the- QShaderProgramusing the given- QRenderStateand- QParameternodes when at least one of- QFilterKeynodes being referenced matches any of the- QFilterKeynodes in- QRenderPassFilteror when no- QFilterKeynodes are specified and no- QRenderPassFilteris present in the FrameGraph.- If the - QRenderPassdefines a- QParameter, it will be overridden by a- QParameterwith the same name if it exists in any of the- QTechnique,- QEffect,- QMaterial,- QTechniqueFilter,- QRenderPassFilterassociated with the pass at runtime. This still can be useful to define sane default values.- At render time, for each leaf node of the FrameGraph a base render state is recorded by accumulating states defined by all - QRenderStateSetnodes in the FrameGraph branch. Each- QRenderPasscan overload this base render state by specifying its own- QRenderStatenodes.- // Create the render passes QRenderPass *pass = new QRenderPass(); // Create shader program QShaderProgram *glShader = new QShaderProgram(); // Set the shader on the render pass pass->setShaderProgram(glShader); // Create a FilterKey QFilterKey *filterKey = new QFilterKey(); filterKey->setName(QStringLiteral("name")); fitlerKey->setValue(QStringLiteral("zFillPass")); // Add the FilterKey to the pass pass->addFilterKey(filterKey); // Create a QParameter QParameter *colorParameter = new QParameter(QStringLiteral("color"), QColor::fromRgbF(0.0f, 0.0f, 1.0f, 1.0f)); // Add parameter to pass pass->addParameter(colorParameter); // Create a QRenderState QDepthTest *depthTest = new QDepthTest(); // Add the render state to the pass pass->addRenderState(depthTest); - See also - QRenderPassFilter- QFilterKey- QParameter- QRenderState- QEffect- QTechnique- Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property shaderProgramᅟ: QShaderProgram¶
 - Specifies the shader program to be used for this render pass. - Access functions:
 - __init__([parent=None])¶
- Parameters:
- parent – - QNode
 
 - Constructs a new - QRenderPasswith the specified- parent.- addFilterKey(filterKey)¶
- Parameters:
- filterKey – - QFilterKey
 
 - Adds - filterKeyto the- QRenderPasslocal filter keys.- addParameter(p)¶
- Parameters:
- p – - QParameter
 
 - Add - parameterto the render pass’ parameters.- addRenderState(state)¶
- Parameters:
- state – - QRenderState
 
 - Adds a render - stateto the rendering pass. That implies that when the pass is executed at render time, the globally set render state will be modified by the states defined locally by the- QRenderPass.- Note - not defining any - QRenderStatein a pass will result in the pass using the globally set render state for a given FrameGraph branch execution path.- filterKeys()¶
- Return type:
- .list of Qt3DRender.QFilterKey 
 
 - Returns the list of - QFilterKeykey objects making up the filter keys of the- QRenderPass.- parameters()¶
- Return type:
- .list of Qt3DRender.QParameter 
 
 - Returns a vector of the render pass’ current parameters - removeFilterKey(filterKey)¶
- Parameters:
- filterKey – - QFilterKey
 
 - Removes - filterKeyfrom the- QRenderPasslocal filter keys.- removeParameter(p)¶
- Parameters:
- p – - QParameter
 
 - Remove - parameterfrom the render pass’ parameters.- removeRenderState(state)¶
- Parameters:
- state – - QRenderState
 
 - Removes - statefrom the- QRenderPasslocal render state.- renderStates()¶
- Return type:
- .list of Qt3DRender.QRenderState 
 
 - Returns the list of - QRenderStatestate objects making up the render state of the- QRenderPass.- setShaderProgram(shaderProgram)¶
- Parameters:
- shaderProgram – - QShaderProgram
 - See also - shaderProgram()
 - Setter of property - shaderProgramᅟ.- shaderProgram()¶
- Return type:
- QShaderProgram
 - See also - setShaderProgram()
 - Getter of property - shaderProgramᅟ.- shaderProgramChanged(shaderProgram)¶
- Parameters:
- shaderProgram – - QShaderProgram
 
 - Notification signal of property - shaderProgramᅟ.