refine alternative view rendering

- Adjusted shader logic to only draw borders in alternative view
- Updated comments for better understanding of rendering behavior in alternative view mode.
- Simplified color blending
This commit is contained in:
scamiv
2026-01-12 23:21:38 +01:00
parent 723a2c3952
commit c12f2d6330
@@ -3073,9 +3073,10 @@ export class TerritoryWebGLRenderer {
vec3 baseTerrainColor = terrainColor(terrain);
if (u_alternativeView) {
// Start with terrain as base
// Alt view: terrain + borders only, no territory fill
vec3 color = baseTerrainColor;
if (owner != 0u) {
if (owner != 0u && isBorder) {
// Only draw borders, not territory fill
uint relationAlt = relationCode(owner, uint(u_viewerId));
vec4 altColor = u_altNeutral;
if (isSelf(relationAlt)) {
@@ -3085,9 +3086,7 @@ export class TerritoryWebGLRenderer {
} else if (isEmbargo(relationAlt)) {
altColor = u_altEnemy;
}
// Blend territory on top of terrain, borders fully opaque
float territoryAlpha = isBorder ? 1.0 : u_alpha;
color = mix(baseTerrainColor, altColor.rgb, territoryAlpha);
color = altColor.rgb;
}
if (u_hoveredPlayerId >= 0.0 && abs(float(owner) - u_hoveredPlayerId) < 0.5) {
float pulse = u_hoverPulseStrength > 0.0