Whenever I attempt to define a custom variable in my CSS fragment shader, the shader inexplicably ceases to function. Despite being confident in the syntax, I can't figure out why this issue persists.
Below is the excerpt of my HTML code and CSS:
#holder{
width:600;
height:600;
-webkit-filter :custom(url(v.vs) mix(url(f2.fs) multiply source-over), 20 20);
}
...
...
<div id="holder"></div>
This is the contents of my fragment shader f2.fs:
void main()
{
uniform float time;//if this line is removed, the shader works!
css_MixColor = vec4(0.738, 0.821, 0.321, 1.0);
css_ColorMatrix = mat4(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1 );
}
Despite trying various declarations like uniform float
, float
, or vec4 test = vec4(1,1,1,1);
, the shader refuses to apply whenever a custom variable is involved. Any insights on what might be causing this?