Shader not registering the colour blue

Godot Version

4.1.1

Question

So I have a shader I’m working on. Simple colour switch. It is not detecting the blue I’m using correctly. Here’s a picture. I’m stumped. The top portion of the square is coloured blue in the png. For some reason it shows up as black in the shader in the box when I drag it over which is making the rest of the input incorrect. I’m using the colour test png which you can see on the left side of the screen.

Blue from source material is not registering. That’s the problem. Not the rest of the graph.

Please show the rest of the nodes. Otherwise it’s hard to help you with that little information. Also please post another picture with the focus of the result mesh in the editor so we can see how it does look with your given shader

image
This is the texture I’m using in the gMore detailed full graph with red and green channels working correctly.


You can see that the red channel is getting switched to blue, and the green channel is getting switched to red. And the final output on the right is allowing me to switch parameters. So red channel causes the output to be green on the bottom and green channel causes it to be blue on the right.
raph. Which has a line of rgb 255 blue, green, and red so those channels can be switched to any chosen colour.

Any help would be appreciated. And no connecting the nodes at the bottom does not fix it. Here is the top example, but fully connected. And distorting all the colours because of it.

image
Working red and green channels allow for switching to any colour. But the blue isn’t showing, even when connected.

You are adding the blue channel but multiplying the other ones. The source texture does not seem to have blue either.

Source texture above does have blue in it. That was the problem I’ve used multiple blue RGB 0,0,255 textures and they’re not showing up. I didn’t realize the picture I chose showed adding in the blue channel. But it isn’t working still. Blue not registering from source texture is the problem. Not the rest of the graph.

@Talio you should set your sampler node to sampler2D and not color

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.