mns-mini-zabor/utils/vertex.vert

14 lines
404 B
GLSL

vertexID = gl_VertexID;
vUv = uv;
float distanceToNextVertex = length(u_resolution - vec3(0.0, 0.0, 0.0));
vDistance = distanceToNextVertex;
vPosition = position.xyz + normal;
vec3 scale;
scale.x = length(modelMatrix[0].xyz);
scale.y = length(modelMatrix[1].xyz);
scale.z = length(modelMatrix[2].xyz);
// Применяем масштаб к позиции вершины
vPosition = position * scale;