group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
GlowSphere.hpp File Reference

Procedural UV sphere with emissive material for bloom testing. More...

#include "ModelLoader.hpp"
#include <cmath>
#include <glm/glm.hpp>
#include <numbers>
Include dependency graph for GlowSphere.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

LoadedModel createGlowSphere (int stacks=32, int slices=32, float radius=1.0f, glm::vec3 emissiveColor={10.0f, 6.0f, 2.0f})
 Generate a procedural UV sphere as a LoadedModel with a bright emissive material suitable for testing bloom / HDR glow.
 

Detailed Description

Procedural UV sphere with emissive material for bloom testing.

Function Documentation

◆ createGlowSphere()

LoadedModel createGlowSphere ( int  stacks = 32,
int  slices = 32,
float  radius = 1.0f,
glm::vec3  emissiveColor = {10.0f, 6.0f, 2.0f} 
)
inline

Generate a procedural UV sphere as a LoadedModel with a bright emissive material suitable for testing bloom / HDR glow.

The sphere is centred at the origin with the given radius. Its material uses a high emissiveFactor (well above luminance 1.0) so the bloom downsample pass extracts the glow automatically. A 1×1 white texture is included as the emissive map to prevent the PBR shader from multiplying the factor by the black fallback texture.

Parameters
stacksNumber of latitude subdivisions (default 32).
slicesNumber of longitude subdivisions (default 32).
radiusSphere radius in world units (default 1.0).
emissiveColorHDR emissive colour (values > 1 trigger bloom).
Returns
A ready-to-upload LoadedModel.
Here is the caller graph for this function: