diff options
author | Eric Anholt <[email protected]> | 2010-05-21 09:32:38 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-05-21 12:20:39 -0700 |
commit | 68fc4b415e322f6744299e39864fbc377c6eff74 (patch) | |
tree | 4bafffd8b0105174f3c5c0ae327a005be9145990 /progs/glsl/CH11-bumpmap.frag | |
parent | e4f4489e3fc0b36d72821b55794fb843b2b7fa5f (diff) |
Remove demos that have moved to git+ssh://git.freedesktop.org/git/mesa/demos.
The remaining programs are ones I've had difficulty finding a build
environment for to make the build system or are unit tests that should
probably live next to their code instead. Hopefully people can bring
over the build for remaining pieces they care about.
Diffstat (limited to 'progs/glsl/CH11-bumpmap.frag')
-rw-r--r-- | progs/glsl/CH11-bumpmap.frag | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/progs/glsl/CH11-bumpmap.frag b/progs/glsl/CH11-bumpmap.frag deleted file mode 100644 index e12c5d374cd..00000000000 --- a/progs/glsl/CH11-bumpmap.frag +++ /dev/null @@ -1,41 +0,0 @@ -// -// Fragment shader for procedural bumps -// -// Authors: John Kessenich, Randi Rost -// -// Copyright (c) 2002-2006 3Dlabs Inc. Ltd. -// -// See 3Dlabs-License.txt for license information -// - -varying vec3 LightDir; -varying vec3 EyeDir; - -uniform vec3 SurfaceColor; // = (0.7, 0.6, 0.18) -uniform float BumpDensity; // = 16.0 -uniform float BumpSize; // = 0.15 -uniform float SpecularFactor; // = 0.5 - -void main() -{ - vec3 litColor; - vec2 c = BumpDensity * gl_TexCoord[0].st; - vec2 p = fract(c) - vec2(0.5); - - float d, f; - d = p.x * p.x + p.y * p.y; - f = inversesqrt(d + 1.0); - - if (d >= BumpSize) - { p = vec2(0.0); f = 1.0; } - - vec3 normDelta = vec3(p.x, p.y, 1.0) * f; - litColor = SurfaceColor * max(dot(normDelta, LightDir), 0.0); - vec3 reflectDir = reflect(LightDir, normDelta); - - float spec = max(dot(EyeDir, reflectDir), 0.0); - spec *= SpecularFactor; - litColor = min(litColor + spec, vec3(1.0)); - - gl_FragColor = vec4(litColor, 1.0); -} |