Sha256: 66fff68d2839bc64121ea14b5cf0d6ffcfaa99528b00e0f47e567dd233ef78f7

Contents?: true

Size: 746 Bytes

Versions: 10

Compression:

Stored size: 746 Bytes

Contents

// Copyright (C) 2007 Dave Griffiths
// Licence: GPLv2 (see COPYING)
// Fluxus Shader Library
// ---------------------
// Glossy Specular Reflection Shader
// A more controllable version of blinn shading,
// Useful for ceramic or fluids - from Advanced 
// Renderman, thanks to Larry Gritz

#define PROCESSING_LIGHT_SHADER

uniform mat4 modelview;
uniform mat4 transform;
uniform mat3 normalMatrix;

uniform vec4 lightPosition[8];

attribute vec4 vertex;
attribute vec3 normal;

varying vec3 N;
varying vec3 P;
varying vec3 V;
varying vec3 L;

void main() {    
  N = normalize(normalMatrix * normal); 
  P = vertex.xyz;
  V = -vec3(modelview * vertex);
  L = vec3(modelview * (lightPosition[0] - vertex));
  gl_Position = transform * vertex;
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.6.2 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.6.1 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.6.0 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.5.1 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.5.0 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.4.4 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.4.3 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.4.2 samples/processing_app/topics/shaders/data/GlossyVert.glsl
ruby-processing-2.4.1 samples/processing_app/topics/shaders/data/GlossyVert.glsl