Skip to content

Conversation

460xlin
Copy link

@460xlin 460xlin commented Oct 29, 2018

Demo Link(https://github.com/460xlin/Project5-WebGL-Clustered-Deferred-Forward-Plus)

Features

  • Cluster update
    • Devide the whole frustum into _xSclices * _ySlices * _zSlices clusters and assign lights into overlapping clusters
  • Foward+
    • Build a data structure (texture buffer) to keep track of how many lights are in each cluster with their indices
    • Render the scene using only the lights that overlap a given cluster
  • Clustered
    • Reuse clustering logic
    • Store vertex attributes in g-buffer
    • Read g-buffer and render scene to produce final output
  • Effect
    • Blinn-Phong shading
    • Cel shading
  • Optimization
    • Pack values into vec4, reduce number of g-buffers from 4 to 3, reconstructing world position using camera matrice and (gl.FragCoord.x, gl.FragCoord.y, depth)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant