diff --git a/utils/vertex.vert b/utils/vertex.vert index 8e697df..6609613 100644 --- a/utils/vertex.vert +++ b/utils/vertex.vert @@ -1,6 +1,14 @@ vertexID = gl_VertexID; -vPosition = position.xyz + normal; 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; \ No newline at end of file