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