Skip to content

cbrenton/gapyear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gapyear

A deferred rendering engine in WebGL.

Goals

Scene setup

  • Create basic project that serves a static HTML page with a bundled script.
  • Import scene-helpers.js from webgl-hello and add a blank canvas.
  • Create scene graph object, with separate arrays for light, geometry, and cameras.
  • Add cube and render scene.
  • Add FPS counter.
  • Add basic Material class with phong variables.
  • Add basic Light class and allow a single light in the scene.
  • Add many objects to scene randomly.

G-buffer

  • Render entire scene to FBO.
  • Output red, green, and blue to 3 separate FBO color attachments.
  • Render albedo to g-buffer FBO.
  • Display albedo buffer in debug window.
  • Render normal to g-buffer FBO.
  • Render specular contrib to g-buffer FBO.
  • Display albedo + normal + specular contrib + depth buffers in debug window.

L-buffer

  • Render a sphere to FBO for a single point light (debug).
  • Pass a single texture from g-buffer to l-buffer.
  • Render all geometry in light's sphere of influence as white to FBO (debug).
  • Render diffuse to l-buffer FBO.
  • Render specular to l-buffer FBO.
  • Accumulate diffuse and specular for each light to create final image.

Final pass

  • Render textured quad to screen.

Other stuff

  • Add specular intensity to Material class.
  • Add specular intensity to Phong calculation.
  • Remove position from g-buffer and recalculate using depth instead.
  • Pack g-buffer info into 2 textures instead of 3 (diffuse.rgb + specular intensity, normal.xyz + shininess).
  • Integrate basic obj file loader (parse-obj.js from webgl-hello).
  • Add obj file to scene graph.
  • Add some heirarchical model to scene graph.
  • Integrate key capture library (maybe keypress).
  • Add multiple cameras, with the ability to switch between them using keystrokes.
  • Animate some of the objects.
  • Change lighting to Blinn-Phong.
  • Grok Blinn-Phong differences enough to validate that it's working as expected.
  • Add Fresnel factor to specular lighting.
  • Add per-pixel fog using g-buffer depth.
  • Add SSAO.
  • Implement deferred lighting (should be its own section).

About

A deferred rendering engine in WebGL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published