SimpleQuadRenderer QML Type
Renderizza un quadrilatero con texture a schermo intero sul target di rendering principale. Altro...
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.11 |
| Inherits: |
Proprietà
- texture : Texture
Descrizione dettagliata
SimpleQuadRenderer è un RenderExtension che esegue il blit di un Texture sull'intero schermo. Viene eseguito nella fase PostColor nella modalità di rendering Main, il che significa che viene eseguito dopo che la scena è stata disegnata ma prima di qualsiasi effetto di post-elaborazione, e scrive direttamente nel render target principale dell'View3D, sovrascrivendo qualsiasi cosa sia stata disegnata dalla scena.
Il caso d'uso più comune consiste nel creare una pipeline di rendering completamente personalizzata: impostare View3D.renderFormat per disabilitare i passaggi integrati di Qt Quick 3D con View3D.DisableInternalPasses, eseguire il rendering del contenuto della scena in uno o più target RenderPass e quindi utilizzare SimpleQuadRenderer per ricomporre il risultato sullo schermo.
Nota: SimpleQuadRenderer viene registrato automaticamente come estensione della scena; non è necessario aggiungerlo manualmente a View3D.extensions.
import QtQuick3D
import QtQuick3D.Helpers
View3D {
// Disable the built-in render passes so we can provide our own output
renderFormat: View3D.DisableInternalPasses
// A custom offscreen pass that renders scene content
RenderPass {
id: mainColorPass
commands: [
RenderablesFilter { renderableTypes: RenderablesFilter.Opaque | RenderablesFilter.Transparent }
]
}
// Blit the result of the custom pass to the screen
SimpleQuadRenderer {
texture: Texture {
textureProvider: RenderOutputProvider {
renderPass: mainColorPass
}
}
}
}Vedi anche RenderOutputProvider, RenderPass e View3D.
Documentazione delle proprietà
texture : Texture
La texture da renderizzare sul quad a schermo intero. Può trattarsi di qualsiasi Texture, compresa una il cui textureProvider sia impostato su un RenderOutputProvider per visualizzare l'output proveniente da un RenderPass o da uno dei passaggi integrati di Qt Quick 3D(come la texture di profondità o la texture AO).
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.