public void Render(Environment env, Camera cam) { renderer.Viewport(0, 0, cam.Width, cam.Height); // RenderDepthTexture(env, cam); renderer.ClearColor(backgroundColor.x, backgroundColor.y, backgroundColor.z, backgroundColor.w); renderer.Clear(true, true, false); foreach (RenderComponent rc in components) { rc.Render(); rc.Update(); } postProcessor.Capture(); RenderBucket(env, cam, Bucket.Sky); RenderBucket(env, cam, Bucket.Opaque); RenderBucket(env, cam, Bucket.Transparent); RenderBucket(env, cam, Bucket.Particle); postProcessor.Release(); userRender(); }