#pragma once

#include "Game/T5/T5.h"
#include "Techset/CommonTechnique.h"
#include "Techset/CommonTechset.h"

namespace T5
{
    inline const char* techniqueTypeNames[]{
        "depth prepass",
        "build floatz",
        "build shadowmap depth",
        "build shadowmap color",
        "unlit",
        "emissive",
        "emissive shadow",
        "emissive nvintz",
        "emissive shadow nvintz",
        "emissive reflected",
        "lit",
        "lit sun",
        "lit sun shadow",
        "lit spot",
        "lit spot shadow",
        "lit omni",
        "lit omni shadow",
        "lit dlight",
        "lit sun dlight",
        "lit sun shadow dlight",
        "lit spot dlight",
        "lit spot shadow dlight",
        "lit omni dlight",
        "lit omni shadow dlight",
        "lit glight",
        "lit sun glight",
        "lit sun shadow glight",
        "lit spot glight",
        "lit spot shadow glight",
        "lit omni glight",
        "lit omni shadow glight",
        "lit dlight glight",
        "lit sun dlight glight",
        "lit sun shadow dlight glight",
        "lit spot dlight glight",
        "lit spot shadow dlight glight",
        "lit omni dlight glight",
        "lit omni shadow dlight glight",
        "lit alpha",
        "lit sun alpha",
        "lit sun shadow alpha",
        "lit spot alpha",
        "lit spot shadow alpha",
        "lit omni alpha",
        "lit omni shadow alpha",
        "lit remap",
        "lit sun remap",
        "lit sun shadow remap",
        "lit spot remap",
        "lit spot shadow remap",
        "lit omni remap",
        "lit omni shadow remap",
        "lit fade",
        "lit sun fade",
        "lit sun shadow fade",
        "lit spot fade",
        "lit spot shadow fade",
        "lit omni fade",
        "lit omni shadow fade",
        "lit charred",
        "lit fade charred",
        "lit sun charred",
        "lit sun fade charred",
        "lit sun shadow charred",
        "lit sun shadow fade charred",
        "lit spot charred",
        "lit spot fade charred",
        "lit spot shadow charred",
        "lit spot shadow fade charred",
        "lit omni charred",
        "lit omni fade charred",
        "lit omni shadow charred",
        "lit omni shadow fade charred",
        "lit instanced",
        "lit instanced sun",
        "lit instanced sun shadow",
        "lit instanced spot",
        "lit instanced spot shadow",
        "lit instanced omni",
        "lit instanced omni shadow",
        "lit nvintz",
        "lit sun nvintz",
        "lit sun shadow nvintz",
        "lit spot nvintz",
        "lit spot shadow nvintz",
        "lit omni nvintz",
        "lit omni shadow nvintz",
        "lit dlight nvintz",
        "lit sun dlight nvintz",
        "lit sun shadow dlight nvintz",
        "lit spot dlight nvintz",
        "lit spot shadow dlight nvintz",
        "lit omni dlight nvintz",
        "lit omni shadow dlight nvintz",
        "lit glight nvintz",
        "lit sun glight nvintz",
        "lit sun shadow glight nvintz",
        "lit spot glight nvintz",
        "lit spot shadow glight nvintz",
        "lit omni glight nvintz",
        "lit omni shadow glight nvintz",
        "lit dlight glight nvintz",
        "lit sun dlight glight nvintz",
        "lit sun shadow dlight glight nvintz",
        "lit spot dlight glight nvintz",
        "lit spot shadow dlight glight nvintz",
        "lit omni dlight glight nvintz",
        "lit omni shadow dlight glight nvintz",
        "lit instanced nvintz",
        "lit instanced sun nvintz",
        "lit instanced sun shadow nvintz",
        "lit instanced spot nvintz",
        "lit instanced spot shadow nvintz",
        "lit instanced omni nvintz",
        "lit instanced omni shadow nvintz",
        "light spot",
        "light omni",
        "light spot shadow",
        "light spot charred",
        "light omni charred",
        "light spot shadow charred",
        "fakelight normal",
        "fakelight view",
        "sunlight preview",
        "case texture",
        "solid wireframe",
        "shaded wireframe",
        "debug bumpmap",
        "debug bumpmap instanced",
        "impact mask",
    };
    static_assert(std::extent_v<decltype(techniqueTypeNames)> == TECHNIQUE_COUNT);
    static inline techset::CommonTechniqueTypeNames commonTechniqueTypeNames(techniqueTypeNames, std::extent_v<decltype(techniqueTypeNames)>);

    static techset::CommonStreamRoutingSourceInfo streamRoutingSources[]{
        {
         .name = "position",
         .abbreviation = "p",
         .optional = false,
         },
        {
         .name = "color",
         .abbreviation = "c",
         .optional = false,
         },
        {
         .name = "texcoord[0]",
         .abbreviation = "t0",
         .optional = false,
         },
        {
         .name = "normal",
         .abbreviation = "n",
         .optional = false,
         },
        {
         .name = "tangent",
         .abbreviation = "t",
         .optional = false,
         },
        {
         .name = "texcoord[1]",
         .abbreviation = "t1",
         .optional = false,
         },
        {
         .name = "texcoord[2]",
         .abbreviation = "t2",
         .optional = true,
         },
        {
         .name = "normalTransform[0]",
         .abbreviation = "n0",
         .optional = true,
         },
        {
         .name = "normalTransform[1]",
         .abbreviation = "n1",
         .optional = true,
         },
        {
         .name = "blendWeight",
         .abbreviation = "b",
         .optional = true,
         },
    };
    static_assert(std::extent_v<decltype(streamRoutingSources)> == STREAM_SRC_COUNT);

    static techset::CommonStreamRoutingDestinationInfo streamRoutingDestinations[]{
        {
         .name = "position",
         .abbreviation = "p",
         },
        {
         .name = "normal",
         .abbreviation = "n",
         },
        {
         .name = "color[0]",
         .abbreviation = "c0",
         },
        {
         .name = "color[1]",
         .abbreviation = "c1",
         },
        {
         .name = "depth",
         .abbreviation = "d",
         },
        {
         .name = "texcoord[0]",
         .abbreviation = "t0",
         },
        {
         .name = "texcoord[1]",
         .abbreviation = "t1",
         },
        {
         .name = "texcoord[2]",
         .abbreviation = "t2",
         },
        {
         .name = "texcoord[3]",
         .abbreviation = "t3",
         },
        {
         .name = "texcoord[4]",
         .abbreviation = "t4",
         },
        {
         .name = "texcoord[5]",
         .abbreviation = "t5",
         },
        {
         .name = "texcoord[6]",
         .abbreviation = "t6",
         },
        {
         .name = "texcoord[7]",
         .abbreviation = "t7",
         },
        {
         .name = "texcoord[8]",
         .abbreviation = "t8",
         },
        {
         .name = "texcoord[9]",
         .abbreviation = "t9",
         },
        {
         .name = "texcoord[10]",
         .abbreviation = "t10",
         },
        {
         .name = "texcoord[11]",
         .abbreviation = "t11",
         },
        {
         .name = "texcoord[12]",
         .abbreviation = "t12",
         },
        {
         .name = "texcoord[13]",
         .abbreviation = "t13",
         },
        {
         .name = "blendWeight",
         .abbreviation = "b",
         },
    };
    static_assert(std::extent_v<decltype(streamRoutingDestinations)> == STREAM_DST_COUNT);

    static inline techset::CommonStreamRoutingInfos commonRoutingInfos(streamRoutingSources,
                                                                       std::extent_v<decltype(streamRoutingSources)>,
                                                                       streamRoutingDestinations,
                                                                       std::extent_v<decltype(streamRoutingDestinations)>);

    static techset::CommonCodeConstSourceInfo commonCodeConstSources[]{
        {
         .value = CONST_SRC_CODE_LIGHT_POSITION,
         .accessor = "lightPosition",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_DIFFUSE,
         .accessor = "lightDiffuse",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPECULAR,
         .accessor = "lightSpecular",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOTDIR,
         .accessor = "lightSpotDir",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOTFACTORS,
         .accessor = "lightSpotFactors",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_LIGHT_SPOT_FACTORS,
         .techFlagShaderType = techset::CommonTechniqueShaderType::PIXEL,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_ATTENUATION,
         .accessor = "lightAttenuation",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_FALLOFF_A,
         .accessor = "lightFallOffA",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_FALLOFF_B,
         .accessor = "lightFallOffB",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOT_MATRIX0,
         .accessor = "lightSpotMatrix0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOT_MATRIX1,
         .accessor = "lightSpotMatrix1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOT_MATRIX2,
         .accessor = "lightSpotMatrix2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOT_MATRIX3,
         .accessor = "lightSpotMatrix3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOT_AABB,
         .accessor = "lightSpotAABB",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_CONE_CONTROL1,
         .accessor = "lightConeControl1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_CONE_CONTROL2,
         .accessor = "lightConeControl2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_SPOT_COOKIE_SLIDE_CONTROL,
         .accessor = "lightSpotCookieSlideControl",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_NEARPLANE_ORG,
         .accessor = "nearPlaneOrg",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_NEARPLANE_DX,
         .accessor = "nearPlaneDx",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_NEARPLANE_DY,
         .accessor = "nearPlaneDy",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SHADOW_PARMS,
         .accessor = "shadowParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SHADOWMAP_POLYGON_OFFSET,
         .accessor = "shadowmapPolygonOffset",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_RENDER_TARGET_SIZE,
         .accessor = "renderTargetSize",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_VPOSX_TO_WORLD,
         .accessor = "vposx_to_world",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_VPOSY_TO_WORLD,
         .accessor = "vposy_to_world",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_VPOS1_TO_WORLD,
         .accessor = "vpos1_to_world",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_FALLOFF_PLACEMENT,
         .accessor = "lightFalloffPlacement",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DOF_EQUATION_VIEWMODEL_AND_FAR_BLUR,
         .accessor = "dofEquationViewModelAndFarBlur",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DOF_EQUATION_SCENE,
         .accessor = "dofEquationScene",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DOF_LERP_SCALE,
         .accessor = "dofLerpScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DOF_LERP_BIAS,
         .accessor = "dofLerpBias",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DOF_ROW_DELTA,
         .accessor = "dofRowDelta",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_PARTICLE_CLOUD_COLOR,
         .accessor = "particleCloudColor",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GAMETIME,
         .accessor = "gameTime",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_ALPHA_FADE,
         .accessor = "alphaFade",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_PIXEL_COST_FRACS,
         .accessor = "pixelCostFracs",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_PIXEL_COST_DECODE,
         .accessor = "pixelCostDecode",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_FILTER_TAP_0,
         .accessor = "filterTap",
         .arrayCount = 8,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_MATRIX_R,
         .accessor = "colorMatrixR",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_MATRIX_G,
         .accessor = "colorMatrixG",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_MATRIX_B,
         .accessor = "colorMatrixB",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SHADOWMAP_SWITCH_PARTITION,
         .accessor = "shadowmapSwitchPartition",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SHADOWMAP_SCALE,
         .accessor = "shadowmapScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_ZNEAR,
         .accessor = "zNear",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SUN_POSITION,
         .accessor = "sunPosition",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SUN_DIFFUSE,
         .accessor = "sunDiffuse",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SUN_SPECULAR,
         .accessor = "sunSpecular",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHTING_LOOKUP_SCALE,
         .accessor = "lightingLookupScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DEBUG_BUMPMAP,
         .accessor = "debugBumpmap",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_MATERIAL_COLOR,
         .accessor = "materialColor",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_FOG,
         .accessor = "fogConsts",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_FOG2,
         .accessor = "fogConsts2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_FOG_COLOR,
         .accessor = "fogColor",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SUN_FOG,
         .accessor = "sunFog",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SUN_FOG_DIR,
         .accessor = "sunFogDir",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SUN_FOG_COLOR,
         .accessor = "sunFogColor",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLOW_SETUP,
         .accessor = "glowSetup",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLOW_APPLY,
         .accessor = "glowApply",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_BIAS,
         .accessor = "colorBias",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_TINT_BASE,
         .accessor = "colorTintBase",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_TINT_DELTA,
         .accessor = "colorTintDelta",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_OUTDOOR_FEATHER_PARMS,
         .accessor = "outdoorFeatherParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SKY_TRANSITION,
         .accessor = "skyTransition",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_ENVMAP_PARMS,
         .accessor = "envMapParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SPOT_SHADOWMAP_PIXEL_ADJUST,
         .accessor = "spotShadowmapPixelAdjust",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_SHADOWMAP_PIXEL_ADJUST,
         .accessor = "dlightSpotShadowmapPixelAdjust",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CLIP_SPACE_LOOKUP_SCALE,
         .accessor = "clipSpaceLookupScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = CONST_SRC_CODE_CLIP_SPACE_LOOKUP_OFFSET,
         .accessor = "clipSpaceLookupOffset",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = CONST_SRC_CODE_PARTICLE_CLOUD_MATRIX,
         .accessor = "particleCloudMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = CONST_SRC_CODE_DEPTH_FROM_CLIP,
         .accessor = "depthFromClip",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = CONST_SRC_CODE_CODE_MESH_ARG_0,
         .accessor = "codeMeshArg",
         .arrayCount = 2,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = CONST_SRC_CODE_BASE_LIGHTING_COORDS,
         .accessor = "baseLightingCoords",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         },
        {
         .value = CONST_SRC_CODE_WIND_DIRECTION,
         .accessor = "windDirection",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = CONST_SRC_CODE_WATER_PARMS,
         .accessor = "waterParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         },
        {
         .value = CONST_SRC_CODE_GRASS_PARMS,
         .accessor = "grassParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_GRASS,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_GRASS_FORCE0,
         .accessor = "grassForce0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_GRASS,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_GRASS_FORCE1,
         .accessor = "grassForce1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_GRASS,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_GRASS_WIND_FORCE0,
         .accessor = "grassWindForce0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_GRASS,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_MOTIONBLUR_DIRECTION_AND_MAGNITUDE,
         .accessor = "motionblurDirectionAndMagnitude",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COMPOSITE_FX_DISTORTION,
         .accessor = "flameDistortion",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLOW_BLOOM_SCALE,
         .accessor = "bloomScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COMPOSITE_FX_OVERLAY_TEXCOORD,
         .accessor = "overlayTexCoord",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_BIAS1,
         .accessor = "colorBias1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_TINT_BASE1,
         .accessor = "colorTintBase1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_COLOR_TINT_DELTA1,
         .accessor = "colorTintDelta1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_FADE_EFFECT,
         .accessor = "fadeEffect",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_VIEWPORT_DIMENSIONS,
         .accessor = "viewportDimensions",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_FRAMEBUFFER_READ,
         .accessor = "framebufferRead",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_RESIZE_PARAMS1,
         .accessor = "resizeParams1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_RESIZE_PARAMS2,
         .accessor = "resizeParams2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_RESIZE_PARAMS3,
         .accessor = "resizeParams3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_VARIANT_WIND_SPRING_0,
         .accessor = "variantWindSpring",
         .arrayCount = 16,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DESTRUCTIBLE_PARMS,
         .accessor = "destructibleParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_200,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_CLOUD_WORLD_AREA,
         .accessor = "cloudWorldArea",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_WATER_SCROLL,
         .accessor = "waterScroll",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CROSSFADE_PARMS,
         .accessor = "crossFadeAlpha",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CHARACTER_CHARRED_AMOUNT,
         .accessor = "__characterCharredAmount",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_200,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_TREECANOPY_PARMS,
         .accessor = "treeCanopyParms",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_MARKS_HIT_NORMAL,
         .accessor = "marksHitNormal",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .techFlags = MTL_TECHFLAG_USES_MARKS_HIT_NORMAL,
         .techFlagShaderType = techset::CommonTechniqueShaderType::VERTEX,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL0,
         .accessor = "postFxControl0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL1,
         .accessor = "postFxControl1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL2,
         .accessor = "postFxControl2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL3,
         .accessor = "postFxControl3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL4,
         .accessor = "postFxControl4",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL5,
         .accessor = "postFxControl5",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL6,
         .accessor = "postFxControl6",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL7,
         .accessor = "postFxControl7",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL8,
         .accessor = "postFxControl8",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROL9,
         .accessor = "postFxControl9",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROLA,
         .accessor = "postFxControlA",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROLB,
         .accessor = "postFxControlB",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROLC,
         .accessor = "postFxControlC",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROLD,
         .accessor = "postFxControlD",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROLE,
         .accessor = "postFxControlE",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_POSTFX_CONTROLF,
         .accessor = "postFxControlF",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_HDRCONTROL_0,
         .accessor = "hdrControl0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_HDRCONTROL_1,
         .accessor = "hdrControl1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_POSXS,
         .accessor = "glightPosXs",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_POSYS,
         .accessor = "glightPosYs",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_POSZS,
         .accessor = "glightPosZs",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_FALLOFFS,
         .accessor = "glightFallOffs",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_REDS,
         .accessor = "glightReds",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_GREENS,
         .accessor = "glightGreens",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GLIGHT_BLUES,
         .accessor = "glightBlues",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_POSITION,
         .accessor = "dlightPosition",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_DIFFUSE,
         .accessor = "dlightDiffuse",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPECULAR,
         .accessor = "dlightSpecular",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_ATTENUATION,
         .accessor = "dlightAttenuation",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_FALLOFF,
         .accessor = "dlightFallOff",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_MATRIX_0,
         .accessor = "dlightSpotMatrix0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_MATRIX_1,
         .accessor = "dlightSpotMatrix1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_MATRIX_2,
         .accessor = "dlightSpotMatrix2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_MATRIX_3,
         .accessor = "dlightSpotMatrix3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_DIR,
         .accessor = "dlightSpotDir",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SPOT_FACTORS,
         .accessor = "dlightSpotFactors",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SHADOW_LOOKUP_MATRIX_0,
         .accessor = "dlightShadowLookupMatrix0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SHADOW_LOOKUP_MATRIX_1,
         .accessor = "dlightShadowLookupMatrix1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SHADOW_LOOKUP_MATRIX_2,
         .accessor = "dlightShadowLookupMatrix2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_DLIGHT_SHADOW_LOOKUP_MATRIX_3,
         .accessor = "dlightShadowLookupMatrix3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CLOUD_LAYER_CONTROL0,
         .accessor = "cloudLayerControl0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CLOUD_LAYER_CONTROL1,
         .accessor = "cloudLayerControl1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CLOUD_LAYER_CONTROL2,
         .accessor = "cloudLayerControl2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CLOUD_LAYER_CONTROL3,
         .accessor = "cloudLayerControl3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CLOUD_LAYER_CONTROL4,
         .accessor = "cloudLayerControl4",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_HERO_LIGHTING_R,
         .accessor = "heroLightingR",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_HERO_LIGHTING_G,
         .accessor = "heroLightingG",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_HERO_LIGHTING_B,
         .accessor = "heroLightingB",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_LIGHT_HERO_SCALE,
         .accessor = "lightHeroScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CINEMATIC_BLUR_BOX,
         .accessor = "cinematicBlurBox",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CINEMATIC_BLUR_BOX2,
         .accessor = "cinematicBlurBox2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_ADSZSCALE,
         .accessor = "adsZScale",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_UI3D_UV_SETUP_0,
         .accessor = "ui3dUVSetup0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_UI3D_UV_SETUP_1,
         .accessor = "ui3dUVSetup1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_UI3D_UV_SETUP_2,
         .accessor = "ui3dUVSetup2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_UI3D_UV_SETUP_3,
         .accessor = "ui3dUVSetup3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_UI3D_UV_SETUP_4,
         .accessor = "ui3dUVSetup4",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_UI3D_UV_SETUP_5,
         .accessor = "ui3dUVSetup5",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CHARACTER_DISSOLVE_COLOR,
         .accessor = "__characterDissolveColor",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CAMERA_LOOK,
         .accessor = "cameraLook",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CAMERA_UP,
         .accessor = "cameraUp",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CAMERA_SIDE,
         .accessor = "cameraSide",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM0,
         .accessor = "scriptVector0",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM1,
         .accessor = "scriptVector1",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM2,
         .accessor = "scriptVector2",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM3,
         .accessor = "scriptVector3",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM4,
         .accessor = "scriptVector4",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM5,
         .accessor = "scriptVector5",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM6,
         .accessor = "scriptVector6",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_GENERIC_PARAM7,
         .accessor = "scriptVector7",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_EYEOFFSET,
         .accessor = "eyeOffset",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CUSTOMWIND_CENTER,
         .accessor = "u_customWindCenter",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_CUSTOMWIND_SPRING,
         .accessor = "u_customWindSpring",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_SKY_COLOR_MULTIPLIER,
         .accessor = "skyColorMultiplier",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_EXTRA_CAM_PARAM,
         .accessor = "extraCamParam",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_EMBLEM_LUT_SELECTOR,
         .accessor = "emblemLUTSelector",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = CONST_SRC_CODE_WORLD_MATRIX,
         .accessor = "worldMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_WORLD_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_WORLD_MATRIX,
         .accessor = "inverseWorldMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_WORLD_MATRIX,
         .accessor = "transposeWorldMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_WORLD_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_MATRIX,
         .accessor = "inverseTransposeWorldMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_WORLD_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_VIEW_MATRIX,
         .accessor = "viewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_VIEW_MATRIX,
         .accessor = "inverseViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_VIEW_MATRIX,
         .accessor = "transposeViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_VIEW_MATRIX,
         .accessor = "inverseTransposeViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_PROJECTION_MATRIX,
         .accessor = "projectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_PROJECTION_MATRIX,
         .accessor = "inverseProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_PROJECTION_MATRIX,
         .accessor = "transposeProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_PROJECTION_MATRIX,
         .accessor = "inverseTransposeProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_WORLD_VIEW_MATRIX,
         .accessor = "worldViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_WORLD_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_WORLD_VIEW_MATRIX,
         .accessor = "inverseWorldViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_WORLD_VIEW_MATRIX,
         .accessor = "transposeWorldViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_WORLD_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX,
         .accessor = "inverseTransposeWorldViewMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_WORLD_VIEW_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_VIEW_PROJECTION_MATRIX,
         .accessor = "viewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_VIEW_PROJECTION_MATRIX,
         .accessor = "inverseViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_VIEW_PROJECTION_MATRIX,
         .accessor = "transposeViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_VIEW_PROJECTION_MATRIX,
         .accessor = "inverseTransposeViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_WORLD_VIEW_PROJECTION_MATRIX,
         .accessor = "worldViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_WORLD_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_WORLD_VIEW_PROJECTION_MATRIX,
         .accessor = "inverseWorldViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_WORLD_VIEW_PROJECTION_MATRIX,
         .accessor = "transposeWorldViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_WORLD_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_VIEW_PROJECTION_MATRIX,
         .accessor = "inverseTransposeWorldViewProjectionMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_WORLD_VIEW_PROJECTION_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_SHADOW_LOOKUP_MATRIX,
         .accessor = "shadowLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_SHADOW_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_SHADOW_LOOKUP_MATRIX,
         .accessor = "inverseShadowLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_SHADOW_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_SHADOW_LOOKUP_MATRIX,
         .accessor = "transposeShadowLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_SHADOW_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_SHADOW_LOOKUP_MATRIX,
         .accessor = "inverseTransposeShadowLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_SHADOW_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         .accessor = "worldOutdoorLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_TRANSPOSE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         .accessor = "inverseWorldOutdoorLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_TRANSPOSE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         .accessor = "transposeWorldOutdoorLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         },
        {
         .value = CONST_SRC_CODE_INVERSE_TRANSPOSE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         .accessor = "inverseTransposeWorldOutdoorLookupMatrix",
         .arrayCount = 0,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_PRIM,
         .transposedMatrix = CONST_SRC_CODE_INVERSE_WORLD_OUTDOOR_LOOKUP_MATRIX,
         },
    };

    static techset::CommonCodeSamplerSourceInfo commonCodeSamplerSources[]{
        {
         .value = TEXTURE_SRC_CODE_BLACK,
         .accessor = "black",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_WHITE,
         .accessor = "white",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_IDENTITY_NORMAL_MAP,
         .accessor = "identityNormalMap",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_MODEL_LIGHTING,
         .accessor = "modelLightingSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_LIGHTMAP_PRIMARY,
         .accessor = "lightmapSamplerPrimary",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::CUSTOM,
         .customSamplerIndex = CUSTOM_SAMPLER_LIGHTMAP_PRIMARY,
         },
        {
         .value = TEXTURE_SRC_CODE_LIGHTMAP_SECONDARY,
         .accessor = "lightmapSamplerSecondary",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::CUSTOM,
         .customSamplerIndex = CUSTOM_SAMPLER_LIGHTMAP_SECONDARY,
         },
        {
         .value = TEXTURE_SRC_CODE_SHADOWMAP_SUN,
         .accessor = "shadowmapSamplerSun",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_SHADOWMAP_SPOT,
         .accessor = "shadowmapSamplerSpot",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_FEEDBACK,
         .accessor = "feedbackSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_RESOLVED_POST_SUN,
         .accessor = "resolvedPostSun",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_NEEDS_RESOLVED_POST_SUN,
         },
        {
         .value = TEXTURE_SRC_CODE_RESOLVED_SCENE,
         .accessor = "resolvedScene",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_NEEDS_RESOLVED_SCENE,
         },
        {
         .value = TEXTURE_SRC_CODE_POST_EFFECT_SRC,
         .accessor = "postEffectSrc",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_POST_EFFECT_GODRAYS,
         .accessor = "postEffectGodRays",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_POST_EFFECT_0,
         .accessor = "postEffect0",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_POST_EFFECT_1,
         .accessor = "postEffect1",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_SKY,
         .accessor = "sky",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_LIGHT_ATTENUATION,
         .accessor = "attenuationSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_DLIGHT_ATTENUATION,
         .accessor = "dlightAttenuationSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_OUTDOOR,
         .accessor = "outdoor",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_FLOATZ,
         .accessor = "floatZSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_FLOATZ,
         },
        {
         .value = TEXTURE_SRC_CODE_PROCESSED_FLOATZ,
         .accessor = "processedFloatZSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_FLOATZ,
         },
        {
         .value = TEXTURE_SRC_CODE_RAW_FLOATZ,
         .accessor = "rawFloatZSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         .techFlags = MTL_TECHFLAG_USES_FLOATZ,
         },
        {
         .value = TEXTURE_SRC_CODE_CASE_TEXTURE,
         .accessor = "caseTextureSampler" /* Made up, nowhere to be seen */,
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_CINEMATIC_Y,
         .accessor = "cinematicYSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_CINEMATIC_CR,
         .accessor = "cinematicCrSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_CINEMATIC_CB,
         .accessor = "cinematicCbSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_CINEMATIC_A,
         .accessor = "cinematicASampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_REFLECTION_PROBE,
         .accessor = "reflectionProbeSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::CUSTOM,
         .customSamplerIndex = CUSTOM_SAMPLER_REFLECTION_PROBE,
         },
        {
         .value = TEXTURE_SRC_CODE_FEATHER_FLOAT_Z,
         .accessor = "featherFloatZSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_TERRAIN_SCORCH_TEXTURE_0,
         .accessor = "terrainScorchTextureSampler0",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_TERRAIN_SCORCH_TEXTURE_1,
         .accessor = "terrainScorchTextureSampler1",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_TERRAIN_SCORCH_TEXTURE_2,
         .accessor = "terrainScorchTextureSampler2",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_TERRAIN_SCORCH_TEXTURE_3,
         .accessor = "terrainScorchTextureSampler3",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_LIGHTMAP_SECONDARYB,
         .accessor = "lightmapSamplerSecondaryB",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::CUSTOM,
         .customSamplerIndex = CUSTOM_SAMPLER_LIGHTMAP_SECONDARYB,
         },
        {
         .value = TEXTURE_SRC_CODE_TEXTURE_0,
         .accessor = "codeTexture0",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_TEXTURE_1,
         .accessor = "codeTexture1",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_TEXTURE_2,
         .accessor = "codeTexture2",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_TEXTURE_3,
         .accessor = "codeTexture3",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_IMPACT_MASK,
         .accessor = "impactMaskSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_UI3D,
         .accessor = "ui3dSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_MISSILE_CAM,
         .accessor = "missileCamSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
        {
         .value = TEXTURE_SRC_CODE_COMPOSITE_RESULT,
         .accessor = "compositeResult",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::PER_OBJECT,
         },
        {
         .value = TEXTURE_SRC_CODE_HEATMAP,
         .accessor = "heatmapSampler",
         .updateFrequency = techset::CommonCodeSourceUpdateFrequency::RARELY,
         },
    };

    // See MaterialShaderArgumentType
    static inline techset::CommonShaderArgumentType commonArgumentTypes[]{
        {.m_shader_type = techset::CommonTechniqueShaderType::VERTEX, .m_value_type = techset::CommonShaderValueType::MATERIAL_CONST  },
        {.m_shader_type = techset::CommonTechniqueShaderType::VERTEX, .m_value_type = techset::CommonShaderValueType::LITERAL_CONST   },
        {.m_shader_type = techset::CommonTechniqueShaderType::PIXEL,  .m_value_type = techset::CommonShaderValueType::MATERIAL_SAMPLER},
        {.m_shader_type = techset::CommonTechniqueShaderType::VERTEX, .m_value_type = techset::CommonShaderValueType::CODE_CONST      },
        {.m_shader_type = techset::CommonTechniqueShaderType::PIXEL,  .m_value_type = techset::CommonShaderValueType::CODE_SAMPLER    },
        {.m_shader_type = techset::CommonTechniqueShaderType::PIXEL,  .m_value_type = techset::CommonShaderValueType::CODE_CONST      },
        {.m_shader_type = techset::CommonTechniqueShaderType::PIXEL,  .m_value_type = techset::CommonShaderValueType::MATERIAL_CONST  },
        {.m_shader_type = techset::CommonTechniqueShaderType::PIXEL,  .m_value_type = techset::CommonShaderValueType::LITERAL_CONST   },
    };
    static_assert(std::extent_v<decltype(commonArgumentTypes)> == MLT_ARG_COUNT);

    static inline techset::CommonCodeSourceInfos commonCodeSourceInfos(commonCodeConstSources,
                                                                       std::extent_v<decltype(commonCodeConstSources)>,
                                                                       commonCodeSamplerSources,
                                                                       std::extent_v<decltype(commonCodeSamplerSources)>,
                                                                       nullptr,
                                                                       0,
                                                                       commonArgumentTypes,
                                                                       std::extent_v<decltype(commonArgumentTypes)>);

    inline MaterialTypeInfo g_materialTypeInfo[]{
        {"",    ""   },
        {"m/",  "m_" },
        {"mc/", "mc_"},
        {"w/",  "w_" },
        {"wc/", "wc_"},
    };
    static_assert(std::extent_v<decltype(g_materialTypeInfo)> == MTL_TYPE_COUNT);
} // namespace T5
