Scene constructor
Renderer object or GPUCurtains class object used to create this Scene
Transformation object of the Object3D
Matrices object of the Object3D
Children Object3D in the scene graph, used to compute their own world matrix
Whether at least one of this Object3D matrix needs an update.
Array of ComputePass to render, ordered by renderOrder
A RenderPassEntries object that will contain every Meshes or RenderBundle that need to be drawn, put inside each one of our three entries type arrays: pingPong
, renderTarget
and screen
.
Get our quaternion
Set our quaternion
new quaternion
Get our model matrix
Set our model matrix
new model matrix
Get our world matrix
Set our world matrix
new world matrix
Set our transforms properties and vectors onChange callbacks
Apply our rotation and tell our model matrix to update
Tell our model matrix to update
Tell our model matrix to update
Tell our model matrix to update
Set our model matrix and world matrix
Set our model matrix shouldUpdate flag to true (tell it to update)
Set our world matrix shouldUpdate flag to true (tell it to update)
Update our model matrix
Update our model matrix
Destroy this Object3D. Removes its parent and set its children free.
Set the main Renderer render pass entry.
Get the number of meshes a render pass entry should draw.
The render pass entry to test
Add a ComputePass to our scene computePassEntries array
ComputePass to add
Remove a ComputePass from our scene computePassEntries array
ComputePass to remove
Add a RenderTarget to our scene renderPassEntries outputTarget array. Every Meshes later added to this RenderTarget will be rendered to the RenderTarget Texture using the .descriptor | RenderTarget RenderPass descriptor
RenderTarget to add
Remove a RenderTarget from our scene renderPassEntries outputTarget array.
RenderTarget to add
Get the correct render pass entry (either renderPassEntries outputTarget or renderPassEntries screen) Stack onto which this Mesh should be added, depending on whether it's projected or not
Mesh to check
Order a SceneStackedObject array by using the SceneStackedObject#renderOrder | renderOrder or SceneStackedObject#index | index properties.
SceneStackedObject to sort, filled with RenderedMesh or RenderBundle.
Test whether a SceneStackedObject is a RenderBundle or not.
Object to test.
Add a Mesh to the correct render pass entry Stack array. Meshes are then ordered by their indexes (order of creation], pipeline entry indexes and then renderOrder
Mesh to add
Remove a Mesh from our Scene.
Mesh to remove.
Add a RenderBundle to the correct render pass entry Stack array.
RenderBundle to add.
ProjectionStack onto which to add the RenderBundle.
Remove a RenderBundle from our Scene.
RenderBundle to remove.
Add a ShaderPass to our scene renderPassEntries screen array. Before rendering the ShaderPass, we will copy the correct input texture into its renderTexture This also handles the renderPassEntries screen array entries order: We will first draw selective passes, then our main screen pass and finally global post processing passes.
ShaderPass to add
Remove a ShaderPass from our scene renderPassEntries screen array
ShaderPass to remove
Add a PingPongPlane to our scene renderPassEntries pingPong array. After rendering the PingPongPlane, we will copy the context current texture into its renderTexture so we'll be able to use it as an input for the next pass
Remove a PingPongPlane from our scene renderPassEntries pingPong array.
PingPongPlane to remove
Get any rendered object or RenderTarget RenderPassEntry. Useful to override a RenderPassEntry onBeforeRenderPass or RenderPassEntry onAfterRenderPass default behavior.
The object from which we want to get the parentMesh RenderPassEntry
Sort transparent projected meshes by their render order or distance to the camera (farther meshes should be drawn first).
transparent projected meshes array to sort
Here we render a RenderPassEntry:
current GPUCommandEncoder
RenderPassEntry to render
Before actually rendering the scene, update matrix stack and frustum culling checks. Batching these calls greatly improve performance. Called by the renderer before rendering.
Render our Scene
current GPUCommandEncoder
Used to by the Renderer to render everything that needs to be rendered (compute passes, meshes and/or render bundles) in the right order with the right pass descriptors and target textures, perform textures copy at the right time, etc.
Render order