Sha256: f513f00140a69a4c8cc4b00e7988f46518e1682f34ecb3480d79a263046a2c50

Contents?: true

Size: 439 Bytes

Versions: 10

Compression:

Stored size: 439 Bytes

Contents

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

attribute vec4 vertex;
attribute vec3 normal;

varying vec3 reflectDir;

void main() {
  gl_Position = transform * vertex;
    
  vec3 ecNormal = normalize(normalMatrix * normal); // Vertex in eye coordinates
  vec3 ecVertex = vec3(modelview * vertex); // Normal vector in eye coordinates
  vec3 eyeDir = ecVertex.xyz;
  reflectDir = reflect(eyeDir, ecNormal);
}

Version data entries

10 entries across 10 versions & 1 rubygems

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