Skip to content

Nischaya008/RayTracerNG

Repository files navigation

RayTracerNG - Modern 2D Ray Tracing Engine

Application

RayTracerNG Banner 1

Website

RayTracerNG Banner 2

πŸš€ Overview

RayTracerNG is a powerful, real-time 2D ray tracing engine designed using modern OpenGL and C++. It provides an interactive environment to explore light physics, offering dynamic lighting, interactive scene manipulation, and real-time performance metrics.


🧠 Features

  • πŸ”¦ Real-time 2D ray tracing with 360Β° light emission
  • 🧩 Drag-and-drop scene editing with collision detection
  • πŸ’‘ Dynamic light sources and configurable reflections
  • πŸŽ›οΈ ImGui-based control panel for real-time tweaks
  • πŸ“Š Built-in CPU/GPU performance monitoring
  • πŸ”„ Save/load scenes, auto-generate obstacles
  • βš™οΈ Cross-platform compatibility (Windows/Linux)

πŸ› οΈ Technical Architecture

Languages & Libraries:

  • C++17
  • OpenGL 4.6
  • GLFW (Window management)
  • GLM (Math library)
  • ImGui (UI framework)
  • CMake (Build system)

System Requirements:

  • Windows 10+
  • OpenGL 4.6+ compatible GPU
  • 4GB RAM, 500MB storage

🧩 Core Components

πŸ”³ Window Management

  • GLFW window creation
  • Borderless fullscreen support
  • OpenGL context provisioning

🎨 Renderer

  • Modern OpenGL pipeline
  • ImGui integration
  • DPI scaling & debug callbacks

🌐 Scene Management

  • Scene graph & object management
  • Real-time ray calculations
  • Collision & shader handling

πŸ”¦ LightSource

  • 360Β° ray emission with reflection
  • Crosshair and intensity control

🧱 Obstacle & MainObject

  • Configurable circular obstacles
  • Drag-and-drop object manipulation
  • Collision-aware placement

πŸ” Ray System

  • 90 rays by default, 3 max reflections
  • 2000.0f max length, color-coded rays

πŸ“˜ User Guide

🧭 Basic Controls

  • Drag light/object with left-click
  • Delete object: right-click
  • Zoom: mouse wheel (if enabled)
  • Pan: middle mouse drag

πŸ”§ Advanced Features

  • Adjust ray count & reflection intensity
  • Auto-generate random scenes
  • Monitor FPS, CPU, GPU, and memory

πŸ‘¨β€πŸ’» Development Guide

πŸ”¨ Build from Source

Requirements:

  • CMake 3.15+
  • Visual Studio 2019+

Commands:

mkdir build
cd build
cmake ..
cmake --build . --config Release

πŸ“ Code Structure

src/         # Core C++ files
frontend/    # UI components
assets/      # Textures, banners, icons

✨ Extend Functionality

  • Add new objects via GameObject inheritance
  • Modify shaders in shaders/
  • Extend UI via ImGui

βš™οΈ Performance Considerations

  • Ray optimization with spatial partitioning
  • Early termination & batch processing
  • Efficient shader use and memory pooling

πŸ“¦ Installation

πŸͺŸ Windows

  1. Download installer
  2. Run and follow setup wizard
  3. Launch via Start Menu or Desktop Shortcut

🧰 Manual

git clone https://github.com/Nischaya008/RayTracerNG
cd RayTracerNG
mkdir build && cd build
cmake .. && cmake --build .

πŸ“„ License

This project is proprietary and strictly confidential. Unauthorized use, reproduction, distribution, or modification is strictly prohibited and will result in legal action. All rights reserved. See the LICENSE for details.


🀝 Contributing

  1. Fork the repo
  2. Create a feature branch
  3. Commit & push your changes
  4. Submit a Pull Request

πŸ’¬ Support

Open an issue or contact the maintainer via GitHub.

⭐ Star this repository if you find it useful! 😊


πŸ“ž Contact

For any inquiries or feedback, reach out via:

Stay Innovated, Keep Coding, Think BIG! πŸš€

β€œLight is the shadow of God.” – Plato

About

A modern 2D ray tracing engine built with C++17 and OpenGL. Features real-time light reflections, interactive scene editing, ImGui-powered UI, and performance monitoring. Lightweight, cross-platform, and designed for high-DPI displays.

Resources

Stars

Watchers

Forks

Contributors