How to write a Material File

From Iris2

Jump to: navigation, search
(Created page with 'Material Templates // see http://www.ogre3d.org/docs/manual/manual_28.html#SEC145 // can be used by // import * from "material-templates.material" // --------------- THESE ARE…')
Line 3: Line 3:
// see http://www.ogre3d.org/docs/manual/manual_28.html#SEC145
// see http://www.ogre3d.org/docs/manual/manual_28.html#SEC145
 +
// can be used by
// can be used by
 +
// import * from "material-templates.material"
// import * from "material-templates.material"
// --------------- THESE ARE THE ATLAS STANDARD MATERIALS ----------------------
// --------------- THESE ARE THE ATLAS STANDARD MATERIALS ----------------------
 +
// MESH BASE MATERIAL TEMPLATE
// MESH BASE MATERIAL TEMPLATE
 +
material atlas_base
material atlas_base
 +
{
{
receive_shadows off
receive_shadows off
technique default
technique default
 +
{
{
pass
pass
 +
{
{
lighting on
lighting on
ambient vertexcolour
ambient vertexcolour
 +
diffuse vertexcolour
diffuse vertexcolour
Line 24: Line 32:
{
{
filtering anisotropic
filtering anisotropic
 +
max_anisotropy 8
max_anisotropy 8
 +
texture checker.png
texture checker.png
 +
texture_alias MainTexture
texture_alias MainTexture
 +
tex_address_mode clamp
tex_address_mode clamp
}
}
Line 34: Line 46:
// MESH BASE ALPHA MATERIAL TEMPLATE
// MESH BASE ALPHA MATERIAL TEMPLATE
 +
material atlas_base_alpha : atlas_base
material atlas_base_alpha : atlas_base
 +
{
{
technique default
technique default
 +
{
{
pass Decal
pass Decal
 +
{
{
lighting on
lighting on
ambient vertexcolour
ambient vertexcolour
 +
diffuse vertexcolour
diffuse vertexcolour
alpha_rejection greater_equal 128
alpha_rejection greater_equal 128
 +
alpha_to_coverage on
alpha_to_coverage on
 +
}
}
 +
}
}
 +
}
}
// --------------- THESE ARE THE STANDARD NON-ATLAS MATERIALS ----------------------
// --------------- THESE ARE THE STANDARD NON-ATLAS MATERIALS ----------------------
 +
material diffuse_template
material diffuse_template
 +
{
{
 +
receive_shadows off
receive_shadows off
technique default
technique default
 +
{
{
 +
pass Decal
pass Decal
 +
{
{
lighting on
lighting on
ambient vertexcolour
ambient vertexcolour
 +
diffuse vertexcolour
diffuse vertexcolour
texture_unit
texture_unit
 +
{
{
filtering anisotropic
filtering anisotropic
 +
max_anisotropy 8
max_anisotropy 8
 +
texture checker.png
texture checker.png
 +
texture_alias diffuse_tex
texture_alias diffuse_tex
 +
tex_address_mode clamp
tex_address_mode clamp
 +
}
}
 +
}
}
 +
}
}
 +
}
}
// MESH BASE ALPHA MATERIAL TEMPLATE
// MESH BASE ALPHA MATERIAL TEMPLATE
 +
material diffuse_template_alpha : diffuse_template
material diffuse_template_alpha : diffuse_template
 +
{
{
 +
technique default
technique default
 +
{
{
 +
pass Decal
pass Decal
 +
{
{
 +
lighting on
lighting on
ambient vertexcolour
ambient vertexcolour
 +
diffuse vertexcolour
diffuse vertexcolour
alpha_rejection greater_equal 128
alpha_rejection greater_equal 128
 +
alpha_to_coverage on
alpha_to_coverage on
 +
}
}
 +
}
}
 +
}
}
material diffuse_template_foliage : diffuse_template
material diffuse_template_foliage : diffuse_template
 +
{
{
 +
technique default
technique default
 +
{
{
pass Decal
pass Decal

Revision as of 09:10, 3 December 2011

Personal tools