aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/EMaterialTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/EMaterialTypes.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/EMaterialTypes.h234
1 files changed, 234 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/EMaterialTypes.h b/src/others/irrlicht-1.8.1/include/EMaterialTypes.h
new file mode 100644
index 0000000..086ca34
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/EMaterialTypes.h
@@ -0,0 +1,234 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __E_MATERIAL_TYPES_H_INCLUDED__
6#define __E_MATERIAL_TYPES_H_INCLUDED__
7
8namespace irr
9{
10namespace video
11{
12
13 //! Abstracted and easy to use fixed function/programmable pipeline material modes.
14 enum E_MATERIAL_TYPE
15 {
16 //! Standard solid material.
17 /** Only first texture is used, which is supposed to be the
18 diffuse material. */
19 EMT_SOLID = 0,
20
21 //! Solid material with 2 texture layers.
22 /** The second is blended onto the first using the alpha value
23 of the vertex colors. This material is currently not implemented in OpenGL.
24 */
25 EMT_SOLID_2_LAYER,
26
27 //! Material type with standard lightmap technique
28 /** There should be 2 textures: The first texture layer is a
29 diffuse map, the second is a light map. Dynamic light is
30 ignored. */
31 EMT_LIGHTMAP,
32
33 //! Material type with lightmap technique like EMT_LIGHTMAP.
34 /** But lightmap and diffuse texture are added instead of modulated. */
35 EMT_LIGHTMAP_ADD,
36
37 //! Material type with standard lightmap technique
38 /** There should be 2 textures: The first texture layer is a
39 diffuse map, the second is a light map. Dynamic light is
40 ignored. The texture colors are effectively multiplied by 2
41 for brightening. Like known in DirectX as D3DTOP_MODULATE2X. */
42 EMT_LIGHTMAP_M2,
43
44 //! Material type with standard lightmap technique
45 /** There should be 2 textures: The first texture layer is a
46 diffuse map, the second is a light map. Dynamic light is
47 ignored. The texture colors are effectively multiplyied by 4
48 for brightening. Like known in DirectX as D3DTOP_MODULATE4X. */
49 EMT_LIGHTMAP_M4,
50
51 //! Like EMT_LIGHTMAP, but also supports dynamic lighting.
52 EMT_LIGHTMAP_LIGHTING,
53
54 //! Like EMT_LIGHTMAP_M2, but also supports dynamic lighting.
55 EMT_LIGHTMAP_LIGHTING_M2,
56
57 //! Like EMT_LIGHTMAP_4, but also supports dynamic lighting.
58 EMT_LIGHTMAP_LIGHTING_M4,
59
60 //! Detail mapped material.
61 /** The first texture is diffuse color map, the second is added
62 to this and usually displayed with a bigger scale value so that
63 it adds more detail. The detail map is added to the diffuse map
64 using ADD_SIGNED, so that it is possible to add and substract
65 color from the diffuse map. For example a value of
66 (127,127,127) will not change the appearance of the diffuse map
67 at all. Often used for terrain rendering. */
68 EMT_DETAIL_MAP,
69
70 //! Look like a reflection of the environment around it.
71 /** To make this possible, a texture called 'sphere map' is
72 used, which must be set as the first texture. */
73 EMT_SPHERE_MAP,
74
75 //! A reflecting material with an optional non reflecting texture layer.
76 /** The reflection map should be set as first texture. */
77 EMT_REFLECTION_2_LAYER,
78
79 //! A transparent material.
80 /** Only the first texture is used. The new color is calculated
81 by simply adding the source color and the dest color. This
82 means if for example a billboard using a texture with black
83 background and a red circle on it is drawn with this material,
84 the result is that only the red circle will be drawn a little
85 bit transparent, and everything which was black is 100%
86 transparent and not visible. This material type is useful for
87 particle effects. */
88 EMT_TRANSPARENT_ADD_COLOR,
89
90 //! Makes the material transparent based on the texture alpha channel.
91 /** The final color is blended together from the destination
92 color and the texture color, using the alpha channel value as
93 blend factor. Only first texture is used. If you are using
94 this material with small textures, it is a good idea to load
95 the texture in 32 bit mode
96 (video::IVideoDriver::setTextureCreationFlag()). Also, an alpha
97 ref is used, which can be manipulated using
98 SMaterial::MaterialTypeParam. This value controls how sharp the
99 edges become when going from a transparent to a solid spot on
100 the texture. */
101 EMT_TRANSPARENT_ALPHA_CHANNEL,
102
103 //! Makes the material transparent based on the texture alpha channel.
104 /** If the alpha channel value is greater than 127, a
105 pixel is written to the target, otherwise not. This
106 material does not use alpha blending and is a lot faster
107 than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing
108 stuff like leafes of plants, because the borders are not
109 blurry but sharp. Only first texture is used. If you are
110 using this material with small textures and 3d object, it
111 is a good idea to load the texture in 32 bit mode
112 (video::IVideoDriver::setTextureCreationFlag()). */
113 EMT_TRANSPARENT_ALPHA_CHANNEL_REF,
114
115 //! Makes the material transparent based on the vertex alpha value.
116 EMT_TRANSPARENT_VERTEX_ALPHA,
117
118 //! A transparent reflecting material with an optional additional non reflecting texture layer.
119 /** The reflection map should be set as first texture. The
120 transparency depends on the alpha value in the vertex colors. A
121 texture which will not reflect can be set as second texture.
122 Please note that this material type is currently not 100%
123 implemented in OpenGL. */
124 EMT_TRANSPARENT_REFLECTION_2_LAYER,
125
126 //! A solid normal map renderer.
127 /** First texture is the color map, the second should be the
128 normal map. Note that you should use this material only when
129 drawing geometry consisting of vertices of type
130 S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into
131 this format using IMeshManipulator::createMeshWithTangents()
132 (See SpecialFX2 Tutorial). This shader runs on vertex shader
133 1.1 and pixel shader 1.1 capable hardware and falls back to a
134 fixed function lighted material if this hardware is not
135 available. Only two lights are supported by this shader, if
136 there are more, the nearest two are chosen. */
137 EMT_NORMAL_MAP_SOLID,
138
139 //! A transparent normal map renderer.
140 /** First texture is the color map, the second should be the
141 normal map. Note that you should use this material only when
142 drawing geometry consisting of vertices of type
143 S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into
144 this format using IMeshManipulator::createMeshWithTangents()
145 (See SpecialFX2 Tutorial). This shader runs on vertex shader
146 1.1 and pixel shader 1.1 capable hardware and falls back to a
147 fixed function lighted material if this hardware is not
148 available. Only two lights are supported by this shader, if
149 there are more, the nearest two are chosen. */
150 EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR,
151
152 //! A transparent (based on the vertex alpha value) normal map renderer.
153 /** First texture is the color map, the second should be the
154 normal map. Note that you should use this material only when
155 drawing geometry consisting of vertices of type
156 S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into
157 this format using IMeshManipulator::createMeshWithTangents()
158 (See SpecialFX2 Tutorial). This shader runs on vertex shader
159 1.1 and pixel shader 1.1 capable hardware and falls back to a
160 fixed function lighted material if this hardware is not
161 available. Only two lights are supported by this shader, if
162 there are more, the nearest two are chosen. */
163 EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA,
164
165 //! Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping.
166 /** Looks a lot more realistic. This only works when the
167 hardware supports at least vertex shader 1.1 and pixel shader
168 1.4. First texture is the color map, the second should be the
169 normal map. The normal map texture should contain the height
170 value in the alpha component. The
171 IVideoDriver::makeNormalMapTexture() method writes this value
172 automatically when creating normal maps from a heightmap when
173 using a 32 bit texture. The height scale of the material
174 (affecting the bumpiness) is being controlled by the
175 SMaterial::MaterialTypeParam member. If set to zero, the
176 default value (0.02f) will be applied. Otherwise the value set
177 in SMaterial::MaterialTypeParam is taken. This value depends on
178 with which scale the texture is mapped on the material. Too
179 high or low values of MaterialTypeParam can result in strange
180 artifacts. */
181 EMT_PARALLAX_MAP_SOLID,
182
183 //! A material like EMT_PARALLAX_MAP_SOLID, but transparent.
184 /** Using EMT_TRANSPARENT_ADD_COLOR as base material. */
185 EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR,
186
187 //! A material like EMT_PARALLAX_MAP_SOLID, but transparent.
188 /** Using EMT_TRANSPARENT_VERTEX_ALPHA as base material. */
189 EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA,
190
191 //! BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC )
192 /** Using only first texture. Generic blending method. */
193 EMT_ONETEXTURE_BLEND,
194
195 //! This value is not used. It only forces this enumeration to compile to 32 bit.
196 EMT_FORCE_32BIT = 0x7fffffff
197 };
198
199 //! Array holding the built in material type names
200 const char* const sBuiltInMaterialTypeNames[] =
201 {
202 "solid",
203 "solid_2layer",
204 "lightmap",
205 "lightmap_add",
206 "lightmap_m2",
207 "lightmap_m4",
208 "lightmap_light",
209 "lightmap_light_m2",
210 "lightmap_light_m4",
211 "detail_map",
212 "sphere_map",
213 "reflection_2layer",
214 "trans_add",
215 "trans_alphach",
216 "trans_alphach_ref",
217 "trans_vertex_alpha",
218 "trans_reflection_2layer",
219 "normalmap_solid",
220 "normalmap_trans_add",
221 "normalmap_trans_vertexalpha",
222 "parallaxmap_solid",
223 "parallaxmap_trans_add",
224 "parallaxmap_trans_vertexalpha",
225 "onetexture_blend",
226 0
227 };
228
229} // end namespace video
230} // end namespace irr
231
232
233#endif // __E_MATERIAL_TYPES_H_INCLUDED__
234