Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: conformance/shaders/misc/shared.vert

Issue 8344024: Remove older revision of webgl conformance tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « conformance/shaders/misc/non-ascii-comments.vert ('k') | conformance/shaders/misc/shared-a.frag » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: conformance/shaders/misc/shared.vert
===================================================================
--- conformance/shaders/misc/shared.vert (revision 106149)
+++ conformance/shaders/misc/shared.vert (working copy)
@@ -1,41 +0,0 @@
-// shared vertex shader should succeed.
-uniform mat4 viewProjection;
-uniform vec3 worldPosition;
-uniform vec3 nextPosition;
-uniform float fishLength;
-uniform float fishWaveLength;
-uniform float fishBendAmount;
-attribute vec4 position;
-attribute vec2 texCoord;
-varying vec4 v_position;
-varying vec2 v_texCoord;
-varying vec3 v_surfaceToLight;
-void main() {
- vec3 vz = normalize(worldPosition - nextPosition);
- vec3 vx = normalize(cross(vec3(0,1,0), vz));
- vec3 vy = cross(vz, vx);
- mat4 orientMat = mat4(
- vec4(vx, 0),
- vec4(vy, 0),
- vec4(vz, 0),
- vec4(worldPosition, 1));
- mat4 world = orientMat;
- mat4 worldViewProjection = viewProjection * world;
- mat4 worldInverseTranspose = world;
-
- v_texCoord = texCoord;
- // NOTE:If you change this you need to change the laser code to match!
- float mult = position.z > 0.0 ?
- (position.z / fishLength) :
- (-position.z / fishLength * 2.0);
- float s = sin(mult * fishWaveLength);
- float a = sign(s);
- float offset = pow(mult, 2.0) * s * fishBendAmount;
- v_position = (
- worldViewProjection *
- (position +
- vec4(offset, 0, 0, 0)));
- v_surfaceToLight = (world * position).xyz;
- gl_Position = v_position;
-}
-
« no previous file with comments | « conformance/shaders/misc/non-ascii-comments.vert ('k') | conformance/shaders/misc/shared-a.frag » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698