//
// ShaderLayer::triggerChromaticGlitch from 0x1003cf590 to 0x1003cf71f (399 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::triggerShaderCommand @ 0x10013ad3f
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall ShaderLayer::triggerChromaticGlitch(
ShaderLayer *a1,
bool a2,
float a3,
float a4,
float a5,
float a6,
float a7,
float a8,
float a9,
int a10,
float a11,
bool a12,
bool a13)
{
double m_time; // xmm0_8
float m_cGStartTime; // xmm4_4
float m_cGTime; // xmm3_4
float v20; // xmm2_4
float v21; // xmm0_4
float v26; // [rsp+1Ch] [rbp-24h]
m_time = a1->m_state.m_time;
if ( a1->m_state.m_cGEnable )
{
m_cGStartTime = a1->m_state.m_cGStartTime;
m_cGTime = a1->m_state.m_cGTime;
v20 = m_time;
}
else
{
v20 = m_time;
m_cGTime = v20;
m_cGStartTime = v20;
}
a1->m_state.m_cGEnable = a2;
v21 = m_time - m_cGStartTime;
a1->m_state.m_cGTime = (float)(v21 * a1->m_state.m_cGSpeed) + m_cGTime;
a1->m_state.m_cGStartTime = v20;
v26 = a3;
ShaderLayer::tweenValueAuto(a1, a4, 8, a3, a10, a11);
ShaderLayer::tweenValueAuto(a1, 1.0 / fmaxf(0.1, a9), 7, v26, a10, a11);
ShaderLayer::tweenValueAuto(a1, a5, 4, v26, a10, a11);
ShaderLayer::tweenValueAuto(a1, a7, 5, v26, a10, a11);
ShaderLayer::tweenValueAuto(a1, a8, 6, v26, a10, a11);
ShaderLayer::tweenValueAuto(a1, a6, 3, v26, a10, a11);
a1->m_state.m_cGRelative = a12;
a1->m_state.m_cGRelativePos = a13;
}