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

Side by Side Diff: third_party/gles_book_examples/Chapter_13/ProceduralTextures/checker.fs

Issue 543002: Renamed gles_book_examples to gles2_book to make it shorter and more correct.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifdef GL_ES
2 precision highp float;
3 #endif
4
5 uniform int frequency;
6 uniform vec4 color0;
7 uniform vec4 color1;
8
9 varying vec2 v_st;
10
11 void
12 main()
13 {
14 float s, t, delta;
15
16 s = mod(floor(v_st.x * float(frequency * 2)), 2.0);
17 t = mod(floor(v_st.y * float(frequency * 2)), 2.0);
18 delta = abs(s - t);
19
20 gl_FragColor = mix(color1, color0, delta);
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698