It appears that spelling them as two separate words is more correct than
a compound word.
features.lighting = true;
features.shadow = true;
features.texture = true;
features.lighting = true;
features.shadow = true;
features.texture = true;
- features.normalmap = true;
+ features.normal_map = true;
features.custom = ground_variables;
GL::ProgramBuilder(features).add_shaders(ground_shprog);
ground_shprog.bind_attribute(7, "ground_type");
features.custom = ground_variables;
GL::ProgramBuilder(features).add_shaders(ground_shprog);
ground_shprog.bind_attribute(7, "ground_type");
feat.material = i/4>0;
feat.texture = i/4>1;
feat.lighting = i%4>0;
feat.material = i/4>0;
feat.texture = i/4>1;
feat.lighting = i%4>0;
- feat.normalmap = i%4>1;
+ feat.normal_map = i%4>1;
feat.specular = i%4>2;
programs.push_back(new GL::Program(feat));
}
feat.specular = i%4>2;
programs.push_back(new GL::Program(feat));
}
{ FRAGMENT, "n_zzz_light_dir[i]", "vec3", "normalize(zzz_light_dir[i])", 0 },
{ FRAGMENT, "n_tbn_normal", "vec3", "normal_sample*2.0-1.0", "n" },
{ FRAGMENT, "n_eye_normal", "vec3", "normalize(eye_normal)", "!n" },
{ FRAGMENT, "n_zzz_light_dir[i]", "vec3", "normalize(zzz_light_dir[i])", 0 },
{ FRAGMENT, "n_tbn_normal", "vec3", "normal_sample*2.0-1.0", "n" },
{ FRAGMENT, "n_eye_normal", "vec3", "normalize(eye_normal)", "!n" },
- { FRAGMENT, "normal_sample", "vec3", "texture2D(normalmap, texture_coord).xyz", 0 },
- { FRAGMENT, "diffuse_sample", "vec4", "texture2D(diffusemap, texture_coord)", 0 },
+ { FRAGMENT, "normal_sample", "vec3", "texture2D(normal_map, texture_coord).xyz", 0 },
+ { FRAGMENT, "diffuse_sample", "vec4", "texture2D(diffuse_map, texture_coord)", 0 },
{ VERTEX, "gl_Position", "vec4", "projection_matrix*eye_vertex", 0 },
{ VERTEX, "gl_ClipDistance[i]", "float", "dot(eye_vertex, clip_planes[i].equation)", "c" },
{ VERTEX, "gl_Position", "vec4", "projection_matrix*eye_vertex", 0 },
{ VERTEX, "gl_ClipDistance[i]", "float", "dot(eye_vertex, clip_planes[i].equation)", "c" },
{ ATTRIBUTE, "tangent", "vec3", 0, 0 },
{ ATTRIBUTE, "binormal", "vec3", 0, 0 },
{ ATTRIBUTE, "tangent", "vec3", 0, 0 },
{ ATTRIBUTE, "binormal", "vec3", 0, 0 },
- { UNIFORM, "diffusemap", "sampler2D", 0, 0 },
+ { UNIFORM, "diffuse_map", "sampler2D", 0, 0 },
{ UNIFORM, "shadow", "sampler2DShadow", 0, 0 },
{ UNIFORM, "ShadowMap::shadow_darkness", "float", 0, 0 },
{ UNIFORM, "shadow", "sampler2DShadow", 0, 0 },
{ UNIFORM, "ShadowMap::shadow_darkness", "float", 0, 0 },
- { UNIFORM, "normalmap", "sampler2D", 0, 0 },
+ { UNIFORM, "normal_map", "sampler2D", 0, 0 },
{ UNIFORM, "environment", "samplerCube", 0, 0 },
{ UNIFORM, "EnvMap::env_eye_matrix", "mat3", 0, 0 },
{ UNIFORM, "Material::reflectivity", "float", 0, 0 },
{ UNIFORM, "environment", "samplerCube", 0, 0 },
{ UNIFORM, "EnvMap::env_eye_matrix", "mat3", 0, 0 },
{ UNIFORM, "Material::reflectivity", "float", 0, 0 },
prog.bind_attribute(NORMAL3, "normal");
else if(features.material)
prog.bind_attribute(COLOR4_FLOAT, "color");
prog.bind_attribute(NORMAL3, "normal");
else if(features.material)
prog.bind_attribute(COLOR4_FLOAT, "color");
- if(features.texture || features.normalmap)
+ if(features.texture || features.normal_map)
prog.bind_attribute(TEXCOORD4, "texcoord");
}
prog.bind_attribute(TEXCOORD4, "texcoord");
}
+ if(features.normal_map)
{
prog.bind_attribute(get_component_type(TANGENT3), "tangent");
prog.bind_attribute(get_component_type(BINORMAL3), "binormal");
{
prog.bind_attribute(get_component_type(TANGENT3), "tangent");
prog.bind_attribute(get_component_type(BINORMAL3), "binormal");
skylight(false),
fog(false),
specular(false),
skylight(false),
fog(false),
specular(false),
shadow(false),
reflection(false),
clipping(false),
shadow(false),
reflection(false),
clipping(false),
flags += 'y';
if(specular)
flags += 'p';
flags += 'y';
if(specular)
flags += 'p';
add("material", &StandardFeatures::material);
add("max_clip_planes", &StandardFeatures::max_clip_planes);
add("max_lights", &StandardFeatures::max_lights);
add("material", &StandardFeatures::material);
add("max_clip_planes", &StandardFeatures::max_clip_planes);
add("max_lights", &StandardFeatures::max_lights);
- add("normalmap", &StandardFeatures::normalmap);
+ add("normal_map", &StandardFeatures::normal_map);
add("reflection", &StandardFeatures::reflection);
add("shadow", &StandardFeatures::shadow);
add("skylight", &StandardFeatures::skylight);
add("specular", &StandardFeatures::specular);
add("texture", &StandardFeatures::texture);
add("reflection", &StandardFeatures::reflection);
add("shadow", &StandardFeatures::shadow);
add("skylight", &StandardFeatures::skylight);
add("specular", &StandardFeatures::specular);
add("texture", &StandardFeatures::texture);
+
+ // Deprecated
+ add("normalmap", &StandardFeatures::normal_map);
bool specular;
/** Use a normal map texture. Only used if lighting is true. */
bool specular;
/** Use a normal map texture. Only used if lighting is true. */
/** Use a shadow map. Requires a ShadowMap effect or equivalent in the
pipeline. */
/** Use a shadow map. Requires a ShadowMap effect or equivalent in the
pipeline. */
if(tech)
{
technique = *tech;
if(tech)
{
technique = *tech;
- technique.replace_texture("diffusemap", font.get_texture());
+ technique.replace_texture("diffuse_map", font.get_texture());
object.set_technique(&technique);
}
else
object.set_technique(&technique);
}
else