Shader not working anymore?
-
Shader from the doc:
void mainImage( out vec4 fragColor, in vec2 fragCoord ) { // Normalized pixel coordinates (from 0 to 1) vec2 uv = fragCoord/iResolution.xy; // Time varying pixel color vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4)); // Output to screen fragColor = vec4(col,1.0); }
Interface:! ERROR: 0:0: '' : syntax error: #line{GLSL::Interface::bgShader2} Interface:! ERROR: 0:1: '(' : syntax error: syntax error{GLSL::Interface::bgShader2}
Use Open GL
is enabled -
@ustk Where in the docs? It's using a wrong syntax, you need to define the main function without parameters:
void main() { // Normalized pixel coordinates (from 0 to 1) vec2 uv = fragCoord/iResolution.xy; // Time varying pixel color vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4)); // Output to screen fragColor = pixelAlpha * vec4(col,1.0); }
-
@Christoph-Hart Oh yes my bad, actually I'm using the good syntax inside the project and it does not work for me, neither my old shader despite it was working before...