Skip to content
/ klotter Public

A basic 3d renderer in c based on learnopengl

Notifications You must be signed in to change notification settings

madeso/klotter

Repository files navigation

klotter

A 3d rendering library sdl starter project

Name

Klotter in swedish could be translated as doodle, graffiti or scribbling.

Goals

  • Make a 3d renderer that produce pretty pictures
  • reduce main bloat and provide a easy way to write a renderer
  • only goal is to provide pretty pictures

Non goals

  • versatile data driven rendering library that fits all purposes (use specific interfaces)
  • have a good api design with great memory management (use smart pointers)
  • modern c dependencies (use iostream instead of fmt)

todo stage 1

  • expand "C"/convert functions with asserts

  • expand scene sample with selected object and transform/rotate/scale widget to change transform of objects with a scene outline and simple properties

  • add debug render modes (only render diffuse/normals/etc), like sketchfab model inspector views

  • add immediate mode styled debug renderer that can render lines, basic shapes(shphere, rect) and text

  • fix current camera/mesh/frustum light rotation functions to use a "transform" setup with same logic all over

  • material sorting: https://realtimecollisiondetection.net/blog/?p=86

  • frustum culling

  • different worlds (loose octree / portal)

  • different camera setups (fps, rotate around origin, editor?)

  • implement better outlines that handles more meshes and hoepfully specify outline in screenspace: https://ameye.dev/notes/rendering-outlines/

  • implement virtual textures for use in in-game cameras, mirrors, portals and computer screens

  • flickering lights: https://www.alanzucconi.com/2021/06/15/valve-flickering-lights/

  • river system, with spline and polygon editor, vertex color painting, alpha for joining paths and "flow map" painting (another vertex attribute?) https://twitter.com/JasperRLZ/status/1511951178753445896?t=yhT2wJVw8-iJlyBqADf-Yw&s=09

    A few people were asking me how the dynamic water surface worked. Quite simple! Two sine waves, one going across the river, the other going down the river. With heights and speeds dialed into tasteful values, and some extra texture scrolling, the result is surprisingly dynamic.

  • fse/material: Add shader permutation tool, change options (int slider, enum dropdown, bool) to select current permutation

  • fse: improve blur shader: https://www.ronja-tutorials.com/post/023-postprocessing-blur/ https://blog.innogames.com/shader-exploration-the-art-of-blurring/

  • fse: add depth (just a optional additional texture) to simulate depth of field of no-glasses

  • fse: add chromatic abberation to simulate damage/drugs

  • material: framebuffer distortions to simulate reflection/refraction

  • material: use cubemap color

  • complete rest of learn opengl

    1. (render many objects, grass billboards) Instancing (Advanced OpenGL)

    2. (render setting) Anti Aliasing (Advanced OpenGL)

    3. (feat. phong => blinnn phong) Advanced Lighting (Advanced Lighting)

    4. Gamma Correction (Advanced Lighting)

    5. Shadows - Shadow Mapping (Advanced Lighting)

    6. Shadows - Point Shadows (Advanced Lighting)

    7. Normal Mapping (Advanced Lighting)

    8. Parallax Mapping (Advanced Lighting)

    9. HDR (Advanced Lighting)

    10. Bloom (Advanced Lighting)

    11. Deferred Shading (Advanced Lighting)

    12. SSAO (Advanced Lighting)

    13. Theory (PBR)

    14. Lighting (PBR)

    15. IBL - Diffuse irradiance (PBR)

    16. IBL - Specular IBL (PBR)

    17. OIT - Introduction (2020)

    18. OIT - Weighted Blended (2020)

    19. (bugfix: shadows) CSM (2021)

    20. Scene - Scene Graph (2021)

    21. Scene - Frustum Culling (2021)

    22. Model loading

    23. Skeletal Animation (2020)

    24. Tessellation - Height map (2021)

    25. Tessellation - Tessellation (2021)

    26. DSA (2021)

    27. Compute Shaders (2022)

    28. Phys. Based Bloom (2022)

    29. Area Lights (2022)

  • different attenuation

  • allow example to take a argument to start with a certain example instead of "latest"

todo stage 2

  • replace shared ptr with proper owners
  • remove "globals"
  • add particle effects

todo stage 3

todo stage 4

  • replace opengl with different "drivers"

About

A basic 3d renderer in c based on learnopengl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published