AGL > Graphics Parameters (PMAA)

A PMAA file contains a parameter tree for various graphical effects. The PMAA file format has many different file extensions, such as .baglenv, .bagldof and .bagllmap.

There are two versions of this file format and because these are quite different the documentation has been split up into two separate pages:

The remainder of this page explains common concepts of the PMAA format:

Overview

Every parameter tree starts with a parameter list whose name is param_root. Its children depend on the effect type and version that are specified in the header.

  • Every parameter list has a name and may contain other parameter lists and parameter objects.
  • Every parameter object has a name and type and contains a specific set of parameter values.
  • Every parameter value has a name, type and value.

While every parameter list, object and value has a name, the PMAA file unfortunately contains only contains their CRC32 hashes. The only way to recover the actual names is by reverse engineering or guessing.

Effect Types

This section lists the effect types that are currently known. Although the agl library already implements various different types, games may also implement types of their own.

The following effect types are defined by the agl library:

TypeClass
aglNmdwagl::fx::NormalDrawer
aglatexagl::pfx::AutoExposure
aglblmagl::pfx::Bloom
aglcamCamera
aglccragl::pfx::ColorCorrection
aglclwdagl::fx::Cloud
aglcubeagl::env::CubeMapMgr
agldecdagl::fx::DecalDrawer
agldofagl::env::DepthOfField
aglenvagl::env::EnvObMgr
aglenvsetagl::env::EnvObjSetMgr
aglfilaagl::pfx::FilterAA
aglflragl::pfx::FlareFilter
aglglragl::pfx::GlareFilter
agllmapagl::lght::LightMapMgr
agllrefagl::lght::LocalReflection
aglmfagl::utl::MultiFilter
aglofxagl::fx::OccludedEffectMgr
aglprojsdwagl::sdw::ProjectionShadow
aglsdwagl::sdw::DepthShadow
aglshppagl::sdw::ShadowPrePass
aglssaoagl::sdw::SSAO
aglvolmagl::fx::VolumeMask
kskyagl::pfx::Sky
prefagl::lght::PlanarReflection

The following effect types are defined by the gsys library:

TypeClass
gapkginfogsys::ApplicationPackageInfo
genvgsys::ModelSceneEnv
glghtgsys::ModelSceneGI
glpbdgsys::LightProbeMgr::ProbeVolumeMgr
glpbmgsys::LightProbeMgr
gmsconfgsys::ModelSceneConfigList
gsdwgsys::ModelSceneShadow
gsysdclaogsys::ModelDecalAoObject
ptclconfgsys::ParticleConfig

The following effect types are defined by the LunchPack framework:

TypeClass
lpdcamLp::Sys::DbgCamera

The following effect types are defined by Splatoon 2:

TypeClass
smsCmn::SealShadow

Value Types

The following value types are found in PMAA file:

IDSizeNameDescription
01boolbool
14f32float
24intint
38vec2sead::Vector2<float>
412vec3sead::Vector3<float>
516vec4sead::Vector4<float>
616colorsead::Color4f
7string32sead::FixedSafeString<32>
8string64sead::FixedSafeString<64>
9128curve1
10256curve2
11384curve3
12512curve4
13buffer_int
14buffer_float
15string256sead::FixedSafeString<256>
1616quatsead::Quat<float>
174u32unsigned int
18buffer_u32
19buffer_binary
20stringRefsead::SafeStringBase

String Types

These are null-terminated strings with a given maximum length. In some games, all strings use the maximum number of bytes (see notes). In other games, the strings use only the necessary number of bytes, even if this causes the rest of the file to be misaligned.

Curve Types

A curve contains two 32-bit integers, followed by 30 floats. The first integer specifies the number of data points of the curve (at most 30). The second integer specifies the curve type (see below).

The types curve2, curve3 and curve4 are the same as curve1, except that they store multiple independent curves behind each other.

IDType
0Linear
1Hermit
2Step
3Sin
4Cos
5SinPow2
6Linear2D
7Hermit2D
8Step2D
9NonuniformSpline
10Hermit2DSmooth

Notes

A PMAA file contains null-terminated strings with a fixed size. It is possible that the size is larger than the length of the string. In newer games, the remaining space is simply filled with null bytes. However, in old games, it is filled with 0xCD bytes, except for the last byte, which is set to 0. This is probably uninitialized memory in the tool that generated the PMAA files.