how can i write this without; ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);', uncommenting it break my animations.
how can i make the shader update the colour with the normals being relative to the world?
https://jsfiddle.net/lunchie/xwa47u0t/1/
skinnedMesh.material = new THREE.ShaderMaterial( {
vertexShader: [
'#include <skinning_pars_vertex>',
'varying vec3 vNormal;',
'void main() {',
'#include <skinbase_vertex>',
'#include <begin_vertex>',
'#include <skinning_vertex>',
'#include <project_vertex>',
' vNormal = normal;',
// ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',
'}'
].join( '\n' ),
fragmentShader: [
'varying vec3 vNormal;',
'void main() {',
' gl_FragColor = vec4(abs(vNormal), 1.0);',
'}'
].join( '\n' ),
skinning: true
} );
i may be using words incorrectly, visually what i want the shader to look like there is a blue light shining on the model from x = -1, and x = 1 , a red light from z = -1,and z = 1 , and a green light from y = -1,and y = 1
chatGTP is sujesting to use things like gltf.parser.json.vendortexture or extras is that is that worth looking into? my model dosent have those properties. (also looking for a better way to phrase this question)