mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: high precision depth map
This commit is contained in:
1 parent
e094267223
commit
77ac1453f3
2 files changed
+4
-12
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
import { Card, Flex, Tabs, Theme } from '@radix-ui/themes';
|
import { Card, Flex, Tabs, Theme } from '@radix-ui/themes';
|
||||||
|
import { PerspectiveCamera } from '@react-three/drei';
|
||||||
import { Canvas } from '@react-three/fiber';
|
import { Canvas } from '@react-three/fiber';
|
||||||
import { Suspense, use, useEffect, useRef, useState } from 'react';
|
import { Suspense, use, useEffect, useRef, useState } from 'react';
|
||||||
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
||||||
@@ -158,12 +159,8 @@ export function TankSandbox() {
|
|||||||
</Tabs.Root>
|
</Tabs.Root>
|
||||||
|
|
||||||
<div style={{ height: '100%' }}>
|
<div style={{ height: '100%' }}>
|
||||||
<Canvas
|
<Canvas shadows ref={canvas} onPointerDown={handlePointerDown}>
|
||||||
shadows
|
<PerspectiveCamera makeDefault fov={25} far={32} />
|
||||||
ref={canvas}
|
|
||||||
camera={{ fov: 25 }}
|
|
||||||
onPointerDown={handlePointerDown}
|
|
||||||
>
|
|
||||||
<Controls />
|
<Controls />
|
||||||
<SceneProps />
|
<SceneProps />
|
||||||
|
|
||||||
@@ -176,7 +173,6 @@ export function TankSandbox() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Options canvas={canvasWrapper} isFullScreen={isFullScreen} />
|
<Options canvas={canvasWrapper} isFullScreen={isFullScreen} />
|
||||||
|
|
||||||
<RotationInputs />
|
<RotationInputs />
|
||||||
</Flex>
|
</Flex>
|
||||||
</Theme>
|
</Theme>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ uniform float caliber;
|
|||||||
uniform float ricochetAngle;
|
uniform float ricochetAngle;
|
||||||
uniform float normalization;
|
uniform float normalization;
|
||||||
uniform sampler2D externalModuleMask;
|
uniform sampler2D externalModuleMask;
|
||||||
uniform sampler2D spacedArmorDepth;
|
uniform highp sampler2D spacedArmorDepth;
|
||||||
uniform sampler2D spacedArmorMask;
|
uniform sampler2D spacedArmorMask;
|
||||||
uniform vec2 resolution;
|
uniform vec2 resolution;
|
||||||
varying mat4 vProjectionMatrix;
|
varying mat4 vProjectionMatrix;
|
||||||
@@ -112,8 +112,4 @@ void main() {
|
|||||||
} else {
|
} else {
|
||||||
gl_FragColor = vec4(color, (1.0 - penetrationChance) * 0.5);
|
gl_FragColor = vec4(color, (1.0 - penetrationChance) * 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (isUnderExternalModule) {
|
|
||||||
// gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user