Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

7
http://www.dgp.toronto.edu/~mccrae/projects/firebox/home2/graphspheff.txt needs #version 130
Author Summary
haagch is in version
Post Body

Better clickable link: http://www.dgp.toronto.edu/~mccrae/projects/firebox/home2/graphspheff.txt

I'm not actually compiling it as is, I'm compiling it after dumping it by running janusvr with MESA_GLSL=log. This is the source I am compiling (minus the error message at the end that mesa dumped into it):

/* Shader 42 source, checksum 0 */
#define lowp
#define mediump
#define highp
uniform sampler2D iChannel0;
uniform float iGlobalTime;

void main(void) {
    vec4 col = texture(iChannel0,gl_TexCoord[0].st);
    float i = abs(sin(15.*col.w iGlobalTime*6.)*3.*col.w)*.7;
    gl_FragColor = vec4(i*.4,i*.48,i,i .8);
}

/* Compile status: fail */
/* Log Info: */
0:8(13): error: no matching function for call to `texture(sampler2D, vec2)'; candidates are:

glslangValidator also doesn't like this shader.

The real reason is that GLSL compilers are supposed to fall back to #version 110 if no version is given.

With #version 130 it compiles with mesa's glsl compiler and glslangValidator doesn't complain either.

The tricky thing is that janusvr adds

#define lowp
#define mediump
#define highp

at the beginning, so the shader txt can't include the version, because else we get 0:5(1): preprocessor error: #version must appear on the first line.

Adding the version in janusvr is maybe not a good idea because maybe other people would like to use other GLSL versions.

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
12,255
Link Karma
1,066
Comment Karma
11,189
Profile updated: 3 days ago
Posts updated: 8 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 years ago