diff --git a/src/app/tools/tankopedia/[id]/page.tsx b/src/app/tools/tankopedia/[id]/page.tsx index af7be71e9..ad20838f6 100644 --- a/src/app/tools/tankopedia/[id]/page.tsx +++ b/src/app/tools/tankopedia/[id]/page.tsx @@ -38,7 +38,7 @@ export default function Page({ params }: { params: { id: string } }) { mutateTankopediaTemporary((draft) => { draft.model.pose.yaw = 0; draft.model.pose.pitch = 0; - draft.mode = 'model'; + draft.mode = 'armor'; }); function handleKeyDown(event: KeyboardEvent) { diff --git a/src/components/ArmorMesh/components/Armor/index.tsx b/src/components/ArmorMesh/components/Armor/index.tsx index 1600e0e45..327a5aeff 100644 --- a/src/components/ArmorMesh/components/Armor/index.tsx +++ b/src/components/ArmorMesh/components/Armor/index.tsx @@ -143,11 +143,11 @@ export function ArmorMesh({ explosionRadius: { value: initialShell.explosionRadius ?? 0 }, }} /> - + /> */} ); diff --git a/src/components/ArmorMesh/components/Armor/shaders/vertex.glsl b/src/components/ArmorMesh/components/Armor/shaders/vertex.glsl index a55abd2c0..0e4d1407f 100644 --- a/src/components/ArmorMesh/components/Armor/shaders/vertex.glsl +++ b/src/components/ArmorMesh/components/Armor/shaders/vertex.glsl @@ -1,14 +1,13 @@ varying vec3 vNormal; varying vec3 vViewPosition; -varying float vZ; varying mat4 vProjectionMatrix; void main() { vec4 vViewPosition4 = modelViewMatrix * vec4(position, 1.0); + vViewPosition = vViewPosition4.xyz; - vZ = -(modelViewMatrix * vec4(position, 1.0)).z; vProjectionMatrix = projectionMatrix; vNormal = normalMatrix * normal; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); + gl_Position = projectionMatrix * vViewPosition4; } \ No newline at end of file