Research Article

View-Dependent Tessellation and Simulation of Ocean Surfaces

Algorithm 1

Pseudocode of the main geometry shader.
if T.NeedsRefinement() then
= T.calculateRefinementType()
 T.RefineTriangle //Process Patterns
else if T.NeedsCoarsement() then
 T.CoarsenTriangle() //Restore original triangle and discard the rest
else
 T.Emit() //Triangle remains unaffected
end if