Ocular Engine
Ocular::Core::GPULight Struct Reference

Structure of generic light data passed to the GPU. More...

#include <GPULight.hpp>

Public Member Functions

void operator() (LightSource const *light)
 

Public Attributes

Math::Vector4f position
 Position of the light source in world space. Used by point and spot lights.
 
Math::Vector4f direction
 Direction to the light source. Used by directional and spot lights.
 
Math::Vector4f color
 
Math::Vector4f attenuation
 .x = constant; .y = linear; .z = quadratic; .w = range
 
Math::Vector4f parameters
 .x = intensity; .y = angle (spotlight); .z = type (1 = point, 2 = spot, 3 = directional); .w = unused
 

Detailed Description

Structure of generic light data passed to the GPU.

Note
Must be 16 byte aligned to avoid buffer creation issues and/or performance penalties.

The documentation for this struct was generated from the following files: