kristiker / source1import

Import Source game content into Source 2
MIT License
68 stars 11 forks source link

Material conditionals lacking priority #43

Open kristiker opened 1 year ago

kristiker commented 1 year ago

The orange towers in de_dust2 look different with high gpu settings. S1Import does not prioritize higher order values and uses last key seen on file. Similar thing with _dx9 and hdr_dx9 blocks lacking a priority system.

// Sets the value when Shader Detail is High or higher
"GPU>=2?$color" "[ 1 0 0 ]" // Quoted parameter because of equal sign.
GPU<2  // Sets the values in the block if Shader Detail is below High.
{
    $envmap env_cubemap
    $color "[ 0 0 1 ]"
}
kristiker commented 1 year ago

Also these blocks

// envmaptint_fix
"LightmappedGeneric"
{
    "$basetexture" "Metal/metalwall078a"
    "$surfaceprop" "metal"
    "%keywords" "combine"

    // NOTE: Even though env_cubemap is here, it will turned off for DX6
    // because $multipass 1 isn't defined
    "$envmap" "env_cubemap"
    "$envmaptint" "[ .56 .56 .75 ]"
    "$envmapcontrast" 1
    "$envmapsaturation" 1

    "LightmappedGeneric_DX9"
    {
        "$bumpmap" "metal/metalwall078a_normal"
        "$normalmapalphaenvmapmask" 1
        "$envmaptint" "[ .09 .1 .12]"
    }

    "LightmappedGeneric_DX8"
    {
        "$bumpmap" "metal/metalwall078a_normal"
        "$nodiffusebumplighting" 1
        "$normalmapalphaenvmapmask" 1
    }

    "LightmappedGeneric_NoBump_DX8"
    {
        "$basetexture" "metal/citadel_metalwall078a"
        "$basealphaenvmapmask" 1
    }

    "LightmappedGeneric_hdr_dx9"
    {
        // put HDR override stuff here
        "$envmaptint" "[ .09 .1 .12]"
        "$bumpmap" "metal/metalwall078a_normal"
        "$normalmapalphaenvmapmask" 1
    }
}