Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't initialise shader VALIDATE_STATUS
    primarykey
    data
    text
    <p>Is it possible to somehow modify this fragment shader so that it doesn't use the oes_texture_float extension? Because I get an error on the machine which is supposed to run a webgl animation. </p> <p>I set up my scene using three.js webglrenderer and a cube with a shadermaterial applied to it. On My macbook pro, everything works fine, but on some windows machine I get the error "float textures not supported" (I've searched and found that this probably has to do with oes_texture_float extension)</p> <p>So I'm guessing I need to change my fragment shader? Or am I missing the point completely?</p> <pre><code>&lt;script type="x-shader/x-vertex" id="vertexshader"&gt; // switch on high precision floats #ifdef GL_ES precision highp float; #endif void main() { gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } &lt;/script&gt; &lt;script type="x-shader/x-fragment" id="fragmentshader"&gt; #ifdef GL_ES precision mediump float; #endif #define PI 3.14159265 uniform float time; uniform vec2 resolution; float f(float x) { return (sin(x * 1.50 * PI ) + 19.0); } float q(vec2 p) { float s = (f(p.x + 0.85)) / 2.0; float c = smoothstep(0.9, 1.20, 1.0 - abs(p.y - s)); return c; } vec3 aurora(vec2 p, float time) { vec3 c1 = q( vec2(p.x, p.y / 0.051) + vec2(time / 3.0, -0.3)) * vec3(2.90, 0.50, 0.10); vec3 c2 = q( vec2(p.x, p.y / 0.051) + vec2(time, -0.2)) * vec3(1.3, .6, 0.3); vec3 c3 = q( vec2(p.x, p.y / 0.051) + vec2(time / 5.0, -0.5)) * vec3(1.7, 0.4, 0.20); return c1+c2+c3; } void main( void ) { vec2 p = ( gl_FragCoord.xy / resolution.xy ); vec3 c = aurora(p, time); gl_FragColor = vec4(1.0-c, c); } &lt;/script&gt; </code></pre> <p>EDIT: this has nothing to do with the floating point texture, but rather with something in my fragment shader. Three.js gives me the error: "Can't initialise shader, VALIDATE_STATUS"</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload