16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

shader changes

This commit is contained in:
milek7
2018-07-19 18:13:07 +02:00
parent 8cac3d4cc9
commit a729c5fa1d
12 changed files with 258 additions and 298 deletions

View File

@@ -5,6 +5,7 @@ namespace gl
const std::string glsl_common =
"const uint MAX_LIGHTS = " + std::to_string(MAX_LIGHTS) + "U;\n" +
"const uint MAX_PARAMS = " + std::to_string(MAX_PARAMS) + "U;\n" +
"const uint ENVMAP_SIZE = " + std::to_string(ENVMAP_SIZE) + "U;\n" +
R"STRING(
const uint LIGHT_SPOT = 0U;
const uint LIGHT_POINT = 1U;

View File

@@ -65,7 +65,7 @@ std::unordered_map<std::string, gl::shader::defaultparam_e> gl::shader::defaultp
{
{ "required", defaultparam_e::required },
{ "nan", defaultparam_e::nan },
{ "none", defaultparam_e::zero },
{ "zero", defaultparam_e::zero },
{ "one", defaultparam_e::one },
{ "ambient", defaultparam_e::ambient },
{ "diffuse", defaultparam_e::diffuse },

View File

@@ -32,6 +32,7 @@ namespace gl
#pragma pack(push, 1)
const size_t MAX_TEXTURES = 8;
const size_t ENVMAP_SIZE = 1024;
struct scene_ubs
{