#171 ✓resolved
lindsay.kay (at xeolabs)

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

Comments and changes to this ticket

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

People watching this ticket

Pages