Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render map-level skyboxes #147

Open
3 tasks
fallenoak opened this issue Jun 3, 2016 · 0 comments
Open
3 tasks

Render map-level skyboxes #147

fallenoak opened this issue Jun 3, 2016 · 0 comments

Comments

@fallenoak
Copy link
Member

fallenoak commented Jun 3, 2016

Now that rendering is progressing nicely, it'd be great to have something other than the renderer's clear color to look at in the distance.

Note that this issue is specific to the skyboxes used for maps. WMO skyboxes are defined a bit differently, and can be handled in a follow up issue.

Progress

  • Determine where map-level skyboxes are defined
    Probably in the DBC files?
  • Set up mechanism to change skybox based on whatever is defined for the map
  • Hook up skybox rendering to WorldHandler / GameScreen

Notes

To render skyboxes correctly in relation to the camera and terrain/doodads/WMOs/etc, we'll want to disable autoClear on the renderer, and switch to a two-pass rendering approach. We'll also want to make sure to copy the camera position to the skybox each tick of animate.

The renderer changes in the animation loop will look something like this:

  1. Clear the renderer to an appropriate color-- this color will probably will come from light params once we have a light manager
  2. Render a THREE.Scene that only contains the skybox M2
  3. Call clearDepth() on the renderer (ensures the skybox remains underneath everything)
  4. Render a THREE.Scene that contains everything else (terrain, doodads, WMOs, etc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant