Skip to content

utoni/USA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USA

The "Untitled Sidescroll Adventure" ;)

Nothing special, just tryin' OpenGL. Get in touch if you can draw Pixel Art Graphics / Sprites.

Graphics looks like it was painted by a 3-years old.

  • decrease layer scroll speed
  • increase layer scroll speed

Everything below i.e. godrays was generated by Github Copilot. Due to the lack of GLSL shader programming knowledge, reviewing the godray framebuffer fragment shader for correctness and performance was basically a coin flip.

Particles (tree leafes)

  • P toggles particles on/off.

Moon godrays (volumetric light shafts)

The fullscreen framebuffer pass now includes a pixel-art friendly moon godrays effect.

  • G toggles godrays on/off.
  • M switches source mode:
    • Moon sprite source (uses configured screen-space light source positions)
    • Directional off-screen source (uses a normalized moonlight direction)
  • B toggles debug mask visualization (shows the sampled occlusion mask).

In moon sprite mode, multiple emitters can be configured (moon + stars) via Framebuffer::AddGodraysLightSource(...). For performance, sprite mode processes up to 4 emitters per pixel and shares the sample budget across them.

Tuning

Godrays parameters live in Framebuffer.hpp inside GodraysParameters:

  • Intensity: overall contribution of rays
  • Exposure: final post-exposure multiplier
  • Decay: attenuation per sample along ray march
  • Density: how far each sample step travels toward source
  • Weight: per-sample accumulation weight
  • Samples: number of radial samples (lower = cheaper/sharper for pixel art)
  • Color: moonlight tint
  • NoiseAmount: subtle temporal dithering/noise to avoid over-smooth blur

About

"Untitled Sidescroll Adventure" - My personal adventure with OpenGL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages