Initial transfer of larger repo from git. IF full history and branches are needed must go to github at https://github.com/DulcisL/CCUCoding.git
This commit is contained in:
commit
c09ce40be0
4048 files changed
+603256
No files matched your search
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<script id="vertex-shader1" type="x-shader/x-vertex">
|
||||
#version 300 es
|
||||
|
||||
in vec4 aPosition;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_PointSize = 5.0;
|
||||
gl_Position = aPosition;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="vertex-shader2" type="x-shader/x-vertex">
|
||||
#version 300 es
|
||||
|
||||
in vec4 aPosition;
|
||||
in vec2 aTexCoord;
|
||||
|
||||
out vec2 vTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = aPosition;
|
||||
vTexCoord = aTexCoord;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="fragment-shader1" type="x-shader/x-fragment">
|
||||
#version 300 es
|
||||
|
||||
precision mediump float;
|
||||
|
||||
out vec4 fColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
fColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
</script>
|
||||
<script id="fragment-shader2" type="x-shader/x-fragment">
|
||||
#version 300 es
|
||||
precision mediump float;
|
||||
|
||||
in vec2 vTexCoord;
|
||||
out vec4 fColor;
|
||||
|
||||
uniform sampler2D uTextureMap;
|
||||
|
||||
void main()
|
||||
{
|
||||
float s = 4.0;
|
||||
float d = 1.0/1024.0;
|
||||
float x = vTexCoord.x;
|
||||
float y = vTexCoord.y;
|
||||
vec4 t = (//texture(uTextureMap, vec2(x,y))
|
||||
+texture(uTextureMap, vec2(x+d, y))
|
||||
+texture(uTextureMap, vec2(x, y+d))
|
||||
+texture(uTextureMap, vec2(x-d, y))
|
||||
+texture(uTextureMap, vec2(x, y-d)))/s;
|
||||
//gl_FragColor.r = t.r;
|
||||
if(t.r > 0.0) fColor.r = 1.0;
|
||||
else fColor.r = 0.0;
|
||||
fColor.g = t.g;
|
||||
fColor.b = t.b;
|
||||
fColor.a = 1.0;
|
||||
//fColor = t;
|
||||
if(t.r>0.0) fColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
else fColor = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
fColor = t;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../Common/InitShaders.js"></script>
|
||||
<script type="text/javascript" src="../Common/MVnew.js"></script>
|
||||
<script type="text/javascript" src="render4.js"></script>
|
||||
|
||||
<body>
|
||||
<canvas id="gl-canvas" width="1024" height="1024">
|
||||
Oops ... your browser doesn't support the HTML5 canvas element
|
||||
</canvas>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user