renderGroup
Provides a standardized access point for global, per-frame Uniform data, such as time and camera position.
Core Advantages
Its core advantage is performance optimization: it bundles all global uniforms to be sent to the GPU only once per frame, significantly reducing API overhead and simplifying access to standard data like time and camera.
Common Uses
Using the `time` property to create time-driven animations (e.g., water waves, flag fluttering).
Using `cameraPosition` to implement view-dependent effects like Fresnel or fog.
Accessing `projectionMatrix` and `resolution` for post-processing effects.
How to adjust
Its properties are auto-updated by the renderer and cannot be adjusted directly. However, you can adjust effects by changing how its properties are used: for example, multiplying `time` by a larger number speeds up animations, or calculating the distance to `cameraPosition` can create distance-based fog or LOD effects.
Code Examples
1// Get the global time uniform
2const time = renderGroup.time;
3
4// Create a smooth up-and-down animation using sin(time)
5const animatedY = sin( time.mul( 2.0 ) );
6const animatedPosition = positionLocal.add( vec3( 0, animatedY, 0 ) );