[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] hi all - shader scripts

Hi guys, this is my first post to the group. My name is Schell and I
live in the north bay of California. I'm a web application programmer
by day and am looking forward to diving into WebGL. My first question
is about shaders. I'm following the cube tutorial at
http://khronos.org/webgl/wiki/Tutorial and was wondering what language
these shaders are scripted in.


    uniform mat4 u_modelViewProjMatrix;
    uniform mat4 u_normalMatrix;
    uniform vec3 lightDir;

    attribute vec3 vNormal;
    attribute vec4 vTexCoord;
    attribute vec4 vPosition;

    varying float v_Dot;
    varying vec2 v_texCoord;

    void main()
        gl_Position = u_modelViewProjMatrix * vPosition;
        v_texCoord = vTexCoord.st;
        vec4 transNormal = u_normalMatrix * vec4(vNormal, 1);
        v_Dot = max(dot(transNormal.xyz, lightDir), 0.0);

It looks like C, with a bunch of datatypes I've never seen before.
You are currently subscribe to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: