Closed Pitel closed 13 years ago
You can't achieve this with material array (this is just for multi-pass rendering of the same geometry using different materials).
You'll need create a new ShaderMaterial
based on MeshLambertMaterial
, adding your own uniforms and vertex displacement code to vertex shader:
https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLShaders.js#L1263
I've plane geometry with one
LambertMaterial
and oneShaderMaterial
, which is just vertex shader (doing simple sinus waves). The result is lambert shaded plane with sinus waves above and it (screenshot). The expected result would be having lamber shaded sinus waves, or just not having multiple geometries, which is confusing.