Konsl / spicetify-visualizer

Audio Visualizer for Spicetify
161 stars 13 forks source link

Visualizer looks like this on any song and any theme #35

Open GigaZelensky opened 2 weeks ago

GigaZelensky commented 2 weeks ago

image Is there a way to fix it?

butterYeeter commented 1 week ago

Hi I took a look at the extension source. It's pretty easy. You just need to modify some shader code.

Firstly launch spotify using the following command:

spicetify watch -a

Your next step is to open the index.js file from the visualizer extension: {2FC7296D-E289-40F4-B3BC-A477D0BBDC47}

Open the file in your text editor of choice. Scroll through the file until you find this line:

void main() {
    gl_Position = vec4(inPosition, 0.0, 1.0);
    fragUV = (inPosition + 1.0) / 2.0;
    fragOutputColor = uOutputColor;
}

image

Comment out the line that says: fragOutputColor = uOutputColor; and underneath it type fragColor = vec3(1.0, 0.0, 0.0); It should now look like this:

void main() {
    gl_Position = vec4(inPosition, 0.0, 1.0);
    fragUV = (inPosition + 1.0) / 2.0;
    // fragOutputColor = uOutputColor;
    fragOutputColor = vec3(1.0, 0.0, 0.0);
}

Save the file and spicetify should automatically reload. You should now have a red visualizer like so: Before:

image

After:

image

You can see the before and after. Now you can simply change the color to whatever your heart desires. Keep in mind that it is and rgb color code and that the values are encoded as floats from 0 to 1. Other than that enjoy :D

Here is the color that I like :)

{D6C94EB7-E352-4A1C-9EDB-F3BF430CFE53}

The color code for mine is:

    fragOutputColor = vec3(0.2, 0.8, 0.5);