Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

FS22 1.9.1 update broke the terrainShader. Tried a couple fixes but no bueno.

You can update it yourself..I was able to get it fixed.  

Add this line  pos *= instanceData.w; to the terrainshader.xml right above the line return pos + instanceData.xy; and rezip the map file.


float2 getPatchCoords(VS_INPUT In, ObjectParameters& object)

{

    float4 instanceData = object.terrainInstanceData;

    float2 pos = In.position.xy;

    uint deltaRaw = floatBitsToUint(instanceData.z);

    uint4 deltas = unpackUint4x8(deltaRaw);

    if (pos.x == 0) {

        uint levelDelta = deltas.x;

        pos.y = float(((int)pos.y >> levelDelta) << levelDelta);

    } else if (pos.x >= object.terrainPatchOffset.x-1) {

        uint levelDelta = deltas.y;

        pos.y = float(((int)pos.y >> levelDelta) << levelDelta);

    } else if (pos.y == 0) {

        uint levelDelta = deltas.z;

        pos.x = float(((int)pos.x >> levelDelta) << levelDelta);

    } else if (pos.y >= object.terrainPatchOffset.x-1) {

        uint levelDelta = deltas.w;

        pos.x = float(((int)pos.x >> levelDelta) << levelDelta);

    }

    pos *= instanceData.w;

    return pos + instanceData.xy;

Replying a year later just to say this saved my Elk Mountain Wyoming map too!

just started playing pc and having this issue but I can’t find the terrain shader xml in the files anywhere

It's inside the mod rar file directly, You have to unzip this file and change the file located at "\FS22_ElkMtnWyoming\maps\mapUS\data\terrainShader.xml" then you will have to compress the folder back into a zip file.