Merge branch 'main' into data-driven

This commit is contained in:
tresabhi committed 2026-11-30 23:08:43 -06:00
commit c4bad57271
34 files changed
+986 -992

No files matched your search

@@ -4,7 +4,8 @@ varying vec3 vNormal;
varying vec3 vViewPosition;
uniform float opacity;
uniform float thickness;
uniform float thicknessCoefficient;
varying float vThickness;
uniform float penetration;
uniform float caliber;
uniform float ricochet;
@@ -43,6 +44,8 @@ vec3 getPenetrationColor(bool isThreeCalibersRule, bool couldHaveRicochet) {
void main() {
#include <clipping_planes_fragment>
float thickness = vThickness * thicknessCoefficient;
vec2 screenCoord = gl_FragCoord.xy / resolution;
vec4 spacedArmorData = texture2D(spacedArmorBuffer, screenCoord);
bool isUnderSpacedArmor = spacedArmorData.a != 0.0;
@@ -2,12 +2,31 @@ precision mediump float;
varying vec3 vNormal;
varying vec3 vViewPosition;
varying float vThickness;
#include <batching_pars_vertex>
void main() {
vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
vec4 localPosition = vec4(position, 1.0);
vec3 localNormal = normal;
#ifdef USE_BATCHING
#include <batching_vertex>
localPosition = batchingMatrix * localPosition;
localNormal = normalize(mat3(batchingMatrix) * localNormal);
#endif
#ifdef USE_BATCHING_COLOR
vThickness = getBatchingColor(getIndirectIndex(gl_DrawID)).r;
#else
vThickness = 0.0;
#endif
vec4 mvPosition = modelViewMatrix * localPosition;
vViewPosition = mvPosition.xyz;
vNormal = normalMatrix * normal;
vNormal = normalMatrix * localNormal;
gl_Position = projectionMatrix * mvPosition;
}