I have a RawShaderMaterial with lighting for InstancedBufferGeometry
How can I cast and receive shadows with this shader?
Here is my material:
var uniforms = Object.assign( THREE.UniformsLib['lights'], { map: { type: "t", value: texture }, } ); var material = new THREE.RawShaderMaterial( { lights: true, uniforms: uniforms, vertexShader: document.getElementById( 'vs' ).textContent, fragmentShader: document.getElementById( 'fs' ).textContent, transparent: false } );
Full example: http://thegrook.com/three.js/shadow1.html
Thanks
0 comments:
Post a Comment