css3 - How to properly declare variables in CSS custom fragment shader? -


for reason every time declare custom variable in css fragment shader, shader stops working. have no idea why case since i'm quite sure syntax correct.

here html code , 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> 

here fragment shader f2.fs:

void main() {     uniform float time;//remove line , shader work!      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 );  } 

instead of uniform float, tried float or vec4 test = vec4(1,1,1,1);, no matter shader won't applied every time tried declare custom variable. thoughts?

i'm not familiar shaders in css, in webgl have declare uniforms @ top level, outside of main.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -