12-04-2015, 12:50 PM
Yeah, that is a nice shader (another in my list too. )
You jumped over one of my "tips". Check the console log:
Comments in C:
- one line: // here come the one line comment
- many lines: /* here come
the block of lines
to be commented
*/
Reading the message:
- Info: Fragment:
That inform where the error occurred: Fragment shader - the file with .fs extension; If you see Vertex, then you need to look into the Vertex shader file (.vs);
- WARNING: 0:1: '%' : symbol not available in current GLSL version
ERROR: 0:1: '%' : syntax error parse error
That 0:1: for warning and/or error means the line number where you need to check the problem.
If you see a typical Erlang message on the console, that means you probably need to look into the .auv file.
______
Those variable in the top that begin with uniform are parameters, so they come from somewhere. At that site the time must be a parameter made available by its API.
In the code you can notice that time is used to define a rotation angle around Y. So, you can set your slider to allow you to select a value between 0.0-360.0 degrees (a more understandable value). This value must be converted to radians that is the correct value used with the trigonometric functions.
you can add this const to the begin of the file (after the variable declarations):
#define pi 3.14159265359;
and, by considering you change the time variable name to angle (a more appropriated name), you can replace:
vec3 ro = roty(vec3(3.),time*0.3);
with:
float a = angle/360.0 * 2.0*pi;
vec3 ro = roty(vec3(3.),a);
You jumped over one of my "tips". Check the console log:
Quote:Trying OpenGL modesYou used '%' for the comment in the GLSL file - my tip you ignorede: "- you need to know a little of C language since GLSL language is very close to it;"
[{buffer_size,32},{depth_size,32},{stencil_size,8},{accum_size,16}]
Actual: RGBA: 8 8 8 8 Depth: 24 Stencil: 8 Accum: 16 16 16 16
Using GPU shaders.
Using GPU shaders.
AUV: Error Couldn't read file: f:/Program Files/wings3d_1.5.4/lib/wings-1.5.4/plugins/autouv/test_shader.fs
AUV: Edge Filter ok
AUV: No shader program found skipped 844
w h: 7 14
Info: Fragment:
WARNING: 0:1: '%' : symbol not available in current GLSL version
ERROR: 0:1: '%' : syntax error parse error
AUV: Error Compilation failed
AUV: Edge Filter ok
AUV: No shader program found skipped 844
Comments in C:
- one line: // here come the one line comment
- many lines: /* here come
the block of lines
to be commented
*/
Reading the message:
- Info: Fragment:
That inform where the error occurred: Fragment shader - the file with .fs extension; If you see Vertex, then you need to look into the Vertex shader file (.vs);
- WARNING: 0:1: '%' : symbol not available in current GLSL version
ERROR: 0:1: '%' : syntax error parse error
That 0:1: for warning and/or error means the line number where you need to check the problem.
If you see a typical Erlang message on the console, that means you probably need to look into the .auv file.
______
Those variable in the top that begin with uniform are parameters, so they come from somewhere. At that site the time must be a parameter made available by its API.
In the code you can notice that time is used to define a rotation angle around Y. So, you can set your slider to allow you to select a value between 0.0-360.0 degrees (a more understandable value). This value must be converted to radians that is the correct value used with the trigonometric functions.
you can add this const to the begin of the file (after the variable declarations):
#define pi 3.14159265359;
and, by considering you change the time variable name to angle (a more appropriated name), you can replace:
vec3 ro = roty(vec3(3.),time*0.3);
with:
float a = angle/360.0 * 2.0*pi;
vec3 ro = roty(vec3(3.),a);