webgl: Add shader validation and translation

This commit adds angle-based validation and translation to WebGL
shaders.

The changes to the tex_image_2d test is neccessary (it was not valid
GLES 2.0 shader language).
This commit is contained in:
ecoal95 2015-08-29 18:42:42 +02:00
parent 67cbda4be3
commit 167885707d
9 changed files with 88 additions and 28 deletions

View file

@ -10,6 +10,7 @@
</style>
<canvas id="c" width="256" height="256"></canvas>
<script id="vertex_shader" type="x-shader/x-vertex">
precision mediump float;
attribute vec2 a_texCoord;
attribute vec2 a_position;
varying vec2 v_texCoord;
@ -21,6 +22,7 @@
</script>
<script id="fragment_shader" type="x-shader/x-fragment">
precision mediump float;
uniform sampler2D u_image;
varying vec2 v_texCoord;
void main() {