This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
forwardrenderer test: add 'render into FBO' option, and auto test
- Loading branch information
Wieland Hagen
committed
Apr 24, 2019
1 parent
4a70893
commit 1b9eca9
Showing
9 changed files
with
195 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import Qt3D.Core 2.11 | ||
import Qt3D.Render 2.11 | ||
import Qt3D.Extras 2.10 | ||
|
||
Entity { | ||
id: root | ||
|
||
property int fboWidth: 1024 | ||
property int fboHeight: 1024 | ||
|
||
property alias layer: offscreenLayer | ||
property alias fbo: renderTarget | ||
|
||
Layer { | ||
id: offscreenLayer | ||
} | ||
|
||
CuboidMesh { | ||
id: mesh | ||
xExtent: 2.0 | ||
yExtent: 2.0 | ||
zExtent: 2.0 | ||
} | ||
|
||
RenderTarget { | ||
id: renderTarget | ||
attachments : [ | ||
RenderTargetOutput { | ||
attachmentPoint : RenderTargetOutput.Color0 | ||
texture : Texture2D { | ||
id : colorAttachment | ||
width : root.fboWidth | ||
height : root.fboHeight | ||
format : Texture.RGBA8_UNorm | ||
generateMipMaps : false | ||
magnificationFilter : Texture.Linear | ||
minificationFilter : Texture.Linear | ||
wrapMode { | ||
x: WrapMode.ClampToEdge | ||
y: WrapMode.ClampToEdge | ||
} | ||
} | ||
}, | ||
RenderTargetOutput { | ||
attachmentPoint : RenderTargetOutput.Depth | ||
texture : Texture2D { | ||
width : root.fboWidth | ||
height : root.fboHeight | ||
format : Texture.D32F | ||
generateMipMaps : false | ||
magnificationFilter : Texture.Linear | ||
minificationFilter : Texture.Linear | ||
wrapMode { | ||
x: WrapMode.ClampToEdge | ||
y: WrapMode.ClampToEdge | ||
} | ||
} | ||
} | ||
] | ||
} | ||
|
||
TextureMaterial { | ||
id: material | ||
texture: colorAttachment | ||
} | ||
|
||
components: [ | ||
offscreenLayer, | ||
mesh, | ||
material | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters