0

I'm still trying to learn how Unity Shader graph works but I hit a wall.

I'm getting the UV map, which I know ranges from 0 to 1 in the red channel and 0 to 1 in the green channel.

I'm extracting the red channel to blend two textures together but red channels looks weird.

enter image description here

As you can see, if I apply a contrast node, the line separating black and white is WAY to the left. I expected it to be right in the middle. I thought this could be a contrast gotcha but as you can see in the blend node, it shows more of the second texture than the first one.

In the preview node, you can see it has way more white values than black values

What I wanted was to blend the two textures equaly from each side and control the blend (opacity contrast) with a number, with "0" being totally blended and "1" being not blended at all (left side = tex1 and right side = tex2)

Contrast = 1

4

1 回答 1

0

我设法让它工作。红色通道不是罪魁祸首,而是对比节点。

我使用 REMAP 节点解决了这个问题。

当对比度为 0 时重新映射 In MinMax = 0..1 Out MinMax = 0..1

当对比度为 1 时重新映射 In MinMax = 0.4999..0.5 Out MinMax = 0..1

所以它会生成一个黑白纹理,中间有分割线

对比度 == 0

对比度 == 1

于 2020-12-20T18:49:37.353 回答