I managed to get some working qfx shader files in the past..
I took out the fragment code in this one, so it won't work until you add some actual shader code.
Also, I think q3d has a texture uniform already created.. and creating your own texture uniforms requires some editing of the plugin.
Basically, the shader stuff was to be rewritten, according to Quazi, and I was told it's probably not a good idea to use it.
<shadertype>ShaderMaterial</shadertype>
<uniforms>(function(){
var uniform = {
uniformCall : function(){
return {
texture: { type: 't', value: new THREE.Texture() },
amplitude: {type:'f', value: 0},
textureWidth: {type:'f', value: 256.0},
textureHeight: {type:'f', value: 256.0},
u_time: {type:'f', value: 0},
u_resolution: {type:'v2', value: new THREE.Vector2() },
camPos: {type: 'v3',value: new THREE.Vector3() }
};
}
}
return uniform;
})();
</uniforms>
<vertexshader>
varying vec2 vUv;
varying vec3 vNormal;
void main() {
vUv = uv;
//vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
//gl_Position = projectionMatrix * mvPosition;
gl_Position = projectionMatrix *
modelViewMatrix *
vec4(position,1.0);
}
</vertexshader>
<fragmentshader>
uniform float u_time;
uniform vec2 u_resolution;
uniform float textureWidth;
uniform float textureHeight;
uniform vec3 camPos;
uniform sampler2D texture;
varying vec2 vUv;
varying vec3 vNormal;
etc.. etc...
</fragmentshader>
[/code:9q3sbrrq]