Optimise using State Sorting
Reported by lindsay.kay (at xeolabs) | September 11th, 2010 @ 04:02 AM | in V0.7.8
Add state sorting layer between user-defined scene graph and WebGL to minimise state transitions on WebGL.
Traverse the user-defined scene graph to create a state graph
which contains all the shaders, buffers, textures, variables etc.
that are to be set on WebGL to render the next frame.
The state graph is a list of nodes each containing state for a
geometry, each linked to nodes containing state for the
materials/textures/matrices etc. that are active for that geometry.
After the user-defined scene graph is traversed, the state graph is
traversed to render the frame, while attempting to minimise the
number of unnecessary repeated WebGL calls (like rebinds of the
same buffer etc).
Other Benefits
- State graph could hold object Z-depth order for transparency
Resources
- Forum discussion: http://groups.google.co.nz/group/scenejs/browse_thread/thread/fd6f8...
- TojiCode Quake 3 notes: http://blog.tojicode.com/2010/08/rendering-quake-3-maps-with-webgl-...
- Scene graphs past and future: http://www.google.com/url?sa=D&q=http://www.realityprime.com/ar...
Comments and changes to this ticket
-
lindsay.kay (at xeolabs) September 18th, 2010 @ 09:16 AM
- Milestone set to V0.7.8
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.