New Shader: Color Invertor

Mods, guides how to use and install mods go right in here.
Post Reply
User avatar
SankeySMM2
Posts: 230
Joined: 13 Feb 2021, 20:12
Contact:

Post » 16 Mar 2024, 18:44

I was lazy to do the work myself so I decided to make it with ChatGPT. Here is a full code of the shader:

Code: Select all

vec4 effect(vec4 vcolor, Image tex, vec2 texcoord, vec2 pixel_coords)
{   
    // Sample the texture at the given texture coordinates.
    vec4 input0 = Texel(tex, texcoord);

    // Invert the RGB channels by subtracting them from 1.
    vec3 invertedColor = 1.0 - input0.rgb;

    // Output the final color with original alpha value.
    return vec4(invertedColor, 1.0);
}
Copy all this and paste it in Notepad, click 'save as', go to the directory where you find the characters and mappacks folder, go up level, make a new folder named 'shaders' in that folder. Open that folder and save the file as anything. Now, open the game and enable that shader.

Post Reply