From: Mikko Rasa Date: Sat, 27 Sep 2014 10:46:48 +0000 (+0300) Subject: Rectify some omissions in ProgramBuilder builtin variables X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b7c3811b8f05ee4262dafa1492e526d586ec1295;p=libs%2Fgl.git Rectify some omissions in ProgramBuilder builtin variables --- diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index 4dcdaf5e..6d6a117e 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -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 },