GL Studio C++ Runtime API
effect_diff_norm_spec_refl.h
Go to the documentation of this file.
1/*! \file
2 \brief Render effect that supports diffuse, normal, specular, and reflection maps
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd; Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State of Florida and the United States of America. Use, distribution,
38duplication, or disclosure by the U. S. Government is subject to
39"Restricted Rights" as set forth in DFARS 252.227-7014(c)(1)(ii).
40
41*/
42
43#ifndef INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H
44#define INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H
45
46#include "gls_matrix_affine.h"
47#include "gls_render_effect.h"
48
49#ifdef GLES
50# include "gls_state_manager.h"
51#endif
52
53//////////////////// Provides support for creating DLLs ////////////////////////
54#if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
55 && defined( _MSC_VER )
56# if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
57# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport )
58# else
59# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
60# endif
61#else
62# define GLSGEN_GlsAdvancedMesh_EXPORT
63#endif
64///////////////////////////////////////////////////////////////////////////////
65
66namespace disti
67{
68#ifndef GLES
69class MaxLike_Shader;
70#endif
71
72/** Render effect that supports diffuse, normal, specular, and reflection maps. */
74{
75public:
76 static const std::string EFFECT_TYPE_NAME; ///< Backing storage for the human readable string for this effect type.
77
78 /// \details The TextureUVWMatrix class. Describes a texture transformation.
80 {
81 bool _isIdentity; ///< Is true if the matrix is identity.
82
83 float _uOffset; ///< Texture U (X) offset.
84 float _vOffset; ///< Texture V (Y) offset.
85 float _uTiling; ///< Texture scaling on U (X) axis.
86 float _vTiling; ///< Texture scaling on V (Y) axis.
87 float _angle; ///< Texture rotation angle in degrees.
88
89 GlsMatrixAffineF _matrix; ///< Texture transform matrix.
90
91 public:
93
94 /// Equality operator
95 /// \param rhs The object to compare.
96 /// \return Whether or not the objects are equal.
97 bool operator==( const TextureUVWMatrix& rhs ) const;
98
99 /// Sets the U offset for this texture.
100 /// \param val The new U offset to set.
101 void UOffset( float val ) { _uOffset = val; }
102
103 /// \return The U offset for this texture.
104 float UOffset() const { return _uOffset; }
105
106 /// Sets the V offset for this texture.
107 /// \param val The new V offset to set.
108 void VOffset( float val ) { _vOffset = val; }
109
110 /// \return The V offset for this texture.
111 float VOffset() const { return _vOffset; }
112
113 /// Sets the U scale for this texture.
114 /// \param val The new U scale to set.
115 void UTiling( float val ) { _uTiling = val; }
116
117 /// \return The U scale for this texture.
118 float UTiling() const { return _uTiling; }
119
120 /// Sets the V scale for this texture.
121 /// \param val The new V scale to set.
122 void VTiling( float val ) { _vTiling = val; }
123
124 /// \return The V scale for this texture.
125 float VTiling() const { return _vTiling; }
126
127 /// Set the rotation angle in degrees for this texture.
128 /// \param val The new rotation angle to set.
129 void Angle( float val ) { _angle = val; }
130
131 /// \return The rotation angle for this texture.
132 float Angle() const { return _angle; }
133
134 /// Should be called after changing the parameters.
136
137 /// \return True if the matrix is identity.
138 inline bool IsIdentity() { return _isIdentity; }
139
140 /// \note Matrix must be an array of [16].
141 /// \return The underlying matrix data.
142 inline float* GetTransformMatrix() { return _matrix.Data(); }
143 };
144
145protected:
146 unsigned int _ref_count; ///< Reference count
147
148#ifdef GLES20
149 GlsEffect* _shader; /**< The current active effect in the system. If NULL, then no effect is active.
150 * Effects are retrieved from the GlsEffectFactory class. */
151 bool _userHasCustomShader; /** whether or not the user already had a custom shader set up */
152#elif !defined( GLES )
153 MaxLike_Shader* _shader; ///< shader program to use (if any)
154#endif
155
156 unsigned int _materialIndex; ///< The material index to use
157 int _diffuseTextureIndex; ///< INVALID_INDEX, or the texture index to use
158 int _normalTextureIndex; ///< INVALID_INDEX, or the texture index to use
159 int _specularTextureIndex; ///< INVALID_INDEX, or the texture index to use
160 int _reflectionTextureIndex; ///< INVALID_INDEX, or the texture index to use
161
162 float _diffuseAmount; ///< [0.0,1.0] "Weight" of the diffuse map
163 float _normalAmount; ///< [0.0,1.0] "Weight" of the normal map
164 float _specularAmount; ///< [0.0,1.0] "Weight" of the specular map
165 float _reflectionAmount; ///< [0.0,1.0] "Weight" of the reflection map
166
167 bool _useVertexColors; ///< true: use vertex color for diffuse rather than material diffuse
168
169 /// true: expect 'DirectX' format normal maps (positive Green points down)
170 /// false: expect 'OpenGL' format normal maps (positive Green points up)
171 /// Note: the sense is backwards from the Max 'Normal Bump' 'Flip Green' option because
172 /// Max defaults to 'DirectX' format and GL Studio defaults to 'OpenGL' format
174
175 DistiAttribDict* _attribDict; ///< The attribute dictionary for this object.
176
177 TextureUVWMatrix _diffuseUVWMatrix; ///< The texture transform for the diffuse texture.
178 TextureUVWMatrix _normalUVWMatrix; ///< The texture transform for the normal texture.
179 TextureUVWMatrix _specularUVWMatrix; ///< The texture transform for the specular texture.
180
181 /// Called to add this object's attributes to the dictionary.
182 /// \note Not normally called by users.
184
185public:
186#ifdef GLES20
187 static const GLenum NORMAL_MAP_TEXTURE_UNIT = GL_TEXTURE1; ///< the texture unit that the normal map should be bound to, \see glActiveTexture
188 static const GLenum SPECULAR_MAP_TEXTURE_UNIT = GL_TEXTURE2; ///< the texture unit that the specular map should be bound to, \see glActiveTexture
189 static const GLenum REFLECTION_MAP_TEXTURE_UNIT = GL_TEXTURE3; ///< the texture unit that the reflection map should be bound to, \see glActiveTexture
190
191 /** Get the index for the sampler uniform for the given texture unit
192 * \param textureUnit the texture unit (e.g. GL_TEXTURE1)
193 * \return the index for the sampler uniform
194 */
195 static inline unsigned int TextureUnitIndex( GLenum textureUnit ) { return textureUnit - GL_TEXTURE0; }
196#endif // GLES20
197
198 static const int INVALID_INDEX = -1; ///< Value to represent an invalid texture index.
199
200 GLSGEN_GlsAdvancedMesh_EXPORT Effect_DiffNormSpecRefl();
201 GLSGEN_GlsAdvancedMesh_EXPORT ~Effect_DiffNormSpecRefl();
202
203 /// Copy constructor
204 GLSGEN_GlsAdvancedMesh_EXPORT Effect_DiffNormSpecRefl( const Effect_DiffNormSpecRefl& );
205
206 /// Assignment operator
207 /// \return the resulting object (this)
208 GLSGEN_GlsAdvancedMesh_EXPORT const Effect_DiffNormSpecRefl& operator=( const Effect_DiffNormSpecRefl& );
209
210 /// Equality operator
211 /// \return Whether or not the objects are equal.
212 GLSGEN_GlsAdvancedMesh_EXPORT bool operator==( const Effect_DiffNormSpecRefl& ) const;
213
214 /// Inequality operator
215 /// \param o The object to compare.
216 /// \return Whether or not the objects are not equal.
217 inline bool operator!=( const Effect_DiffNormSpecRefl& o ) const { return !( *this == o ); }
218
219 /// Set the material index for this effect.
220 /// \param materialIndex The new material index for this effect.
221 inline void SetMaterialIndex( unsigned int materialIndex ) { _materialIndex = materialIndex; }
222
223 /// \return The current material index for this effect.
224 inline unsigned int GetMaterialIndex() const { return _materialIndex; }
225
226 /// Set whether or not to use vertex colors, rather than material colors.
227 /// \param value The new value to set.
228 inline void SetUseVertexColor( bool value )
229 {
230 _useVertexColors = value;
231#ifndef GLES
232 SelectShader();
233#endif
234 }
235
236 /// \return Whether the effect is using vertex colors, rather than material colors.
237 inline bool GetUseVertexColor() const { return _useVertexColors; }
238
239 /// Set the texture index that will provide the diffuse color for the effect.
240 /// \param textureIndex The new texture index to set.
241 inline void SetDiffuseTextureIndex( int textureIndex )
242 {
243 _diffuseTextureIndex = textureIndex;
244#ifndef GLES
245 SelectShader();
246#endif
247 }
248
249 /// \return The current diffuse color texture index for this effect.
250 inline int GetDiffuseTextureIndex() const { return _diffuseTextureIndex; }
251
252 /// Set the texture index that will provide normals for the effect
253 /// \param textureIndex The new texture index to set.
254 inline void SetNormalTextureIndex( int textureIndex )
255 {
256 _normalTextureIndex = textureIndex;
257#ifndef GLES
258 SelectShader();
259#endif
260 }
261
262 /// \return The current normal texture index for this effect.
263 inline int GetNormalTextureIndex() const { return _normalTextureIndex; }
264
265 /// Set the texture index that will provide specular for this effect.
266 /// \param textureIndex The new texture index to set.
267 inline void SetSpecularTextureIndex( int textureIndex )
268 {
269 _specularTextureIndex = textureIndex;
270#ifndef GLES
271 SelectShader();
272#endif
273 }
274
275 /// \returns The current specular texture index for this effect.
276 inline int GetSpecularTextureIndex() const { return _specularTextureIndex; }
277
278 /// Set the texture index that will provide reflections for this effect.
279 /// \param textureIndex The new texture index to set.
280 inline void SetReflectionTextureIndex( int textureIndex )
281 {
282 _reflectionTextureIndex = textureIndex;
283#ifndef GLES
284 SelectShader();
285#endif
286 }
287
288 /// \returns The current reflection texture index for this effect.
290
291 /// Set the weight of the diffuse texture from 0.0 to 1.0.
292 /// \param value The new weight to set.
293 inline void SetDiffuseAmount( float value )
294 {
295 _diffuseAmount = value;
296#ifndef GLES
297 SelectShader();
298#endif
299 }
300
301 /// \return The current weight for the diffuse texture.
302 inline float GetDiffuseAmount() const { return _diffuseAmount; }
303
304 /// Set the weight of the normal texture from 0.0 to 1.0.
305 /// \param value The new weight to set.
306 inline void SetNormalAmount( float value )
307 {
308 _normalAmount = value;
309#ifndef GLES
310 SelectShader();
311#endif
312 }
313
314 /// \return The current weight for the normal texture.
315 inline float GetNormalAmount() const { return _normalAmount; }
316
317 /// Set the weight of the specular texture from 0.0 to 1.0.
318 /// \param value The new weight to set.
319 inline void SetSpecularAmount( float value )
320 {
321 _specularAmount = value;
322#ifndef GLES
323 SelectShader();
324#endif
325 }
326
327 /// \return The current weight for the specular texture.
328 inline float GetSpecularAmount() const { return _specularAmount; }
329
330 /// Set the weight of the reflection texture from 0.0 to 1.0.
331 /// \param value The new weight to set.
332 inline void SetReflectionAmount( float value )
333 {
334 _reflectionAmount = value;
335#ifndef GLES
336 SelectShader();
337#endif
338 }
339
340 /// \return The current weight for the reflection texture.
341 inline float GetReflectionAmount() const { return _reflectionAmount; }
342
343 /// Set flipping the normal map green channel for DirectX textures (true) or OpenGL textures (false).
344 /// \param value The new flip value.
345 inline void SetNormalMapFlipGreen( bool value )
346 {
347 _normalMapFlipGreen = value;
348#ifndef GLES
349 SelectShader();
350#endif
351 }
352
353 /// \return The current normal map green channel flip: true for DirectX textures, false for OpenGL textures.
354 inline bool GetNormalMapFlipGreen() const { return _normalMapFlipGreen; }
355
356 /// Set Diffuse Map UV transform parameters.
357 /// \note Scaling and rotation are performed from the center of the texture.
358 /// \param uOffset U axis translation.
359 /// \param vOffset V axis translation.
360 /// \param uTiling U axis scaling.
361 /// \param vTiling V axis scaling.
362 /// \param angle X axis rotation in degrees.
363 GLSGEN_GlsAdvancedMesh_EXPORT void SetDiffuseUVWSettings( float uOffset, float vOffset, float uTiling, float vTiling, float angle );
364
365 /// Get Diffuse Map UV transform parameters.
366 /// \param uOffset Returned u axis translation.
367 /// \param vOffset Returned v axis translation.
368 /// \param uTiling Returned u axis scaling.
369 /// \param vTiling Returned v axis scaling.
370 /// \param angle Returned x axis rotation in degrees.
371 GLSGEN_GlsAdvancedMesh_EXPORT void GetDiffuseUVWSettings( float& uOffset, float& vOffset, float& uTiling, float& vTiling, float& angle );
372
373 /// Set Normal Map UV transform parameters.
374 /// \note Scaling and rotation are performed from the center of the texture.
375 /// \param uOffset U axis translation.
376 /// \param vOffset V axis translation.
377 /// \param uTiling U axis scaling.
378 /// \param vTiling V axis scaling.
379 /// \param angle W-axis rotation in degrees.
380 GLSGEN_GlsAdvancedMesh_EXPORT void SetNormalUVWSettings( float uOffset, float vOffset, float uTiling, float vTiling, float angle );
381
382 /// Get Normal Map UV transform parameters.
383 /// \param uOffset Returned u axis translation.
384 /// \param vOffset Returned v axis translation.
385 /// \param uTiling Returned u axis scaling.
386 /// \param vTiling Returned v axis scaling.
387 /// \param angle Returned W-axis rotation in degrees.
388 GLSGEN_GlsAdvancedMesh_EXPORT void GetNormalUVWSettings( float& uOffset, float& vOffset, float& uTiling, float& vTiling, float& angle );
389
390 /// Set Specular Map UV transform parameters.
391 /// \note Scaling and rotation are performed from the center of the texture.
392 /// \param uOffset U axis translation.
393 /// \param vOffset V axis translation.
394 /// \param uTiling U axis scaling.
395 /// \param vTiling V axis scaling.
396 /// \param angle W-axis rotation in degrees.
397 GLSGEN_GlsAdvancedMesh_EXPORT void SetSpecularUVWSettings( float uOffset, float vOffset, float uTiling, float vTiling, float angle );
398
399 /// Get Specular Map UV transform parameters.
400 /// \param uOffset Returned u axis translation.
401 /// \param vOffset Returned v axis translation.
402 /// \param uTiling Returned u axis scaling.
403 /// \param vTiling Returned v axis scaling.
404 /// \param angle Returned W-axis rotation in degrees.
405 GLSGEN_GlsAdvancedMesh_EXPORT void GetSpecularUVWSettings( float& uOffset, float& vOffset, float& uTiling, float& vTiling, float& angle );
406
407 /// Selects the shader to use based on the current effect parameters.
408 /// \note Not normally called by users.
409 GLSGEN_GlsAdvancedMesh_EXPORT void SelectShader();
410
411 /// Recalculate the texture transform matrices.
412 /// \note Not normally called by users.
413 GLSGEN_GlsAdvancedMesh_EXPORT void TextureUVWSettingsChanged();
414
415 /// \return true if the effect has non-default texture transform settings
416 /// \note Not normally called by users.
417 GLSGEN_GlsAdvancedMesh_EXPORT bool UsesTextureTransforms();
418
419 /// \return A reference to the effect's attribute dictionary.
421 {
422 if( !_attribDict )
423 {
425 }
426 return *_attribDict;
427 }
428
429 /// \return This effect's type as a readable string.
430 inline const std::string& EffectTypeName() DISTI_METHOD_OVERRIDE
431 {
432 return EFFECT_TYPE_NAME;
433 }
434
435 /////////////////////////////////////////////
436 // VertexAttribIndexLookup Interface
437 /////////////////////////////////////////////
438
440
441 ///////////////////////////////////////////////////////////////////////////
442 // GlsRenderEffect overrides
443 ///////////////////////////////////////////////////////////////////////////
446 virtual unsigned int GlsRenderEffect_ClassID() const DISTI_METHOD_OVERRIDE;
447 virtual void SetupEffect(
448 DynamicArray<Material>& materialPalette,
449 TexturePalette* texturePalette,
450 const TextureSettings& textureSettings,
451 float* viewToWorld3x3, // 3x3 matrix (float[9])
452 unsigned int maxLightNum,
453 unsigned int activeLightMask ) DISTI_METHOD_OVERRIDE;
454
456 virtual int Compare( const GlsRenderEffect* ) const DISTI_METHOD_OVERRIDE;
460};
461
462} // namespace disti
463
464#endif
Definition: disti_metadata.h:734
Definition: dynamic_array.h:79
Definition: effect_diff_norm_spec_refl.h:80
void RecalcTransformMatrix()
Should be called after changing the parameters.
bool IsIdentity()
Definition: effect_diff_norm_spec_refl.h:138
float VOffset() const
Definition: effect_diff_norm_spec_refl.h:111
void UTiling(float val)
Definition: effect_diff_norm_spec_refl.h:115
bool operator==(const TextureUVWMatrix &rhs) const
float UOffset() const
Definition: effect_diff_norm_spec_refl.h:104
void VOffset(float val)
Definition: effect_diff_norm_spec_refl.h:108
void VTiling(float val)
Definition: effect_diff_norm_spec_refl.h:122
float * GetTransformMatrix()
Definition: effect_diff_norm_spec_refl.h:142
void UOffset(float val)
Definition: effect_diff_norm_spec_refl.h:101
float VTiling() const
Definition: effect_diff_norm_spec_refl.h:125
float UTiling() const
Definition: effect_diff_norm_spec_refl.h:118
void Angle(float val)
Definition: effect_diff_norm_spec_refl.h:129
float Angle() const
Definition: effect_diff_norm_spec_refl.h:132
Definition: effect_diff_norm_spec_refl.h:74
void GetNormalUVWSettings(float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle)
void SetSpecularAmount(float value)
Definition: effect_diff_norm_spec_refl.h:319
int _reflectionTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:160
float _specularAmount
[0.0,1.0] "Weight" of the specular map
Definition: effect_diff_norm_spec_refl.h:164
void SetSpecularUVWSettings(float uOffset, float vOffset, float uTiling, float vTiling, float angle)
void SetDiffuseAmount(float value)
Definition: effect_diff_norm_spec_refl.h:293
void SetNormalUVWSettings(float uOffset, float vOffset, float uTiling, float vTiling, float angle)
virtual void CleanupEffect() DISTI_METHOD_OVERRIDE
Remove the effect trom the OpenGL state.
unsigned int _materialIndex
The material index to use.
Definition: effect_diff_norm_spec_refl.h:156
int GetSpecularTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:276
int _normalTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:158
DistiAttribDict & Attributes() DISTI_METHOD_OVERRIDE
Definition: effect_diff_norm_spec_refl.h:420
void SetMaterialIndex(unsigned int materialIndex)
Definition: effect_diff_norm_spec_refl.h:221
MaxLike_Shader * _shader
shader program to use (if any)
Definition: effect_diff_norm_spec_refl.h:153
void SetDiffuseTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:241
TextureUVWMatrix _normalUVWMatrix
The texture transform for the normal texture.
Definition: effect_diff_norm_spec_refl.h:178
bool _useVertexColors
true: use vertex color for diffuse rather than material diffuse
Definition: effect_diff_norm_spec_refl.h:167
float _normalAmount
[0.0,1.0] "Weight" of the normal map
Definition: effect_diff_norm_spec_refl.h:163
unsigned int _ref_count
Reference count.
Definition: effect_diff_norm_spec_refl.h:146
unsigned int GetMaterialIndex() const
Definition: effect_diff_norm_spec_refl.h:224
int GetDiffuseTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:250
bool _normalMapFlipGreen
Definition: effect_diff_norm_spec_refl.h:173
void SetReflectionAmount(float value)
Definition: effect_diff_norm_spec_refl.h:332
void SetUseVertexColor(bool value)
Definition: effect_diff_norm_spec_refl.h:228
void SetSpecularTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:267
static const std::string EFFECT_TYPE_NAME
Backing storage for the human readable string for this effect type.
Definition: effect_diff_norm_spec_refl.h:76
int GetNormalTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:263
void SetDiffuseUVWSettings(float uOffset, float vOffset, float uTiling, float vTiling, float angle)
void SetReflectionTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:280
float GetNormalAmount() const
Definition: effect_diff_norm_spec_refl.h:315
TextureUVWMatrix _diffuseUVWMatrix
The texture transform for the diffuse texture.
Definition: effect_diff_norm_spec_refl.h:177
float GetDiffuseAmount() const
Definition: effect_diff_norm_spec_refl.h:302
float _reflectionAmount
[0.0,1.0] "Weight" of the reflection map
Definition: effect_diff_norm_spec_refl.h:165
float _diffuseAmount
[0.0,1.0] "Weight" of the diffuse map
Definition: effect_diff_norm_spec_refl.h:162
int GetReflectionTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:289
void SetNormalMapFlipGreen(bool value)
Definition: effect_diff_norm_spec_refl.h:345
virtual int Compare(const GlsRenderEffect *) const DISTI_METHOD_OVERRIDE
virtual void GetReferencedTextures(ReferencedTextureArray &referencedTextures) DISTI_METHOD_OVERRIDE
void SetNormalTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:254
bool GetNormalMapFlipGreen() const
Definition: effect_diff_norm_spec_refl.h:354
virtual void Release() DISTI_METHOD_OVERRIDE
Release a reference to this object.
virtual unsigned int GlsRenderEffect_ClassID() const DISTI_METHOD_OVERRIDE
static const int INVALID_INDEX
Value to represent an invalid texture index.
Definition: effect_diff_norm_spec_refl.h:198
bool operator==(const Effect_DiffNormSpecRefl &) const
int _diffuseTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:157
virtual GLint GetVertexAttribIndexForSemantic(int semanticEnum) DISTI_METHOD_OVERRIDE
DistiAttribDict * _attribDict
The attribute dictionary for this object.
Definition: effect_diff_norm_spec_refl.h:175
void GetSpecularUVWSettings(float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle)
void GetDiffuseUVWSettings(float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle)
virtual void AddRef() DISTI_METHOD_OVERRIDE
Add to this object's reference count.
virtual void SetupEffect(DynamicArray< Material > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3, unsigned int maxLightNum, unsigned int activeLightMask) DISTI_METHOD_OVERRIDE
void SetNormalAmount(float value)
Definition: effect_diff_norm_spec_refl.h:306
float GetSpecularAmount() const
Definition: effect_diff_norm_spec_refl.h:328
virtual GlsRenderEffect * Clone() const DISTI_METHOD_OVERRIDE
const Effect_DiffNormSpecRefl & operator=(const Effect_DiffNormSpecRefl &)
bool operator!=(const Effect_DiffNormSpecRefl &o) const
Definition: effect_diff_norm_spec_refl.h:217
float GetReflectionAmount() const
Definition: effect_diff_norm_spec_refl.h:341
int _specularTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:159
bool GetUseVertexColor() const
Definition: effect_diff_norm_spec_refl.h:237
virtual void GetReferencedMaterials(ReferencedMaterialArray &referencedMaterials) DISTI_METHOD_OVERRIDE
const std::string & EffectTypeName() DISTI_METHOD_OVERRIDE
Definition: effect_diff_norm_spec_refl.h:430
TextureUVWMatrix _specularUVWMatrix
The texture transform for the specular texture.
Definition: effect_diff_norm_spec_refl.h:179
Definition: gls_es20_effect.h:60
Type * Data()
Definition: gls_matrix.h:128
Definition: gls_render_effect.h:136
Definition: gls_render_effect.h:116
Definition: material.h:56
Definition: texture_palette.h:184
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The GlsMatrixAffine class.
The disti::GlsRenderEffect class.
The disti::GlsStateManager factory class. Creates an instance of a state manager that manages the GL ...
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47