Support Forum G3D Web Page |
For use with G3D::Shader. More...
Classes | |
class | glsl::BumpMap_glsl |
For use with G3D::Shader. More... | |
Namespaces | |
glsl | |
Macros | |
#define | BumpMap_glsl |
For use with G3D::Shader.
This file is included into NonShadowedPass.pix and ShadowMappedLightPass.pix.
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
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License
#define BumpMap_glsl |