Added New Mods and Profiles Folders

This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
This commit is contained in:
2025-01-14 05:07:53 -05:00
parent 85c665b107
commit 376b4b9689
21217 changed files with 546254 additions and 0 deletions
@@ -0,0 +1,30 @@
#ifndef IMG_CORRECTIONS_H
#define IMG_CORRECTIONS_H
#include "common.h"
#include "anomaly_shaders.h"
float3 img_corrections(float3 img)
{
//exposure
img.xyz *= pp_img_corrections.x;
//color grading (thanks KD and Crytek and Cjayho)
float fLum = dot(img.xyz, LUMINANCE_VECTOR)*2;
float3 cColor = lerp(0.0, pp_img_cg.xyz, saturate( fLum * 2.0 ) );
cColor = lerp( cColor, 1.0, saturate( fLum - 0.5) * 2.0 );
if (pp_img_cg.x > 0.0 || pp_img_cg.y > 0.0 || pp_img_cg.z > 0.0)
{
img.xyz = saturate(lerp( img.xyz, cColor.xyz , saturate( fLum * 0.15 ) ));
}
//saturation
img.xyz = saturate(lerp(img.xyz, dot(img.xyz, LUMINANCE_VECTOR), (1.0 - pp_img_corrections.z)));
//gamma correction
img.xyz = pow(img,(1.0/pp_img_corrections.y));
//that's all :)
return img.xyz;
}
#endif
@@ -0,0 +1,122 @@
//=================================================================================================
//Mip Fog for STALKER Anomaly
//Inspired by Uncharted 4
//=================================================================================================
#define HEIGHTFOGMAX 60
#define HEIGHTFOGMIN -75
#define FOGMAXSHARPNESS 0.895
#define FOGROUGHCURVE 1.0
#define MIPFOGAMOUNT 2.0
#define SUNFOGAMOUNT 0.35
#define MINFOGDENSITY 0.35
#define MAXFOGDENSITY 6.5
#define HEIGHTFOGCURVE 5.5
//=================================================================================================
float Calc_Exponent(float a)
{
return 1 / (pow(2, a));
}
float Calc_Height(float3 wpos)
{
return 1 - saturate((wpos.y - HEIGHTFOGMIN) / (HEIGHTFOGMAX-HEIGHTFOGMIN));
}
float Calc_FinalFog(float fog, float height)
{
float HeightLerp = pow(height, HEIGHTFOGCURVE);
/*
float CamHeight = Calc_Height(eye_position);
float CamLerp = pow(CamHeight, HEIGHTFOGCURVE);
//HeightLerp = max(HeightLerp, CamLerp);
HeightLerp = (HeightLerp * (1-CamLerp)) + CamLerp;
*/
float Fog = Calc_Exponent(fog * lerp(MINFOGDENSITY, MAXFOGDENSITY, HeightLerp));
return saturate(1 - Fog);
}
float3 Calc_SunFog(float3 pos, float3 fogrough)
{
float3 SunFog = saturate(dot(normalize(Ldynamic_dir), -normalize(pos)));
float gloss = lerp(FOGMAXSHARPNESS*0.5, 0, fogrough);
gloss = gloss*gloss;
gloss = pow(8192, gloss);
SunFog = pow(SunFog, gloss) * ((gloss + 2)/(8 * PI)); //BLOPS2 blinn
SunFog *= SRGBToLinear(Ldynamic_color.rgb);
return SunFog * SUNFOGAMOUNT;
}
float3 Calc_MipFog(float3 sky, float3 fogrough)
{
sky = normalize(sky);
//cubemap projection
float3 skyabs = abs(sky);
float skymax = max(skyabs.x, max(skyabs.y, skyabs.z));
sky /= skymax;
if (sky.y < 0.999)
sky.y = sky.y*2-1; //fake remapping
sky = normalize(sky);
float FogMip = lerp(CUBE_MIPS - (CUBE_MIPS * FOGMAXSHARPNESS), CUBE_MIPS, fogrough); //don't use base mip
float3 s0 = env_s0.SampleLevel(smp_base, sky, FogMip);
float3 s1 = env_s1.SampleLevel(smp_base, sky, FogMip);
float3 MipFog = lerp(s0,s1,env_color.w);
//srgb tint
float3 FogTint = lerp(fog_color.rgb * 2.0, env_color.rgb, fogrough*fogrough); //env for close, fog for far
MipFog *= FogTint;
//linear cubemap
MipFog = SRGBToLinear(MipFog);
return MipFog * MIPFOGAMOUNT;
}
float3 Calc_Fog(float3 pos, float3 color)
{
color = SRGBToLinear(color.rgb);
//view to world space
float3 sky = mul(m_inv_V, pos );
float3 wpos = sky + eye_position;
float distance = length(pos);
float fog = saturate(distance * fog_params.w + fog_params.x);
float height = Calc_Height(wpos);
float FinalFog = Calc_FinalFog(fog, height);
float fogrough = fog;
fogrough = pow(1 - fogrough , FOGROUGHCURVE);
float3 MipFog = Calc_MipFog(sky, fogrough);
float3 SunFog = Calc_SunFog(pos, fogrough);
float3 FogColor = MipFog + SunFog;
//fog blend
float3 FogBlend = FinalFog;
//fog alpha
float fogalpha = fog * fog;
FogBlend *= 1 - fogalpha;
FogBlend += fogalpha;
float3 Final = lerp(color, FogColor, FogBlend);
Final = LinearTosRGB(Final);
return Final;
}
@@ -0,0 +1,2 @@
//No PBR Cubemaps
#define USE_PBR_CUBEMAPS
@@ -0,0 +1,26 @@
/**
* @ Description: Enhanced Shaders and Color Grading 1.10
* @ Author: https://www.moddb.com/members/kennshade
* @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/enhanced-shaders-and-color-grading-for-151
*/
//=================================================================================================
//Settings for PBR conversion
//=================================================================================================
#define USE_BURLEY_DIFFUSE //use expensive Disney/Burley diffuse
#define USE_GGX_SPECULAR //use more expensive GGX specular
//=================================================================================================
#define ALBEDO_BOOST 0.0
#define ALBEDO_AMOUNT 1.00
#define ROUGHNESS_LOW 0.5
#define ROUGHNESS_HIGH 1.0
#define ROUGHNESS_POW 1.0
#define SPECULAR_BASE 0.02
#define SPECULAR_RANGE 1.0
#define SPECULAR_POW 1.0
#define METAL_BOOST 0.25
#define METALNESS_THRESHOLD 0.125
#define METALNESS_SOFTNESS 0.125
@@ -0,0 +1,4 @@
// [ SETTINGS ] [ SKY DEBANDING ]
#define G_DEBANDING_QUALITY 3 // Deband iterations [ 1 = Low, 2 = Normal, 3 = High, 4 = Ultra ]
#define G_DEBANDING_RADIUS 50 // Max pixels to search for banding. Higher values improve smoothness, but also add more noise in some circumstances.
@@ -0,0 +1,9 @@
// [ SETTINGS ] [ FOG ]
#define G_FOG_HEIGHT 8.15f // Height of the ground fog.
#define G_FOG_HEIGHT_INTENSITY 1.05f // Intensity of the ground fog.
#define G_FOG_HEIGHT_DENSITY 1.35f // Density of the ground fog.
#define G_FOG_SUNCOLOR_INTENSITY 0.10f // Intensity of sun color in the fog. [ 0.0f = 0% | 1.0f = 100% ]
#define G_FOG_USE_SCATTERING // Enable/Disable fog scattering
@@ -0,0 +1,8 @@
// [ SETTINGS ] [ LUT ]
#define G_LUT_SIZE_W 4096.0 // Width of your LUT texture
#define G_CELLS_SIZE 64 // Width/Height of your cell
#define G_CELLS_GROUPS 16 // Quantity of tables in your texture
//#define G_ADVANCE_TRANSITION // Note for Modders: You can enable this option to do smooth transitions between tables in realtime. Check the script
@@ -0,0 +1,23 @@
// [ SETTINGS ] [ PUDDLES ]
// NOTE: Reflection quality is defined by G_SSR_QUALITY ( settings_screenspace_SSR.h )
#define G_PUDDLES_GLOBAL_SIZE 1.1f // Puddles global size. ( This affect distance and puddles size )
#define G_PUDDLES_SIZE 1.0f // Puddles individual size. ( This only affect puddles size )
#define G_PUDDLES_BORDER_HARDNESS 0.7f // Border hardness. ( 1.0f = Extremely defined border )
#define G_PUDDLES_TERRAIN_EXTRA_WETNESS 0.25f // Terrain extra wetness when raining. ( Over time like puddles )
#define G_PUDDLES_REFLECTIVITY 0.5f // Reflectivity. ( 1.0f = Mirror like )
#define G_PUDDLES_TINT float3(0.66f, 0.63f, 0.6f) // Puddles tint RGB.
#define G_PUDDLES_RIPPLES // Comment to disable ripples
#define G_PUDDLES_RIPPLES_SCALE 1.0f // Ripples scale
#define G_PUDDLES_RIPPLES_INTENSITY 1.0f // Puddles ripples intensity
#define G_PUDDLES_RIPPLES_RAINING_INT 0.1f // Extra ripple intensity when raining ( Affected by rain intensity )
#define G_PUDDLES_RIPPLES_SPEED 1.0f // Puddles ripples movement speed
#define G_PUDDLES_RAIN_RIPPLES_INTENSITY 1.0f // Rain ripples intensity
#define G_PUDDLES_RAIN_RIPPLES_SCALE 1.0f // Rain ripples scale
#define G_PUDDLES_REFRACTION_INTENSITY 1.0f // Refraction intensity
//#define G_PUDDLES_ALLWAYS // Uncomment to allways render puddles ( Raining or not )
@@ -0,0 +1,12 @@
// [ SETTINGS ] [ SCREEN SPACE REFLECTIONS ]
#define G_SSR_VERTICAL_SCREENFADE 4.0f // Vertical fade. ( higher values = sharp gradient )
#define G_SSR_MAX_INTENSITY 1.0f // Global reflection MAX intensity.
#define G_SSR_FLORA_INTENSITY 0.33f // Adjust grass and tree branches intensity
#define G_SSR_WEAPON_RAIN_FACTOR 0.15f // Weapons reflections boost when raining ( 0 to disable ) ( Affected by rain intensity )
//#define G_SSR_BEEFS_NVGs_ADJUSTMENT 0.5f // Uncomment to adjust the reflection intensity when 'Beefs Shader Based NVGs' are in use. ( Use only if Beefs NVGs addon is installed )
//#define G_SSR_WEAPON_REFLECT_ONLY_WITH_RAIN // Uncomment this if you don't want weapon reflections unless is raining
//#define G_SSR_CHEAP_SKYBOX // Use a faster skybox to improve some performance.
@@ -0,0 +1,64 @@
#include "common.h"
#include "night_vision.h"
struct v2p
{
float4 factor : COLOR0; // for SM3 - factor.rgb - tonemap-prescaled
float3 tc0 : TEXCOORD0;
float3 tc1 : TEXCOORD1;
float4 sv : SV_Position;
};
struct _out
{
float4 low : SV_Target0;
float4 high : SV_Target1;
};
TextureCube s_sky0 :register(t0);
TextureCube s_sky1 :register(t1);
//////////////////////////////////////////////////////////////////////////////////////////
// Pixel
_out main( v2p I )
{
float3 s0 = s_sky0.Sample( smp_rtlinear, I.tc0 );
float3 s1 = s_sky1.Sample( smp_rtlinear, I.tc1 );
float3 sky = lerp (s0,s1,I.factor.w);
sky *= I.factor.rgb;
// final tone-mapping
_out o;
tonemap(o.low, o.high, sky, 1 ) ; //factor contains tonemapping
float2 texturecoord = I.sv.xy / screen_res.xy;
float2 texturecoord_2 = I.sv.xy / screen_res.xy;
float lua_param_nvg_generation = floor(shader_param_8.x); // 1, 2, or 3
float lua_param_nvg_num_tubes = frac(shader_param_8.x) * 10.0f; // 1, 2, 4, 1.1, or 1.2
float lua_param_nvg_gain_current = floor(shader_param_8.y) / 10.0f;
float lua_param_vignette_current = floor(shader_param_8.z) / 100.0f;
if (lua_param_nvg_generation > 0 && ((compute_lens_mask(aspect_ratio_correction(texturecoord), lua_param_nvg_num_tubes) == 1.0f || compute_lens_mask(aspect_ratio_correction(texturecoord_2), lua_param_nvg_num_tubes) == 1.0f)))
{
o.low.r = dot(o.low.rgb * 5.0f, luma_conversion_coeff);
o.high.r = dot(o.high.rgb * 5.0f, luma_conversion_coeff);
o.low.gb = 0.0f;
o.high.gb = 0.0f;
o.low *= lua_param_nvg_gain_current * sky_brightness_factor;
o.high *= lua_param_nvg_gain_current * sky_brightness_factor;
o.high = clamp(o.high,0.0,1.0);
o.low= clamp(o.low,0.0,1.0);
float vignette = calc_vignette(lua_param_nvg_num_tubes, texturecoord, lua_param_vignette_current);
float vignette_2 = calc_vignette(lua_param_nvg_num_tubes, texturecoord_2, lua_param_vignette_current);
o.low *= (vignette * vignette_2);
o.high *= (vignette * vignette_2);
}
return o;
}
@@ -0,0 +1,41 @@
#include "common.h"
struct vi
{
float4 p : POSITION;
float4 c : COLOR0;
float3 tc0 : TEXCOORD0;
float3 tc1 : TEXCOORD1;
};
struct v2p
{
float4 c : COLOR0;
float4 tc0 : TEXCOORD0;
float3 tc1 : TEXCOORD1;
float4 hpos : SV_Position;
};
v2p main (vi v)
{
v2p o;
//v.c.rgb = v.c.bgr; // fix skybox color
float4 tpos = float4(2000*v.p.x, 2000*v.p.y, 2000*v.p.z, 2000*v.p.w);
o.hpos = mul (m_WVP, tpos);
o.hpos.z = o.hpos.w;
o.tc0.xyz = v.tc0; // copy tc
o.tc1.xyz = v.tc1; // copy tc
float scale = s_tonemap.Load(int3(0,0,0) ).x;
float3 tint = v.c.rgb * 1.38;
//float3 tint = 1.0;
//float3 tint = env_color.rgb;
//float3 tint = fog_color.rgb * 2.0;
o.c = float4(tint, v.c.a ); // copy color, pre-scale by tonemap //float4 (v.c.rgb*scale*2, v.c.a );
o.tc0.w = scale;
return o;
}
@@ -0,0 +1,153 @@
/**
* @ Version: SCREEN SPACE SHADERS - UPDATE 14.6
* @ Description: SSDO implementation
* @ Modified time: 2023-02-07 00:11
* @ Author: https://www.moddb.com/members/ascii1457
* @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
*/
#ifndef SSFX_READY
#include "screenspace_common.h"
#endif
#include "settings_screenspace_AO.h"
#ifndef SSAO_QUALITY
float calc_ssdo (float3 P, float3 N, float2 tc, float4 pos2d, uint iSample)
{
return 1.0;
}
#else // SSAO_QUALITY
// Internal values
#if SSAO_QUALITY == 3
#define G_SSDO_SAMPLE 32
#elif SSAO_QUALITY == 2
#define G_SSDO_SAMPLE 16
#elif SSAO_QUALITY == 1
#define G_SSDO_SAMPLE 8
#endif
float calc_ssdo (float4 P, float3 N, float2 tc, float4 pos2d, uint iSample)
{
// Rendering AO till G_SSDO_RENDER_DIST
if (P.z >= G_SSDO_RENDER_DIST || P.z <= SKY_EPS)
return 1;
// Ao Noise
float ao_noise = frac(sin(dot(tc, float2(12.0, 78.0))) * 43758.0) * clamp(P.z * 0.05f, G_SSDO_NOISE_MIN, G_SSDO_NOISE_MAX);
// MAT_FLORA from current pixel?
bool mat_flora = abs(P.w - MAT_FLORA) <= 0.04f;
// If MAT_FLORA we use a fake normal to align the hemisphere ( We can't trust much about flora normal )
N.xyz = mat_flora ? float3(0.0f, 0.25f, 0.0f) : N.xyz;
// A factor to adjust some values to only affect weapons ( closer objects )
float WeaponFactor = 1.0f - smoothstep(G_SSDO_WEAPON_LENGTH * 0.5f, G_SSDO_WEAPON_LENGTH, length(P.xyz));
// Var to accumulate the AO
float occ = 0;
// AO Radius
float radius = G_SSDO_RADIUS;
// Radius weapon adjustements
radius *= lerp(1.0f, G_SSDO_WEAPON_RADIUS * clamp(P.z * 2.0f, 0.2f, 1.0f), WeaponFactor);
#ifdef G_SSDO_DETAILED_RADIUS
float detail_radius = radius * lerp(G_SSDO_DETAILED_RADIUS, G_SSDO_DETAILED_WEAPON_RADIUS, WeaponFactor);
#endif
[unroll (G_SSDO_SAMPLE)]
for (int i = 0; i < G_SSDO_SAMPLE; i++)
{
// Use surface normal and add the hemisphere distribution
float3 sample_rays = (ssfx_hemisphere[i] + N.xyz) * (1.0f + ao_noise);
// Sample position
float3 occ_pos = P.xyz + sample_rays * radius;
// Sample position to UV
float2 occ_pos_uv = SSFX_view_to_uv(occ_pos);
// Process valid UV coor
if (SSFX_is_valid_uv(occ_pos_uv))
{
// Sample depth buffer
float4 sample_pos = SSFX_get_position(occ_pos_uv, iSample);
// AO Distance attenuation. To discard incorrect AO and add some attenuation through distance.
float atte = lerp( 1.5f, 4.0f, smoothstep(G_SSDO_WEAPON_LENGTH * 1.0f, G_SSDO_WEAPON_LENGTH, sample_pos.z));
// Pixel occluded?
float AO = step(sample_pos.z, occ_pos.z);
// Detailed Search if there's no AO
#ifdef G_SSDO_DETAILED_SEARCH
if (AO < 1)
{
// Same has before but with smaller radius
occ_pos = P.xyz + sample_rays * detail_radius;
occ_pos_uv = SSFX_view_to_uv(occ_pos); // We don't check for a valid UV coor, is already done and this sample radius is smaller ( in theory )
sample_pos = SSFX_get_position(occ_pos_uv, iSample); // Get Sample
AO = step(sample_pos.z, occ_pos.z); // Check occlusion
atte *= saturate(detail_radius + WeaponFactor); // Adjust attenuation for the scenary AO
}
#endif
// Distance between pixel and "occluder"
float3 Dist = distance(float3(occ_pos_uv.x, occ_pos_uv.y, sample_pos.z), float3(tc.x, tc.y, P.z));
// Difference attenuation
AO *= 1.0 - smoothstep(0.0f, atte, Dist );
// MAT_FLORA from sample?
bool sample_mat_flora = abs(gbuf_unpack_mtl(sample_pos.w) - MAT_FLORA) <= 0.04f || mat_flora;
// Value for dot product for full intensity ( Adjust value for WeaponFactor, we want a extremely sensitive AO for weapons )
float N_a = saturate( WeaponFactor ) * 0.8f;
// Dot product using current normal and sampled normal to adjust intensity ( Change mode if MAT_FLORA )
if (!sample_mat_flora)
AO *= smoothstep(1.0f, N_a, dot(gbuf_unpack_normal( sample_pos.xy ), N ));
else
AO *= G_SSDO_FLORA_INTENSITY;
// Discard incorrect occlusion from the sky.
AO *= !is_sky(sample_pos.z);
// Accumulate final AO
occ += AO;
}
else
{
// Try next step with less radius
radius *= 0.75f;
}
}
// Normalize AO
occ /= G_SSDO_SAMPLE;
// Invert AO
occ = 1.0f - occ;
// AO intensity
occ = pow(occ, G_SSDO_INTENSITY * (1.0f - (1.0f - G_SSDO_WEAPON_INTENSITY) * WeaponFactor));
// AO softer
occ = lerp(occ, sqrt(occ), G_SSDO_SMOOTH);
// Limit AO maximum occlusion
occ = clamp(occ, G_SSDO_MAX_OCCLUSION, 1.0f);
// Fadeout using G_SSDO_RENDER_DIST
occ += smoothstep(G_SSDO_RENDER_DIST * 0.8f, G_SSDO_RENDER_DIST, P.z);
// Return AO
return saturate(occ);
}
#endif // SSAO_QUALITY