source1import icon indicating copy to clipboard operation
source1import copied to clipboard

Material conditionals lacking priority

Open kristiker opened this issue 2 years ago • 1 comments

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 avatar Jan 01 '23 15:01 kristiker

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
    }
}

kristiker avatar Jan 05 '23 23:01 kristiker