Do you need to draw something? Well, you’re probably in the right place! This static class includes a variety of different drawing methods, from rendering Models and Meshes, to setting rendering options and drawing to offscreen surfaces! Even better, it’s entirely a static class, so you can call it from anywhere :)

Static Fields and Properties

Matrix CameraRoot Sets and gets the root transform of the camera! This will be the identity matrix by default. The user’s head location will then be relative to this point. This is great to use if you’re trying to do teleportation, redirected walking, or just shifting the floor around.
Color32 ClearColor This is the color the renderer will clear the screen to when beginning to draw a new frame. This is ignored on displays with transparent screens
bool EnableSky Enables or disables rendering of the skybox texture! It’s enabled by default on Opaque displays, and completely unavailable for transparent displays.
SphericalHarmonics SkyLight Sets the lighting information for the scene! You can build one through SphericalHarmonics.FromLights, or grab one from Tex.FromEquirectangular or Tex.GenCubemap
Tex SkyTex Set a cubemap skybox texture for rendering a background! This is only visible on Opaque displays, since transparent displays have the real world behind them already! StereoKit has a a default procedurally generated skybox. You can load one with Tex.FromEquirectangular, Tex.GenCubemap. If you’re trying to affect the lighting, see Renderer.SkyLight.

Static Methods

Add Adds a mesh to the render queue for this frame! If the Hierarchy has a transform on it, that transform is combined with the Matrix provided here.
Blit Renders a Material onto a rendertarget texture! StereoKit uses a 4 vert quad stretched over the surface of the texture, and renders the material onto it to the texture.
Screenshot Schedules a screenshot for the end of the frame! The view will be rendered from the given position at the given point, with a resolution the same size as the screen’s surface. It’ll be saved as a .jpg file at the filename provided.
SetClip Set the near and far clipping planes of the camera! These are important to z-buffer quality, especially when using low bit depth z-buffers as recommended for devices like the HoloLens. The smaller the range between the near and far planes, the better your z-buffer will look! If you see flickering on objects that are overlapping, try making the range smaller.
SetFOV Only works for flatscreen! This updates the camera’s projection matrix with a new field of view.