Sha256: 153546e66bcdc291219f40461c98f76b0059593de9474d64a2fe6e988a2c8d2f

Contents?: true

Size: 560 Bytes

Versions: 26

Compression:

Stored size: 560 Bytes

Contents

shared attribute vec4 VERTEX_POSITION;
                
void main(void) {
  /*
    we do our own projection to form the paraboloid, so we
    can ignore the projection matrix entirely.
   */
  vec4 pos = mvMatrix * VERTEX_POSITION;

  pos = vec4(pos.xyz / pos.w, pos.w);

  pos.z *= DP_DIRECTION;

  float L = length(pos.xyz);
  pos /= L;
  vClip = pos.z;

  pos.z += 1.0;
  pos.x /= pos.z;
  pos.y /= pos.z;
  pos.z = (L - DP_SHADOW_NEAR) / (DP_SHADOW_FAR - DP_SHADOW_NEAR);
  pos.w = 1.0;

  vPos = pos;
  export(vec4, Position, pos);
  gl_Position = pos;
}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
jax-2.0.12 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.11 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.10 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.9 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.8 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.7 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.6 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.5 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.4 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.3 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.2 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.1 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-2.0.0 lib/assets/javascripts/shaders/paraboloid/vertex.glsl
jax-1.1.1 builtin/app/shaders/paraboloid/vertex.ejs
jax-1.1.0 builtin/app/shaders/paraboloid/vertex.ejs
jax-1.1.0.rc1 builtin/app/shaders/paraboloid/vertex.ejs
jax-1.0.1 builtin/shaders/paraboloid/vertex.ejs
jax-1.0.1.rc2 builtin/shaders/paraboloid/vertex.ejs
jax-1.0.1.rc1 builtin/shaders/paraboloid/vertex.ejs
jax-1.0.0 builtin/shaders/paraboloid/vertex.ejs