Skip to content

Releases: MarcelSunyer/AGP_Engine

OpenGL - Relief Mapping / Environment Mapping

Choose a tag to compare

@MarcelSunyer MarcelSunyer released this 08 Jun 21:22

OpenGL Graphics Engine

This project is a C++ graphics engine built with OpenGL 4.3. It showcases advanced rendering techniques and interactive UI using ImGui.

✨ Main Features

🧱 Entity System

  • Model loading via Assimp.
  • Dynamic entity positioning and transformation (glm::translate, glm::rotate, etc.).
  • Entity types:
    • Deferred_Rendering
    • Relief_Mapping
    • Environment_Map
  • Animation support (e.g., rotating Pikachu and relief-mapped cubes).

🔦 Lighting System

  • Supports:
    • Directional Lights
    • Point Lights
  • Real-time light creation and deletion via UI.
  • Up to 400 dynamic lights per rendering mode.
  • Customizable color, direction, position, and intensity.

🎮 Camera Controls

  • First-person movement (W, A, S, D, Q, E).
  • Mouse-driven rotation.
  • "Gravitational Camera" mode (key F) always looks at the origin.
  • Adjustable speed and sensitivity via UI.

🖼️ Rendering Modes

1. Deferred Rendering

  • G-Buffer setup:
    • Albedo
    • Normals
    • Position
    • View Direction
    • Depth
  • Buffer selection viewable via UI.
  • Deferred lighting with many dynamic lights.

2. Relief Mapping

  • Realistic implementation using normal and height maps.
  • Toggleable view modes:
    • Main
    • Normal
    • Height
  • Adjustable relief intensity (uHeightScale) via slider.

3. Environment Mapping

  • Reflection and refraction via cube maps.
  • Three preloaded cube maps: Outdoor, House, Studio.
  • Toggle between Reflection and Refraction modes.
  • Adjustable diffuse ambient intensity (diffus_amb).

🧰 Additional Features

  • Switch between Forward Rendering and Deferred Rendering.
  • Skybox rendering with proper depth behavior.
  • Live shader reloading when GLSL files are edited.
  • Real-time entity and light inspector.
  • Display available OpenGL extensions.
  • Real-time FPS monitor.

🧠 Included Shaders

Shader File Description
FORWARD.glsl Forward rendering shader
RENDER_GEOMETRY.glsl Geometry pass (deferred)
Render_Quad.glsl Final composition for G-Buffers
Relief_Mapping.glsl Relief mapping with view modes
Reflection_environment.glsl Environment mapping (reflections/refractions)
CubeMap.glsl Skybox rendering

🧾 Requirements

  • OpenGL 4.3+

  • GLM

  • ImGui

  • stb_image

  • Assimp

  • G-Buffer outputs (Albedo, Normals, Depth...).
    435467616-3c80fd53-84d1-4c7c-bbd8-3fe556ee3b2e
    435467717-5f13eb11-528b-468d-a2b9-8f8549f1cf10

  • Relief mapped cubes with different scales and filters:
    -Albedo
    Image_1
    -Normal
    Image_2
    -Height
    Image_3

  • Full skybox and environment setup.
    Image_4

  • Reflections using different cube maps.
    Image_5