Custom Water Material Error?

peefTube

L1: Registered
Jul 10, 2020
7
0
I've modified the 2fort .vmts to create custom water, and everything is working except for this:
upload_2021-4-30_15-38-58.png


I have no clue what's gone wrong!
Here's the .vmt for the expensive water:
Code:
"Water"
{
    "%keywords" "tf"
    //    $forcecheap 1
   
    "%tooltexture" "dev/tfwater_normal"
    "%compilewater" 1
    "$abovewater" 1
    //"$nofresnel" "1"

    "$envmap" "env_cubemap"   
    "$refracttexture" "_rt_WaterRefraction"
    "$refractamount" ".32"
    //"$refracttint" "{191 179 155}"
    "$refractblur" "1"

    "$reflecttexture" "_rt_WaterReflection"
    "$reflectamount" ".25"
    //"$reflecttint" "{230 240 255}"
//    "$reflectsaturation" "[0 0 1]"

    "$scale" "[1 1]"

//    "$bumpmap" "dev/water_dudv"
    "$normalmap" "water/tfwater001_normal"

    "$surfaceprop" "water"
    "$bottommaterial" "water/water_hyperblue_beneath.vmt"
    "$bumpframe" "0"

    "$fogenable" 1
    "$fogcolor" "{87 167 204}"
    "$fogstart" "50"
    "$fogend" "4000"

     "$temp" "[0 0]"
     "$curr" 0.0
     "$curr2" 0.0

    "Water_DX60"
    {
        "$fallbackmaterial" "nature/water_dx70"
    }

    "Proxies"
    {
        "AnimatedTexture"
        {
            "animatedtexturevar" "$normalmap"
            "animatedtextureframenumvar" "$bumpframe"
            "animatedtextureframerate" 30.00
        }

        "Sine"
        {
            "sineperiod" "24"
            "sinemin" -0.5
            "sinemax" 0.5
            "resultVar" "$curr"
        }
        "Sine"
        {
            "sineperiod" "16"
            "sinemin" 0.5
            "sinemax" -0.5
            "resultVar" "$curr2"
        }

        "Equals"
        {
            "srcVar1" "$curr2"
            "resultVar" "$temp[0]"
        }
        "Equals"
        {
            "srcVar1" "$curr"
            "resultVar" "$temp[1]"
        }


        "TextureTransform"
        {
            "translateVar" "$temp"
            "resultVar" "$bumptransform"
        } 

//        "TextureScroll"
//        {
//            "texturescrollvar" "$bumptransform"
//            "texturescrollrate" .1
//            "texturescrollangle" 45.00
//        }
        "WaterLOD"
        {
            // fixme!  This has to be here, or material loading barfs.
            "dummy" 0
        }
    }
}

And here's the .vmt for the beneath:
Code:
"Water"
{
    "%keywords" "tf"
//    "$forcecheap" 1

    "$abovewater" 0
    "%compilewater" 1
    "$CHEAPWATERSTARTDISTANCE" 500.0
    "$CHEAPWATERENDDISTANCE" 1000.0
    // bottom materials shouldn't use $envmap!!!  They won't work if they do.
//    "$envmap" "env_cubemap"
    "%tooltexture" "dev/water_normal"
    "$refractamount" ".8"
    "$refracttint" "[0.95 0.97 1.0]"

    "$reflectamount" "1.0"
    "$reflecttint" "[1 1 1]"

//    "$reflecttexture" "_rt_WaterReflection"
    "$refracttexture" "_rt_WaterRefraction"

    "$scale" "[1 1]"

    <dx90
    {
             "$fallbackmaterial" "water/water_2fort_beneath_dx80"

    }


    "$blurrefract" "1"
//    "$bumpmap"  "water/tfwater001_dudv"
    "$normalmap" "water/tfwater001_normal"

     $underwateroverlay "effects/water_warp_2fort"
    "$surfaceprop" "water"
    "$bumpframe" "0"

    "$fogenable" 1
//    "$fogcolor" "{0 0 0}"
    "$fogcolor" "{69 131 160}"
    "$fogstart" -350
    "$fogend" 1050.00

    "Water_DX60"
    {
        "$fallbackmaterial" "nature/water_dx70_beneath"
    }

    "Proxies"
    {
        "AnimatedTexture"
        {
            "animatedtexturevar" "$normalmap"
            "animatedtextureframenumvar" "$bumpframe"
            "animatedtextureframerate" 30.00
        }

        "TextureScroll"
        {
            "texturescrollvar" "$bumptransform"
            "texturescrollrate" .05
            "texturescrollangle" 45.00
        }

        "WaterLOD"
        {   
            // fixme!  This has to be here, or material loading barfs.
            "dummy" 0
        }
    }
}

Is there any idea as to what's gone wrong?