mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: opaque he
This commit is contained in:
1 parent
9dc4483d70
commit
fe0fdc0964
3 files changed
+22
-14
No files matched your search
@@ -261,7 +261,7 @@ export function VersusBar() {
|
||||
<ModuleButton
|
||||
selected={antagonist.shell.id === shell.id}
|
||||
type="shell"
|
||||
shell={shell.type}
|
||||
shell={shell.icon}
|
||||
rowChild
|
||||
first={index === 0}
|
||||
key={shell.id}
|
||||
|
||||
@@ -7,6 +7,7 @@ uniform float ricochet;
|
||||
uniform float caliber;
|
||||
uniform float normalization;
|
||||
uniform bool canRichochet;
|
||||
uniform bool canSplash;
|
||||
|
||||
void main() {
|
||||
vec3 normalizedNormal = normalize(vNormal);
|
||||
@@ -39,12 +40,23 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
float h = penetrationChance / PI;
|
||||
float s = 1.0;
|
||||
float v = 1.0;
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(h + K.xyz) * 6.0 - K.www);
|
||||
vec3 rgb = v * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), s);
|
||||
if (canSplash) {
|
||||
float h = mix(20.0 / 360.0, 1.0 / PI, penetrationChance);
|
||||
float s = 1.0;
|
||||
float v = 1.0;
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(h + K.xyz) * 6.0 - K.www);
|
||||
vec3 rgb = v * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), s);
|
||||
|
||||
csm_DiffuseColor = vec4(rgb, 1.0);
|
||||
csm_DiffuseColor = vec4(rgb, 1.0);
|
||||
} else {
|
||||
float h = mix(0.0, 1.0 / PI, penetrationChance);
|
||||
float s = 1.0;
|
||||
float v = 1.0;
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(h + K.xyz) * 6.0 - K.www);
|
||||
vec3 rgb = v * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), s);
|
||||
|
||||
csm_DiffuseColor = vec4(rgb, 1.0);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,7 @@
|
||||
import { Button, Text } from '@radix-ui/themes';
|
||||
import { ComponentProps } from 'react';
|
||||
import { asset } from '../core/blitzkrieg/asset';
|
||||
import {
|
||||
ShellType,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
Tier,
|
||||
} from '../core/blitzkrieg/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS, Tier } from '../core/blitzkrieg/tankDefinitions';
|
||||
|
||||
type ModuleButtonProps = Omit<ComponentProps<typeof Button>, 'type'> & {
|
||||
selected?: boolean;
|
||||
@@ -20,7 +16,7 @@ type ModuleButtonProps = Omit<ComponentProps<typeof Button>, 'type'> & {
|
||||
}
|
||||
| {
|
||||
type: 'shell';
|
||||
shell: ShellType;
|
||||
shell: string;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user