Skip to main content

Module uniforms

Module uniforms 

Source
Expand description

Filling of MilkUniforms exactly like CPlugin::ApplyShaderParams (milkdropfs.cpp), including its quirks, plus the preset-level random state (CState::RandomizePresetVars).

Structs§

RotParams
Per-preset random rotation/translation parameters (m_rot_base, m_rot_speed, m_xlate) for the 24 rot_* matrices, plus m_rand_preset.

Functions§

drop_rot_translation
projectM uploads glm::mat3x4(mat4): only the three rotation columns, so the translation (row 3 of the ABI’s float4x3) is lost. Zero it (see crate::CompatRules::rot_translation_dropped).
pack_float4x3
Pack a D3DX 4x4 (row-major m[row][col]) into the ABI’s float4x3 -> mat3x4 layout: out[col][row] = m[row][col] for col < 3.
rot_matrix
temp = Rx * T * Rz * Ry (D3DXMatrixMultiply order used by ApplyShaderParams).