Skip to content

Commit

Permalink
fixed sprite gizmo shader
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Oct 20, 2024
1 parent e6864d9 commit 5607809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/resources/shaders/sprite_gizmo.shader
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
texCoord = vertexTexCoord;
color = vertexColor;
vec2 vertexOffset = S_RotateVec2(vertexTexCoord * 2.0 - 1.0, rotation);
vec4 worldPosition = instanceData.worldMatrix * vec4(vertexPosition, 1.0);
vec3 offset = (vertexOffset.x * fyrox_cameraData.sideVector + vertexOffset.y * cameraData.upVector) * size;
vec4 worldPosition = fyrox_instanceData.worldMatrix * vec4(vertexPosition, 1.0);
vec3 offset = (vertexOffset.x * fyrox_cameraData.sideVector + vertexOffset.y * fyrox_cameraData.upVector) * size;
gl_Position = fyrox_cameraData.viewProjectionMatrix * (worldPosition + vec4(offset.x, offset.y, offset.z, 0.0));
}
"#,
Expand Down

0 comments on commit 5607809

Please sign in to comment.