PrismaticFlower / shaderpatch

Improved shaders (and fun stuff for modders) for Star Wars Battlefront II (2005) - Incompatible with Classic Collection
MIT License
39 stars 2 forks source link

EnvFX Effect("Water") causes spfx_munge to crash #36

Closed DoctorAnsem closed 5 years ago

DoctorAnsem commented 5 years ago

Not sure if it's just the Water effect in itself or something specific in this instance, but it happens and I've traced the issue there. The Water effect I'm using here has the following parameters:

Effect("Water")
{

    // general parameters
    PatchDivisions(4,4);

    // ocean parameters
    OceanEnable(0);

    // water event parameters
    WaterRingColor(148, 170, 192,255);
    WaterWakeColor(192, 192, 192,255);
    WaterSplashColor((192, 192, 192,255);

    // PC parameters
    PC()
    {
        Tile(2.0,2.0);
        MainTexture("tile_01");
        LODDecimation(4);
        RefractionColor(16, 194, 206, 255);
        ReflectionColor(127,253,255,255);
        UnderwaterColor(15, 31, 36, 128);
        FresnelMinMax(0.4,0.6);
        FarSceneRange(500)

        NormalMapTextures("water_normalmap_",16,8.0);
        BumpMapTextures("water_bumpmap_",16,8.0);
        SpecularMaskTextures("water_specularmask_",25, 4);
        SpecularMaskTile(3.0, 3.0);
        SpecularMaskScrollSpeed(0.0,0.0);
        Velocity(0.02,0.04);
        OscillationEnable(1);

    }

}
PrismaticFlower commented 5 years ago

Well that is surprising. I really need to do more testing on these tools. Thanks for letting me know, I'll look into it as soon as I can. I just got back home from a week visiting family so I'm a little behind with my work on this but I hope to have v0.10 out and done (with bug fixes for your problems in) by the end of the year. Hopefully I'm not being too optimistic.

DoctorAnsem commented 5 years ago

Well that was dumb. I now know why this crash happened, it's right there in the settings. WaterSplashColor((192, 192, 192,255); has an extra opening bracket for some reason.

Actually dumb thing is that this line came straight from the stock files and the stock munge lets this error slip right through, so again it was just unfortunate that I apparently happen to be blind. This isn't a bug with spfx_munge at all, if anything it is a bug with the stock munge tools.

PrismaticFlower commented 5 years ago

Huh, I'm a bit silly for not spotting it either. I'll go ahead and close this then.