diff options
author | Zou Nan hai <[email protected]> | 2007-06-21 10:22:28 +0800 |
---|---|---|
committer | Zou Nan hai <[email protected]> | 2007-06-21 10:22:28 +0800 |
commit | d19d0596daf004b56d80f78fa1a329b43c2ebf94 (patch) | |
tree | 24a911efdfe23a8e4cbec85d519875d78eb64be6 /progs/glsl/CH11-bumpmap.frag.txt | |
parent | 58eac1bbf320b4104c3158aaeca4726f1a59daf9 (diff) |
support branch and loop in pixel shader
most of the sample working with some small modification
Diffstat (limited to 'progs/glsl/CH11-bumpmap.frag.txt')
-rw-r--r-- | progs/glsl/CH11-bumpmap.frag.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/progs/glsl/CH11-bumpmap.frag.txt b/progs/glsl/CH11-bumpmap.frag.txt index 063576f5a3c..1467f767ec4 100644 --- a/progs/glsl/CH11-bumpmap.frag.txt +++ b/progs/glsl/CH11-bumpmap.frag.txt @@ -33,7 +33,7 @@ void main() litColor = SurfaceColor * max(dot(normDelta, LightDir), 0.0); vec3 reflectDir = reflect(LightDir, normDelta); - float spec = max(dot(EyeDir, reflectDir), 0.0); + float spec = max(dot(normalize(EyeDir), reflectDir), 0.0); spec *= SpecularFactor; litColor = min(litColor + spec, vec3(1.0)); |