]> git.tdb.fi Git - libs/gl.git/commitdiff
Rectify some omissions in ProgramBuilder builtin variables
authorMikko Rasa <tdb@tdb.fi>
Sat, 27 Sep 2014 10:46:48 +0000 (13:46 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 27 Sep 2014 10:46:48 +0000 (13:46 +0300)
source/programbuilder.cpp

index 4dcdaf5ef8969070ccd19001cab0f40e374bde47..6d6a117e29c34569378a5c8aacd13fea9e133d4b 100644 (file)
@@ -58,7 +58,8 @@ const ProgramBuilder::VariableDefinition ProgramBuilder::standard_variables[] =
        { FRAGMENT, "rgb_surface", "vec3", "rgb_lit_surface", "l" },
        { FRAGMENT, "rgb_unlit_surface", "vec3", "basic_color.rgb", "!s" },
        { FRAGMENT, "rgb_unlit_surface", "vec3", "basic_color.rgb*l_shadow", "s" },
-       { FRAGMENT, "rgb_lit_surface", "vec3", "rgb_illumination_diffuse", "!m" },
+       { FRAGMENT, "rgb_lit_surface", "vec3", "rgb_illumination_diffuse", "!m!t" },
+       { FRAGMENT, "rgb_lit_surface", "vec3", "rgb_illumination_diffuse*tex_sample.rgb", "!mt" },
        { FRAGMENT, "rgb_lit_surface", "vec3", "rgb_surface_ambient+rgb_surface_diffuse", "m!p" },
        { FRAGMENT, "rgb_lit_surface", "vec3", "rgb_surface_ambient+rgb_surface_diffuse+rgb_surface_specular", "mp" },
 
@@ -140,7 +141,7 @@ const ProgramBuilder::VariableDefinition ProgramBuilder::standard_variables[] =
        { UNIFORM, "projection_matrix", "mat4", "gl_ProjectionMatrix", 0 },
        { UNIFORM, "ShadowMap::shd_eye_matrix", "mat4", 0, 0 },
        { UNIFORM, "Lighting::light_sources", "LightSourceParameters[MAX_LIGHTS]", "gl_LightSource[i]", 0 },
-       { UNIFORM, "Lighting::ambient_color", "vec4", 0, 0 },
+       { UNIFORM, "Lighting::ambient_color", "vec4", "gl_LightModel.ambient", 0 },
        { UNIFORM, "Lighting::sky_color", "vec4", 0, 0 },
        { UNIFORM, "Lighting::eye_sky_dir", "vec3", 0, 0 },
        { UNIFORM, "Lighting::horizon_limit", "float", 0, 0 },