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.
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.
Post Details
- Posted
- 9 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/janusVR/com...