Description
Make FunGT's OpenGL raster preview scenes look good by default, so a
loaded model is not lit only by manually placed point lights. Before
this work, the raster shader had only a flat, near invisible ambient
term, so any freshly loaded model looked dark and flat regardless of
what it was.
This tracks what is still missing after adding HDRI based Image Based
Lighting (IBL) and a tunable flat ambient fallback to the raster
shader. Scene scale and performance work (loading very large models,
BVH build time, threaded loading) is a separate concern and is not
covered by this issue.
What was done
- HDR (.hdr) equirectangular texture loading
- Equirect to cubemap conversion pass
- Irradiance convolution (diffuse ambient derived from an HDRI)
- IBL ambient term in fungt_default.fs, with tunable intensity
- Flat ambientColor fallback for scenes with no HDRI loaded
- Reinhard tonemap and gamma correction on the final shader output
- SimpleGeometry Sphere and Plane switched to the same shader as
loaded models, so they share the same ambient/IBL/tonemap behavior
What is still needed
Description
Make FunGT's OpenGL raster preview scenes look good by default, so a
loaded model is not lit only by manually placed point lights. Before
this work, the raster shader had only a flat, near invisible ambient
term, so any freshly loaded model looked dark and flat regardless of
what it was.
This tracks what is still missing after adding HDRI based Image Based
Lighting (IBL) and a tunable flat ambient fallback to the raster
shader. Scene scale and performance work (loading very large models,
BVH build time, threaded loading) is a separate concern and is not
covered by this issue.
What was done
loaded models, so they share the same ambient/IBL/tonemap behavior
What is still needed
codebase. Flat/uniform ambient with no HDRI loaded will not
produce contact or crease shadowing on its own
environment reflections)
fungt_default.fs is still Blinn-Phong; only its ambient term
was replaced
no vertex normal data at all and is still on the old unlit
shader. Needs normal generation added to the geometry before it
can use fungt_default.fs
Space::LoadModelToRender currently only loads a single base
color texture per mesh
codebase. Flat/uniform ambient with no HDRI loaded will not
produce contact or crease shadowing on its own
separate places (OpenGLDevice::init via setBackgroundColor,
OGLframeBuffer's one-time init clear, OpenGLViewPort's per-frame
clear). setBackgroundColor() does not actually control what is
visible on screen when a ViewPort layer is active; only
OpenGLViewPort's hardcoded clear does
still raw OpenGL calls. No existing FrameBuffer abstraction
supports attaching an external texture face as a render target