Browse Source

Fixed texture unit enumeration and the environment texture sampler. Removed references to the nonexistent detail texture sampler in the documentation.

Lasse Öörni 13 years ago
parent
commit
fa69f2e174

+ 2 - 2
Docs/Reference.dox

@@ -594,7 +594,7 @@ A material definition looks like this:
 \code
 \code
 <material>
 <material>
     <technique name="TechniqueName" quality="q" loddistance="d" sm3="true|false" />
     <technique name="TechniqueName" quality="q" loddistance="d" sm3="true|false" />
-    <texture unit="diffuse|normal|specular|detail|environment|emissive" name="TextureName" />
+    <texture unit="diffuse|normal|specular|emissive|environment" name="TextureName" />
     <texture ... />
     <texture ... />
     <parameter name="name" value="x y z w" />
     <parameter name="name" value="x y z w" />
     <parameter ... />
     <parameter ... />
@@ -809,7 +809,7 @@ In addition to configuring programmatically, the PostProcess can be configured w
     <rendertarget name="RenderTargetName" size="x y" | sizedivisor="x y" format="rgb|rgba|float" filter="true|false" />
     <rendertarget name="RenderTargetName" size="x y" | sizedivisor="x y" format="rgb|rgba|float" filter="true|false" />
     <parameter name="GlobalShaderParameterName" value="x y z w" />
     <parameter name="GlobalShaderParameterName" value="x y z w" />
     <pass vs="VertexShaderName" ps="PixelShaderName" output="viewport|RenderTargetName" />
     <pass vs="VertexShaderName" ps="PixelShaderName" output="viewport|RenderTargetName" />
-        <texture unit="diffuse|normal|specular|detail|environment|emissive" name="viewport|RenderTargetName|TextureName" />
+        <texture unit="diffuse|normal|specular|emissive|environment" name="viewport|RenderTargetName|TextureName" />
         <parameter name="ShaderParameterName" value="x y z w" />
         <parameter name="ShaderParameterName" value="x y z w" />
     </pass>
     </pass>
 </postprocess>
 </postprocess>

+ 2 - 2
Engine/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -2275,8 +2275,8 @@ void Graphics::SetTextureUnitMappings()
     textureUnits_["NormalMap"] = TU_NORMAL;
     textureUnits_["NormalMap"] = TU_NORMAL;
     textureUnits_["SpecMap"] = TU_SPECULAR;
     textureUnits_["SpecMap"] = TU_SPECULAR;
     textureUnits_["EmissiveMap"] = TU_EMISSIVE;
     textureUnits_["EmissiveMap"] = TU_EMISSIVE;
-    textureUnits_["EnvironmentMap"] = TU_ENVIRONMENT;
-    textureUnits_["EnvironmentCubeMap"] = TU_ENVIRONMENT;
+    textureUnits_["EnvMap"] = TU_ENVIRONMENT;
+    textureUnits_["EnvCubeMap"] = TU_ENVIRONMENT;
     textureUnits_["LightRampMap"] = TU_LIGHTRAMP;
     textureUnits_["LightRampMap"] = TU_LIGHTRAMP;
     textureUnits_["LightSpotMap"] = TU_LIGHTSHAPE;
     textureUnits_["LightSpotMap"] = TU_LIGHTSHAPE;
     textureUnits_["LightCubeMap"]  = TU_LIGHTSHAPE;
     textureUnits_["LightCubeMap"]  = TU_LIGHTSHAPE;

+ 0 - 1
Engine/Graphics/Material.cpp

@@ -47,7 +47,6 @@ const String textureUnitNames[] =
     "normal",
     "normal",
     "specular",
     "specular",
     "emissive",
     "emissive",
-    "detail",
     "environment",
     "environment",
     ""
     ""
 };
 };

+ 2 - 2
Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -2358,8 +2358,8 @@ void Graphics::SetTextureUnitMappings()
     textureUnits_["NormalMap"] = TU_NORMAL;
     textureUnits_["NormalMap"] = TU_NORMAL;
     textureUnits_["SpecMap"] = TU_SPECULAR;
     textureUnits_["SpecMap"] = TU_SPECULAR;
     textureUnits_["EmissiveMap"] = TU_EMISSIVE;
     textureUnits_["EmissiveMap"] = TU_EMISSIVE;
-    textureUnits_["EnvironmentMap"] = TU_ENVIRONMENT;
-    textureUnits_["EnvironmentCubeMap"] = TU_ENVIRONMENT;
+    textureUnits_["EnvMap"] = TU_ENVIRONMENT;
+    textureUnits_["EnvCubeMap"] = TU_ENVIRONMENT;
     textureUnits_["LightRampMap"] = TU_LIGHTRAMP;
     textureUnits_["LightRampMap"] = TU_LIGHTRAMP;
     textureUnits_["LightSpotMap"] = TU_LIGHTSHAPE;
     textureUnits_["LightSpotMap"] = TU_LIGHTSHAPE;
     textureUnits_["LightCubeMap"]  = TU_LIGHTSHAPE;
     textureUnits_["LightCubeMap"]  = TU_LIGHTSHAPE;