Support Forum       G3D Web Page     
Classes | Namespaces | Macros
BumpMap.glsl File Reference

For use with G3D::Shader. More...

Classes

class  glsl::BumpMap_glsl
 
For use with G3D::Shader. More...
 

Namespaces

 glsl
 

Macros

#define BumpMap_glsl
 

Detailed Description

For use with G3D::Shader.

This file is included into NonShadowedPass.pix and ShadowMappedLightPass.pix.

Created: 2007-12-18
Last modified: 2013-08-17

This file defines three variations of the following function:

void bumpMap(in sampler2D normalBumpMap, in float bumpMapScale, in float bumpMapBias, in vec2 texCoord, in vec3 tan_X, in vec3 tan_Y, in vec3 tan_Z, in float backside, in vec3 tsE, out vec3 wsN, out vec2 offsetTexCoord);

Input: normalBumpMap .xyz = tangent-space shading normal, .a - 0.5 = displacement from geometric surface bumpMapScale Multiplies the net displacement bumpMapBias Added to normalBumpMap.a texCoord texture coordinate in normalBumpMap tan_X unit tangent-space X vector (usually, the texture-space "u" axis) in world space. a.k.a. "tangent" tan_Y unit tangent-space Y vector (usually, the texture-space "v" axis) in world space. a.k.a. "binormal" tan_Z unit tangent-space Z vector (usually the surface normal) backside 1.0 if this is is a front face, -1.0 if this is a backface with two-sided lighting tsE unit vector to the center of projection, in tangent space

Output: wsN world-space shading normal at offsetTexCoord offsetTexCoord shading texture coordinate rawNormalLength Length of the normal before normalization, based on MIP-mapping of the normal: a measure of smoothness under MIP-mapping

See also
G3D::BumpMap, G3D::UniversalMaterial

G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License

Macro Definition Documentation

◆ BumpMap_glsl

#define BumpMap_glsl

documentation generated on Wed Nov 24 2021 08:01:50 using doxygen 1.8.15