mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: removed z-fighting
This commit is contained in:
1 parent
7b6e291a0a
commit
b47e6436e7
3 files changed
+5
-6
No files matched your search
@@ -38,7 +38,7 @@ export default function Page({ params }: { params: { id: string } }) {
|
|||||||
mutateTankopediaTemporary((draft) => {
|
mutateTankopediaTemporary((draft) => {
|
||||||
draft.model.pose.yaw = 0;
|
draft.model.pose.yaw = 0;
|
||||||
draft.model.pose.pitch = 0;
|
draft.model.pose.pitch = 0;
|
||||||
draft.mode = 'model';
|
draft.mode = 'armor';
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleKeyDown(event: KeyboardEvent) {
|
function handleKeyDown(event: KeyboardEvent) {
|
||||||
|
|||||||
@@ -143,11 +143,11 @@ export function ArmorMesh({
|
|||||||
explosionRadius: { value: initialShell.explosionRadius ?? 0 },
|
explosionRadius: { value: initialShell.explosionRadius ?? 0 },
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<meshBasicMaterial
|
{/* <meshBasicMaterial
|
||||||
transparent
|
transparent
|
||||||
color="#ff0000"
|
color="#ff0000"
|
||||||
opacity={Math.random()}
|
opacity={Math.random()}
|
||||||
/>
|
/> */}
|
||||||
</mesh>
|
</mesh>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
varying vec3 vNormal;
|
varying vec3 vNormal;
|
||||||
varying vec3 vViewPosition;
|
varying vec3 vViewPosition;
|
||||||
varying float vZ;
|
|
||||||
varying mat4 vProjectionMatrix;
|
varying mat4 vProjectionMatrix;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 vViewPosition4 = modelViewMatrix * vec4(position, 1.0);
|
vec4 vViewPosition4 = modelViewMatrix * vec4(position, 1.0);
|
||||||
|
|
||||||
vViewPosition = vViewPosition4.xyz;
|
vViewPosition = vViewPosition4.xyz;
|
||||||
vZ = -(modelViewMatrix * vec4(position, 1.0)).z;
|
|
||||||
vProjectionMatrix = projectionMatrix;
|
vProjectionMatrix = projectionMatrix;
|
||||||
vNormal = normalMatrix * normal;
|
vNormal = normalMatrix * normal;
|
||||||
|
|
||||||
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
gl_Position = projectionMatrix * vViewPosition4;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user