Changes between Version 5 and Version 6 of MaterialSystem


Ignore:
Timestamp:
Apr 15, 2012, 6:16:36 PM (12 years ago)
Author:
Philip Taylor
Comment:

FFP

Legend:

Unmodified
Added
Removed
Modified
  • MaterialSystem

    v5 v6  
    137137 * `<require shaders="glsl"/>` - requires that GLSL shaders are supported and enabled.
    138138 * `<require shaders="arb"/>` - requires that ARB shaders are supported and enabled.
    139  * `<require shaders="fixed"/>` - requires that fixed-function (OpenGL 1.4ish) rendering is supported and enabled.
     139 * `<require shaders="fixed"/>` - requires that fixed-function (OpenGL 1.3ish) rendering is supported and enabled.
    140140Whenever a material tries to use an effect, the most preferred technique whose requirements are satisfied will be used. There must always be at least one usable technique in each effect. Typically, techniques that are defined earliest in the XML file will be preferred over techniques defined later. The exception is if the `preferglsl` config option (or `renderer.preferGLSL` in the console) is true, techniques requiring GLSL will always be more preferred than others; if `preferglsl` is false (the default), then ones requiring GLSL will always be less preferred.
    141141
     
    237237  * `CustomAttribute0` to `CustomAttribute2`
    238238 E.g. the XML file says `<attrib name="a_vertex" semantics="gl_Vertex"/>`, and the GLSL file says "`attribute vec3 a_vertex;`".
     239
     240=== Fixed-function shaders ===
     241
     242'Fixed-function' refers to the OpenGL 1.3 era of `glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE)` multi-texturing. These aren't really shaders but we use the same API as for the ARB/GLSL shaders, to simplify the rendering code.
     243
     244Unlike ARB/GLSL shaders, these aren't defined by XML files at all. Instead, a shader technique says e.g. `<pass shader="fixed:model_solid"/>` with the magic "`fixed:`" prefix, and [source:ps/trunk/source/graphics/ShaderProgramFFP.cpp CShaderProgram::ConstructFFP] returns an appropriate hard-coded implementation.