From e21978d642e6e2dc3283aa5759e8c0b5a4e618f2 Mon Sep 17 00:00:00 2001 From: insvrg3ncy Date: Thu, 16 Apr 2026 13:41:40 +0300 Subject: [PATCH 1/2] rawr --- .../Structures/Decoration/banners.yml | 1 + .../Structures/Wallmounts/Signs/bar_sign.yml | 1 + .../Wallmounts/Signs/base_structuresigns.yml | 1 + .../Structures/Wallmounts/Signs/paintings.yml | 1 + .../Structures/Wallmounts/Signs/posters.yml | 1 + .../Storage/Cabinets/defib_cabinet.yml | 1 + .../Storage/Cabinets/extinguisher_cabinet.yml | 1 + .../Storage/Cabinets/fireaxe_cabinet.yml | 1 + .../Monitors/telescreens.yml | 2 + .../Monitors/televisions.yml | 1 + .../WallmountMachines/air_alarm.yml | 4 + .../WallmountMachines/fire_alarm.yml | 1 + .../Wallmounts/WallmountMachines/intercom.yml | 2 +- .../Wallmounts/WallmountMachines/screen.yml | 2 +- .../WallmountMachines/station_map.yml | 4 +- .../Wallmounts/WallmountMachines/timer.yml | 2 +- .../Structures/Wallmounts/base_wallmount.yml | 2 +- .../Entities/Structures/Walls/asteroid.yml | 1 + .../_TSF/Shaders/tsf_damage_vignette.swsl | 96 ++++++++++++++++--- 19 files changed, 107 insertions(+), 18 deletions(-) diff --git a/Resources/Prototypes/Entities/Structures/Decoration/banners.yml b/Resources/Prototypes/Entities/Structures/Decoration/banners.yml index 12f112dfc56..852a352a77b 100644 --- a/Resources/Prototypes/Entities/Structures/Decoration/banners.yml +++ b/Resources/Prototypes/Entities/Structures/Decoration/banners.yml @@ -6,6 +6,7 @@ abstract: true components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Decoration/banner.rsi state: banner noRot: true diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/bar_sign.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/bar_sign.yml index a28b9db2770..491eb152bda 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/bar_sign.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/bar_sign.yml @@ -7,6 +7,7 @@ - type: WallMount arc: 360 - type: Sprite + drawdepth: AboveFovOverlay sprite: Structures/Wallmounts/barsign.rsi state: empty - type: BarSign diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml index 68693f41cd8..be2115a3e80 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml @@ -16,6 +16,7 @@ - !type:DoActsBehavior acts: ["Destruction"] - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/signs.rsi snapCardinals: true - type: StaticPrice diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/paintings.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/paintings.yml index cc43241d838..e6579d94c91 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/paintings.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/paintings.yml @@ -4,6 +4,7 @@ abstract: true components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/paintings.rsi - type: entity diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml index aceb8dc4f83..aeab29886f1 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml @@ -4,6 +4,7 @@ abstract: true components: - type: Sprite + drawdepth: AboveFovOverlay # TSF edit sprite: Structures/Wallmounts/posters.rsi - type: Damageable damageContainer: StructuralInorganic diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/defib_cabinet.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/defib_cabinet.yml index 7af430beefc..5d896953a32 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/defib_cabinet.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/defib_cabinet.yml @@ -8,6 +8,7 @@ mode: SnapgridCenter components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/defib_cabinet.rsi noRot: false layers: diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/extinguisher_cabinet.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/extinguisher_cabinet.yml index cbf11468f25..ea9ffd1b4c9 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/extinguisher_cabinet.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/extinguisher_cabinet.yml @@ -5,6 +5,7 @@ description: A small wall mounted cabinet designed to hold a fire extinguisher. components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/extinguisher_cabinet.rsi layers: - state: frame diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/fireaxe_cabinet.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/fireaxe_cabinet.yml index 0c97f046e71..5d731f4db31 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/fireaxe_cabinet.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Storage/Cabinets/fireaxe_cabinet.yml @@ -25,6 +25,7 @@ sound: collection: MetalGlassBreak - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/fireaxe_cabinet.rsi layers: - state: cabinet diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/telescreens.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/telescreens.yml index 0705a60b492..717d88f4c39 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/telescreens.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/telescreens.yml @@ -6,6 +6,7 @@ description: Finally, some decent reception around here... components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Machines/computers.rsi layers: - map: ["computerLayerBody"] @@ -56,6 +57,7 @@ graph: WallmountTelescreen node: TelescreenFrame - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Machines/computers.rsi layers: - map: ["computerLayerBody"] diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/televisions.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/televisions.yml index fd1e895f707..7c08664235d 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/televisions.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/Monitors/televisions.yml @@ -9,6 +9,7 @@ graph: WallmountTelevision node: Television - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/flatscreentv.rsi layers: - map: ["computerLayerBody"] diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/air_alarm.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/air_alarm.yml index ca429003a8e..b1a2091b795 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/air_alarm.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/air_alarm.yml @@ -73,6 +73,7 @@ - type: Appearance - type: WiresVisuals - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/air_monitors.rsi layers: - state: alarmp @@ -118,6 +119,7 @@ description: An air alarm. Doesn't look like it'll be alarming air any time soon. components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/air_monitors.rsi layers: - state: alarm_b1 @@ -160,6 +162,7 @@ description: An alien air alarm. Hopefully they didn't breathe poison. components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/air_monitors_xeno.rsi layers: - state: alarmp @@ -175,4 +178,5 @@ description: An alien air alarm. Why are the wires pulsating?... components: - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/air_monitors_xeno.rsi diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/fire_alarm.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/fire_alarm.yml index 1f2a20dc30f..0a20a43d18c 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/fire_alarm.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/fire_alarm.yml @@ -68,6 +68,7 @@ boardName: wires-board-name-firealarm layoutId: FireAlarm - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/air_monitors.rsi layers: - state: fire0 diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/intercom.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/intercom.yml index 6d04ada47c6..f6f63951fe9 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/intercom.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/intercom.yml @@ -38,7 +38,7 @@ key_slots: !type:Container - type: Sprite noRot: false - drawdepth: SmallObjects + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/intercom.rsi layers: - state: base diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/screen.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/screen.yml index 6c41f8d39b0..152e446c300 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/screen.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/screen.yml @@ -10,7 +10,7 @@ timerOffset: 0,-4 rows: 2 - type: Sprite - drawdepth: WallMountedItems + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/screen.rsi state: screen noRot: true diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml index 39643fb8502..a1596a0e64a 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml @@ -7,7 +7,7 @@ components: - type: Sprite sprite: Structures/Machines/station_map.rsi - drawdepth: WallMountedItems + drawdepth: AboveFovOverlay # TSF layers: - state: station_map_broken - type: Destructible @@ -34,6 +34,7 @@ - type: Appearance - type: StationMap - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Machines/station_map.rsi layers: - state: station_map0 @@ -105,6 +106,7 @@ - type: WallMount arc: 360 - type: Sprite + drawdepth: AboveFovOverlay # TSF sprite: Structures/Machines/station_map.rsi layers: - state: station_map_frame1 diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/timer.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/timer.yml index 5260b7eb97e..bbde6da55af 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/timer.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/timer.yml @@ -8,7 +8,7 @@ - type: WallMount arc: 360 - type: Sprite - drawdepth: SmallObjects + drawdepth: AboveFovOverlay # TSF sprite: Structures/Wallmounts/switch.rsi state: on - type: Appearance diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml index b064d4a231a..dee76210735 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml @@ -21,7 +21,7 @@ tags: - Structure - type: Sprite - drawdepth: WallMountedItems + drawdepth: AboveFovOverlay - type: entity parent: BaseWallmount diff --git a/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml b/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml index af76eca0878..848d3ceb52d 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml @@ -32,6 +32,7 @@ - map: [ "enum.EdgeLayer.West" ] state: rock_asteroid_west - type: MiningScannerViewable + - type: FoVOverlay - type: Damageable damageContainer: StructuralInorganic damageModifierSet: Rock diff --git a/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl b/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl index 1dfba4ee3ef..cf2dad6363b 100644 --- a/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl +++ b/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl @@ -14,6 +14,47 @@ highp float flickerNoise(highp vec2 uv) { return fract(sin(dot(seed, vec3(12.9898, 78.233, 43.456))) * 43758.5453); } +// Функция для красных точек - чуть крупнее и ОЧЕНЬ КРАСНЫЕ +highp float redDots(highp vec2 uv) { + // Чуть меньше частота = чуть крупнее точки + highp vec2 scaledUV = uv * 800.0; + highp vec2 grid = floor(scaledUV); + highp vec2 fracUV = fract(scaledUV); + + // Рандом для каждой ячейки + highp float random = fract(sin(dot(grid, vec2(12.9898, 78.233))) * 43758.5453); + + // Немного больше размер точки - 0.08 вместо 0.03 + highp float dotSize = 0.08; + highp vec2 center = vec2(0.5, 0.5); + highp float distToCenter = length(fracUV - center); + + highp float dot = 1.0 - smoothstep(0.0, dotSize, distToCenter); + return dot * random; +} + +// Ещё один слой красных точек для плотности +highp float redDotsLayer2(highp vec2 uv) { + highp vec2 scaledUV = uv * 650.0 + 0.5; + highp vec2 grid = floor(scaledUV); + highp vec2 fracUV = fract(scaledUV); + + highp float random = fract(sin(dot(grid, vec2(45.6789, 98.7654))) * 43758.5453); + highp float dotSize = 0.07; + highp vec2 center = vec2(0.5, 0.5); + highp float distToCenter = length(fracUV - center); + + highp float dot = 1.0 - smoothstep(0.0, dotSize, distToCenter); + return dot * random; +} + +// Субпиксельный шум для финальной зернистости +highp float subPixelNoise(highp vec2 uv) { + highp vec2 fineUV = uv * 1600.0; + highp vec3 seed = vec3(floor(fineUV.x), floor(fineUV.y), floor(TIME * 30.0)); + return fract(sin(dot(seed, vec3(12.9898, 78.233, 43.456))) * 43758.5453); +} + void fragment() { highp vec4 color = zTextureSpec(SCREEN_TEXTURE, UV); highp vec3 rgb = color.rgb; @@ -23,6 +64,7 @@ void fragment() { highp float strobe = 0.5 * painBase * abs(cos(TIME * 2.0)); highp float intensity = min(painBase + strobe + shockAdd, 1.0); intensity *= (1.0 - AdrenalineStrength * 0.25); + if (intensity > 0.01) { highp vec2 center = vec2(0.5, 0.5); highp float dist = length(UV - center); @@ -30,21 +72,43 @@ void fragment() { highp float outer = 0.75; highp float vignette = smoothstep(inner, outer, dist); - highp float n = flickerNoise(UV); - highp vec3 darkRed = vec3(0.38, 0.02, 0.02); - highp vec3 brightRed = vec3(1.0, 0.15, 0.08); - highp vec3 redNoise = mix(darkRed, brightRed, n); + // КРАСНЫЕ точки - ЯРКИЕ и НАСЫЩЕННЫЕ + highp float dot1 = redDots(UV); + highp float dot2 = redDotsLayer2(UV); + highp float dot3 = redDots(UV + 0.23); + + // Объединяем слои для максимальной плотности красных точек + highp float dotDensity = clamp((dot1 + dot2 + dot3) * 1.2, 0.0, 1.0); + + // Варьируем яркость каждой точки + highp float dotBrightness = dotDensity * (0.7 + flickerNoise(UV) * 0.9); + + // ОЧЕНЬ КРАСНЫЙ цвет - максимальная насыщенность + // Чистый красный с небольшими вариациями для глубины + highp vec3 darkRed = vec3(0.65, 0.0, 0.02); // Тёмно-красный, но всё ещё насыщенный + highp vec3 brightRed = vec3(1.0, 0.05, 0.05); // Ярко-КРАСНЫЙ, почти чистый красный - highp float blend = vignette * intensity * 0.48; + highp vec3 redNoise = mix(darkRed, brightRed, dotBrightness); + + // Добавляем дополнительный красный слой для интенсивности + highp float extraRed = dotBrightness * 0.5; + redNoise.r += extraRed; + redNoise = clamp(redNoise, 0.0, 1.0); + + highp float blend = vignette * intensity * 0.55; // Немного больше смешивания rgb = mix(rgb, redNoise, blend); - highp float grain = (flickerNoise(UV) - 0.5) * 0.04 * intensity; - rgb = clamp(rgb + grain, 0.0, 1.0); + + // Отдельная красная зернистость + highp float grain = (subPixelNoise(UV) - 0.5) * 0.05 * intensity; + rgb.r += abs(grain) * 0.8; // Добавляем зерно преимущественно в красный канал + rgb = clamp(rgb, 0.0, 1.0); } highp float consciousnessGrain = (1.0 - Consciousness) * Consciousness * 0.06; if (consciousnessGrain > 0.01) { - highp float cg = (flickerNoise(UV + vec2(TIME * 0.5, 0.0)) - 0.5) * consciousnessGrain; - rgb = clamp(rgb + cg, 0.0, 1.0); + highp float cg1 = (subPixelNoise(UV + vec2(TIME * 0.5, 0.0)) - 0.5) * consciousnessGrain; + highp float cg2 = (redDots(UV + vec2(TIME * 0.3, TIME * 0.2)) - 0.5) * consciousnessGrain * 0.5; + rgb = clamp(rgb + cg1 + cg2, 0.0, 1.0); } if (AdrenalineStrength > 0.01) { @@ -66,10 +130,16 @@ void fragment() { highp float outer = 0.75; highp float vignette = smoothstep(inner, outer, dist); - highp float n = flickerNoise(UV); - highp vec3 darkWhite = vec3(0.12, 0.12, 0.12); - highp vec3 brightWhite = vec3(0.92, 0.92, 0.92); - highp vec3 whiteNoise = mix(darkWhite, brightWhite, n); + // Белые точки для кровопотери (чуть крупнее) + highp float dot1 = redDots(UV); + highp float dot2 = redDotsLayer2(UV); + highp float dotDensity = clamp((dot1 + dot2) * 1.1, 0.0, 1.0); + + highp float dotBrightness = dotDensity * (0.5 + flickerNoise(UV) * 0.7); + + highp vec3 darkWhite = vec3(0.15, 0.12, 0.12); + highp vec3 brightWhite = vec3(0.95, 0.92, 0.92); + highp vec3 whiteNoise = mix(darkWhite, brightWhite, dotBrightness); highp float blend = vignette * BloodLossStrength * 0.48; rgb = mix(rgb, whiteNoise, blend); From 70288547e5c0787b363be2ecd2c5207095c1eb49 Mon Sep 17 00:00:00 2001 From: insvrg3ncy Date: Thu, 16 Apr 2026 13:52:03 +0300 Subject: [PATCH 2/2] rawr --- .../_TSF/Shaders/tsf_damage_vignette.swsl | 96 +++---------------- 1 file changed, 13 insertions(+), 83 deletions(-) diff --git a/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl b/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl index cf2dad6363b..1dfba4ee3ef 100644 --- a/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl +++ b/Resources/Textures/_TSF/Shaders/tsf_damage_vignette.swsl @@ -14,47 +14,6 @@ highp float flickerNoise(highp vec2 uv) { return fract(sin(dot(seed, vec3(12.9898, 78.233, 43.456))) * 43758.5453); } -// Функция для красных точек - чуть крупнее и ОЧЕНЬ КРАСНЫЕ -highp float redDots(highp vec2 uv) { - // Чуть меньше частота = чуть крупнее точки - highp vec2 scaledUV = uv * 800.0; - highp vec2 grid = floor(scaledUV); - highp vec2 fracUV = fract(scaledUV); - - // Рандом для каждой ячейки - highp float random = fract(sin(dot(grid, vec2(12.9898, 78.233))) * 43758.5453); - - // Немного больше размер точки - 0.08 вместо 0.03 - highp float dotSize = 0.08; - highp vec2 center = vec2(0.5, 0.5); - highp float distToCenter = length(fracUV - center); - - highp float dot = 1.0 - smoothstep(0.0, dotSize, distToCenter); - return dot * random; -} - -// Ещё один слой красных точек для плотности -highp float redDotsLayer2(highp vec2 uv) { - highp vec2 scaledUV = uv * 650.0 + 0.5; - highp vec2 grid = floor(scaledUV); - highp vec2 fracUV = fract(scaledUV); - - highp float random = fract(sin(dot(grid, vec2(45.6789, 98.7654))) * 43758.5453); - highp float dotSize = 0.07; - highp vec2 center = vec2(0.5, 0.5); - highp float distToCenter = length(fracUV - center); - - highp float dot = 1.0 - smoothstep(0.0, dotSize, distToCenter); - return dot * random; -} - -// Субпиксельный шум для финальной зернистости -highp float subPixelNoise(highp vec2 uv) { - highp vec2 fineUV = uv * 1600.0; - highp vec3 seed = vec3(floor(fineUV.x), floor(fineUV.y), floor(TIME * 30.0)); - return fract(sin(dot(seed, vec3(12.9898, 78.233, 43.456))) * 43758.5453); -} - void fragment() { highp vec4 color = zTextureSpec(SCREEN_TEXTURE, UV); highp vec3 rgb = color.rgb; @@ -64,7 +23,6 @@ void fragment() { highp float strobe = 0.5 * painBase * abs(cos(TIME * 2.0)); highp float intensity = min(painBase + strobe + shockAdd, 1.0); intensity *= (1.0 - AdrenalineStrength * 0.25); - if (intensity > 0.01) { highp vec2 center = vec2(0.5, 0.5); highp float dist = length(UV - center); @@ -72,43 +30,21 @@ void fragment() { highp float outer = 0.75; highp float vignette = smoothstep(inner, outer, dist); - // КРАСНЫЕ точки - ЯРКИЕ и НАСЫЩЕННЫЕ - highp float dot1 = redDots(UV); - highp float dot2 = redDotsLayer2(UV); - highp float dot3 = redDots(UV + 0.23); - - // Объединяем слои для максимальной плотности красных точек - highp float dotDensity = clamp((dot1 + dot2 + dot3) * 1.2, 0.0, 1.0); - - // Варьируем яркость каждой точки - highp float dotBrightness = dotDensity * (0.7 + flickerNoise(UV) * 0.9); - - // ОЧЕНЬ КРАСНЫЙ цвет - максимальная насыщенность - // Чистый красный с небольшими вариациями для глубины - highp vec3 darkRed = vec3(0.65, 0.0, 0.02); // Тёмно-красный, но всё ещё насыщенный - highp vec3 brightRed = vec3(1.0, 0.05, 0.05); // Ярко-КРАСНЫЙ, почти чистый красный + highp float n = flickerNoise(UV); + highp vec3 darkRed = vec3(0.38, 0.02, 0.02); + highp vec3 brightRed = vec3(1.0, 0.15, 0.08); + highp vec3 redNoise = mix(darkRed, brightRed, n); - highp vec3 redNoise = mix(darkRed, brightRed, dotBrightness); - - // Добавляем дополнительный красный слой для интенсивности - highp float extraRed = dotBrightness * 0.5; - redNoise.r += extraRed; - redNoise = clamp(redNoise, 0.0, 1.0); - - highp float blend = vignette * intensity * 0.55; // Немного больше смешивания + highp float blend = vignette * intensity * 0.48; rgb = mix(rgb, redNoise, blend); - - // Отдельная красная зернистость - highp float grain = (subPixelNoise(UV) - 0.5) * 0.05 * intensity; - rgb.r += abs(grain) * 0.8; // Добавляем зерно преимущественно в красный канал - rgb = clamp(rgb, 0.0, 1.0); + highp float grain = (flickerNoise(UV) - 0.5) * 0.04 * intensity; + rgb = clamp(rgb + grain, 0.0, 1.0); } highp float consciousnessGrain = (1.0 - Consciousness) * Consciousness * 0.06; if (consciousnessGrain > 0.01) { - highp float cg1 = (subPixelNoise(UV + vec2(TIME * 0.5, 0.0)) - 0.5) * consciousnessGrain; - highp float cg2 = (redDots(UV + vec2(TIME * 0.3, TIME * 0.2)) - 0.5) * consciousnessGrain * 0.5; - rgb = clamp(rgb + cg1 + cg2, 0.0, 1.0); + highp float cg = (flickerNoise(UV + vec2(TIME * 0.5, 0.0)) - 0.5) * consciousnessGrain; + rgb = clamp(rgb + cg, 0.0, 1.0); } if (AdrenalineStrength > 0.01) { @@ -130,16 +66,10 @@ void fragment() { highp float outer = 0.75; highp float vignette = smoothstep(inner, outer, dist); - // Белые точки для кровопотери (чуть крупнее) - highp float dot1 = redDots(UV); - highp float dot2 = redDotsLayer2(UV); - highp float dotDensity = clamp((dot1 + dot2) * 1.1, 0.0, 1.0); - - highp float dotBrightness = dotDensity * (0.5 + flickerNoise(UV) * 0.7); - - highp vec3 darkWhite = vec3(0.15, 0.12, 0.12); - highp vec3 brightWhite = vec3(0.95, 0.92, 0.92); - highp vec3 whiteNoise = mix(darkWhite, brightWhite, dotBrightness); + highp float n = flickerNoise(UV); + highp vec3 darkWhite = vec3(0.12, 0.12, 0.12); + highp vec3 brightWhite = vec3(0.92, 0.92, 0.92); + highp vec3 whiteNoise = mix(darkWhite, brightWhite, n); highp float blend = vignette * BloodLossStrength * 0.48; rgb = mix(rgb, whiteNoise, blend);