BrendonButler / BrendonButler/entropy
[Feature] Implement 3D perspective renderer
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Description of the Feature
A standalone 3D renderer will be created that can work independently of the 2D renderer. This will render 3D environments, meshes, and entities. This renderer will serve as the foundation for rendering 3D scenes in games and will be designed for reuse and multiple instantiations.
The renderer will include:
- A `Render3D` class in the `rendering.perspective` package, responsible for drawing 3D geometry
- A `Render3DBatch`/`Render3D.Batch`/`RenderBatch3D` interface that defines the structure for render batches
- A `MeshRenderBatch` for batching model renders
- A `Camera3D` class with support for view and projection matrices
- Basic shader support for lighting, materials, and depth testing
This renderer should be decoupled from game logic and UI systems, and will be invoked by the compositor in the appropriate render stage. It should support rendering to both the default framebuffer and custom targets for post-processing.
### Benefits of the Feature
1. Enables rendering of 3D environments with proper depth and perspective
2. Provides a reusable rendering path for future 3D games
3. Supports modular integration with the compositor and shader manager
4. Establishes a clean separation between 3D rendering and UI logic
5. Facilitates future features like lighting, shadows, and post-processing
6. Allows multiple camera instances for features like split-screen or picture-in-picture
### Additional Information
[OpenGL Perspective Projection Overview](https://learnopengl.com/Getting-started/Camera)
LWJGL Matrix4f `perspective` usage: `new Matrix4f().perspective(fov, aspectRatio, near, far)`
Consider future integration with model loading (e.g., OBJ, glTF) and skeletal animation
Contributor guide
Research direction
Start by locating the rendering.perspective package and the compositor render stage, then review how the existing 2D renderer and shader manager are structured. Define the scope for Render3D, the render-batch interface, MeshRenderBatch, and Camera3D before implementing the requested OpenGL perspective, depth, shader, and framebuffer support. Done means the renderer can be instantiated independently and invoked by the compositor for default or custom targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100