From 7c4f7a1a1c5708892941803b85c6cbf0d425c19f Mon Sep 17 00:00:00 2001 From: aarizona Date: Tue, 1 Oct 2024 20:52:44 +0300 Subject: [PATCH] shader --- utils/vertex.vert | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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