Skip to content

Commit

Permalink
[TEW2] Add intro movies, remove unused sliders
Browse files Browse the repository at this point in the history
- [TEW2] Add intro movies

- [TEW2] Removed unused sliders. Some will get added back later in the mod's lifecycle.
  • Loading branch information
marat569 authored Aug 17, 2024
1 parent 7fb82d3 commit 74de3a4
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 60 deletions.
70 changes: 11 additions & 59 deletions src/games/tew2/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

//#define DEBUG_LEVEL_1 //added


#include <embed/0x15A8E557.h> // UI, Font, weapon menu

#include <embed/0x15A8E557.h> // UI, Font, weapon menu
#include <embed/0x6130DB10.h> // UI, Hud, Icons
#include <embed/0x1B480C7D.h> // UI
#include <embed/0x623A2690.h> // UI, Save Menu
#include <embed/0x9FD76798.h> // UI, Crafting 1
#include <embed/0x742364E2.h> // Videos
#include <embed/0x1B480C7D.h> // UI
#include <embed/0x623A2690.h> // UI, Save Menu
#include <embed/0x9FD76798.h> // UI, Crafting 1
#include <embed/0x742364E2.h> // Movies -- ingame FMV
#include <embed/0x698CEF9E.h> // Movies -- Intro movies 1
#include <embed/0xB13F7764.h> // Tonemapper


Expand All @@ -39,8 +40,9 @@ renodx::mods::shader::CustomShaders custom_shaders = {
CustomShaderEntry(0x1B480C7D), // UI
CustomShaderEntry(0x623A2690), // UI, Save Menu
CustomShaderEntry(0x9FD76798), // UI, Crafting 1
CustomShaderEntry(0x742364E2), // Videos
CustomShaderEntry(0xB13F7764), // Tonemapper
CustomShaderEntry(0x742364E2), // Movies -- Ingame fmv
CustomShaderEntry(0x698CEF9E), // Movies -- Intro Movies 1
CustomShaderEntry(0xB13F7764), // Tonemapper

};

Expand Down Expand Up @@ -135,55 +137,8 @@ renodx::utils::settings::Settings settings = {
.parse = [](float value) { return value * 0.02f; },
},

new renodx::utils::settings::Setting{
.key = "colorGradeBlowout",
.binding = &shader_injection.colorGradeBlowout,
.default_value = 50.f,
.label = "Blowout",
.section = "Color Grading",
.tooltip = "Controls highlight desaturation due to overexposure.",
.max = 100.f,
.parse = [](float value) { return value * 0.01f; },
},




new renodx::utils::settings::Setting{
.key = "bloom",
.binding = &shader_injection.bloom,
.value_type = renodx::utils::settings::SettingValueType::BOOLEAN,
.default_value = 1,
.can_reset = false,
.label = "Bloom + DoF",
.section = "Effects",
.tooltip = "Enable/Disable Bloom + Depth of Field",

},

new renodx::utils::settings::Setting{
.key = "fxBloom",
.binding = &shader_injection.fxBloom,
.default_value = 50.f,
.label = "Bloom Strength",
.section = "Effects",
.tooltip = "Controls Bloom Strength",
.max = 100.f,
.parse = [](float value) { return value * 0.02f; },
},


new renodx::utils::settings::Setting{
.key = "chromaticAberration",
.binding = &shader_injection.chromaticAberration,
.value_type = renodx::utils::settings::SettingValueType::BOOLEAN,
.default_value = 1,
.can_reset = false,
.label = "Chromatic Aberration",
.section = "Effects",
.tooltip = "Enable/Disable chromaticAberration",

},

};

Expand All @@ -197,11 +152,8 @@ void OnPresetOff() {
renodx::utils::settings::UpdateSetting("colorGradeShadows", 50.f);
renodx::utils::settings::UpdateSetting("colorGradeContrast", 50.f);
renodx::utils::settings::UpdateSetting("colorGradeSaturation", 50.f);
renodx::utils::settings::UpdateSetting("colorGradeBlowout", 50.f);
//Start PostProcess effects on/off
renodx::utils::settings::UpdateSetting("bloom", 1);
renodx::utils::settings::UpdateSetting("fxBloom", 50.f);
renodx::utils::settings::UpdateSetting("chromaticAberration", 1);

}

} // namespace
Expand Down
41 changes: 41 additions & 0 deletions src/games/tew2/movies_0x698CEF9E.ps_5_0.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// ---- Created with 3Dmigoto v1.3.16 on Fri Aug 16 22:01:40 2024
// Movies, Intro Movies 1

#include "./shared.h"

SamplerState binky_samp_state_s : register(s0);
SamplerState binkcr_samp_state_s : register(s1);
SamplerState binkcb_samp_state_s : register(s2);
Texture2D<float4> binky_samp : register(t0);
Texture2D<float4> binkcr_samp : register(t1);
Texture2D<float4> binkcb_samp : register(t2);


// 3Dmigoto declarations
#define cmp -


void main(
float4 v0 : TEXCOORD0,
float4 v1 : SV_Position0,
out float4 o0 : SV_Target0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = binkcb_samp.Sample(binkcb_samp_state_s, v0.xy, int2(0, 0)).x;
r0.xyz = float3(0,-0.391448975,2.01782227) * r0.xxx;
r0.w = binkcr_samp.Sample(binkcr_samp_state_s, v0.xy, int2(0, 0)).x;
r0.xyz = r0.www * float3(1.59579468,-0.813476563,0) + r0.xyz;
r0.w = binky_samp.Sample(binky_samp_state_s, v0.xy, int2(0, 0)).x;
r0.xyz = r0.www * float3(1.16412354,1.16412354,1.16412354) + r0.xyz;
o0.xyz = float3(-0.87065506,0.529705048,-1.08166885) + r0.xyz;
o0.w = 1;

o0.rgb = renodx::math::SafePow(o0.rgb, 2.2f); //2.2 gamma correction

o0.rgb *= injectedData.toneMapGameNits / 80.f; //Using paper white saling, the movies are too bright for bt2446a

return;
}
2 changes: 1 addition & 1 deletion src/games/tew2/movies_0x742364E2.ps_5_0.hlsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ---- Created with 3Dmigoto v1.3.16 on Fri Aug 16 22:01:41 2024
// Movies
// Movies -- ingame FMV

#include "./shared.h"

Expand Down

0 comments on commit 74de3a4

Please sign in to comment.