mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
build 200101. opengl 3.3 renderer projected headlights
This commit is contained in:
12
gl/ubo.h
12
gl/ubo.h
@@ -33,6 +33,10 @@ namespace gl
|
||||
const size_t MAX_TEXTURES = 8;
|
||||
const size_t ENVMAP_SIZE = 1024;
|
||||
const size_t MAX_CASCADES = 3;
|
||||
const size_t HELPER_TEXTURES = 4;
|
||||
const size_t SHADOW_TEX = MAX_TEXTURES + 0;
|
||||
const size_t ENV_TEX = MAX_TEXTURES + 1;
|
||||
const size_t HEADLIGHT_TEX = MAX_TEXTURES + 2;
|
||||
|
||||
struct scene_ubs
|
||||
{
|
||||
@@ -76,7 +80,8 @@ namespace gl
|
||||
{
|
||||
SPOT = 0,
|
||||
POINT,
|
||||
DIR
|
||||
DIR,
|
||||
HEADLIGHTS
|
||||
};
|
||||
|
||||
glm::vec3 pos;
|
||||
@@ -93,9 +98,12 @@ namespace gl
|
||||
|
||||
float intensity;
|
||||
float ambient;
|
||||
|
||||
glm::mat4 headlight_projection;
|
||||
glm::vec4 headlight_weights;
|
||||
};
|
||||
|
||||
static_assert(sizeof(light_element_ubs) == 64, "bad size of ubs");
|
||||
static_assert(sizeof(light_element_ubs) == 144, "bad size of ubs");
|
||||
|
||||
const size_t MAX_LIGHTS = 8;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user