mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
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:
parent
67cbda4be3
commit
167885707d
9 changed files with 88 additions and 28 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue