Skip to content

V4.0.0-Alpha

Choose a tag to compare

@redcamel redcamel released this 09 Feb 09:50
· 1411 commits to master since this release

RedGPU V4.0.0 Alpha Release Notes

RedGPU V4.0.0 Alpha is a major update featuring native integration of a physics engine, modernization of the IBL system, and a core architectural overhaul for precise layout control. This version focuses on maximizing engine extensibility and ensuring precise control in production environments.


✨ Highlights

  • Rapier WASM Physics Engine Integration: Optimized both performance and build size using a plugin approach decoupled from the core.
  • Hybrid Picking System: Supports next-generation raycasting that combines GPU performance with CPU precision (triangle-level).
  • Smart Size Control: Fully supports worldSize for 3D space and pixelSize modes for UI placement.
  • IBL (Image-Based Lighting) Modernization: Rendering quality has been significantly improved with the introduction of BRDF LUT and an overhauled Prefilter logic.

💎 Simulation & Interaction

Next-Gen Physics Engine Integration

We have introduced a high-level abstraction model to provide powerful physical simulation performance while maintaining the engine's inherent lightweight nature.

  • Flexible Plugin Architecture & Core Separation
    • The physics engine core (Rapier WASM) has been separated from the core bundle, preventing build size increases for projects that do not use physics features.
  • Harmony of Abstract Interfaces and Native Access
    • Consistent implementation is possible through standard interfaces (IPhysicsBody, IPhysicsEngine), and when necessary, you can directly access the original object (nativeBody) to utilize advanced features unique to the physics engine.
  • Rich Physics Features & Practical Controllers
    • Supports various colliders and joint systems including Box, Sphere, Capsule, Mesh, and Heightfield, and provides dedicated character controllers and buoyancy/explosion simulation systems.
  • Key Samples
    • A physics group has been added to the examples page, including over 20 examples covering basics, interactions, joints, and advanced simulations.
image
  • Read the Manual

  • Note: The current physics engine system is provided in an experimental (Alpha) stage, and API refinement will proceed based on future feedback.

RedGPU.Physics.-.Rapier.mp4

Hybrid Picking & Precise Raycasting

By combining GPU performance with CPU precision, we have built a system capable of triangle-level precise collision detection even in large-scale scenes.

  • Introduction of Professional Raycasters (Raycaster 2D/3D)
    • Supports high-level interactions through Raycaster3D for ray casting in 3D world space and Raycaster2D optimized for 2D environments and NDC coordinate backtracking.

    • Raycasting Examples

Raycasting.Precision.Picking._.RedGPU.-.Chrome.2026-02-09.18-17-04.mp4
  • Triangle-level Precision Collision Detection
    • By adopting the Möller-Trumbore algorithm to calculate the intersection points of the ray with the actual triangle planes of the geometry, we guarantee perfect precision beyond the pixel level.
  • Mathematical Foundation & Data Output
    • Instantly provides world/local coordinates, UVs, and face indices during interaction, and exposes the RedGPU.Math.Ray class to allow for direct execution of complex geometric operations.

✨ Rendering & Visuals

Texture UV Transform

Added features to implement sophisticated texture animations simply by controlling material properties.

UV.Transform._.RedGPU.-.Chrome.2026-02-09.13-53-58.mp4
  • Real-time Control of UV Offset and Scale
    • Implement effects like flowing water or moving conveyor belts with optimal performance at the vertex shader stage through textureOffset and textureScale properties.
  • Supported Materials
    • This feature is currently supported by default in BitmapMaterial and PhongMaterial.
  • Key Samples

IBL (Image-Based Lighting) System Overhaul

Rendering quality and performance have been secured simultaneously by modularizing lighting calculation logic and adopting industry-standard models.

Note: There are no changes to the host code (existing usage methods) due to internal IBL improvements.

  • Introduction of BRDF LUT (Look-Up Table)
    • Significantly reduced real-time shader load by pre-calculating and storing complex BRDF data in a dedicated texture.
  • Generalization of Prefilter Logic
    • By isolating filtering logic into PrefilterGenerator, high-quality physical reflection data can be generated from general cubemap sources as well as HDR images.
  • Resource Management Optimization
    • The IBL process has been structured into Irradiance, Prefilter, and BRDF components, allowing for precise control.

🛠 Workflow & Layout

Smart Sizing System

Reflected modern interfaces for a sophisticated 2D-in-3D workflow that meets industry standards.

  • Support for World Size and Pixel Size Modes
    • Introduced worldSize based on 3D space units and pixelSize based on fixed resolution to maximize the convenience of UI and icon placement.
  • Automatic Ratio Correction
    • Applied to Sprite3D, SpriteSheet3D, and TextField3D, it automatically corrects the rendering ratio by analyzing the actual image resolution upon completion of texture loading.
  • Key Samples
image

Multi-View & Flexible Layout System (Multi-View Layout)

Advanced the event architecture for multi-view management within a single canvas and precise resolution handling.

  • Introduction of RedResizeEvent
    • Delivers an object-based RedResizeEvent instead of simply passing width and height when onResize occurs.
    • Simultaneously provides screenRectObject based on CSS pixels and pixelRectObject based on actual GPU rendering pixels.

⚠️ Migration Guide

Math Library Namespace Integration

Organized the mathematical domain that forms the foundation of the engine.

  • Changes: All math-related utilities have been integrated into the src/math/ directory and promoted to the RedGPU.Math namespace.
  • Action Required: Code that previously directly referenced the utils/math path needs to be updated to use the new integrated path (src/math/) or the RedGPU.Math namespace.