I’m attempting to convert some of my WebGL/ThreeJS shaders into TD GLSL Materials but I’m confused with the matrices setup in TD.
I’d like to access mvPosition like in my WebGL vertex shader here:
attribute vec3 position;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
void main() {
vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
gl_PointSize = -mvPosition.z * 0.8;
gl_Position = projectionMatrix * mvPosition;
}
For reference, its based on what I do using THREE.RawShaderMaterial
Thank you!