0
Fixed

Multiplying a two component color with a three component color breaks shaders

robert briscoe 11 years ago updated by Freya Holmér (Developer) 11 years ago 6

Admin Edit: Changed title, original title was "Strange Shader Error v0.14".

Original post below:

For some reason SF will not compile this node setup. There doesn't seem to be anything particularly unusual going on from what I can see; I'm just trying to use a Sin wave to create a subtle, pulsating light glow. (I added the UV node to the texture node just in case - no change)

Image 79

Answer

Answer
Fixed

Will fix this!

In the meantime, append a Value of 0 after the Sin node, making it a three-component color should make it multiply with the texture correctly


Edit: You can now do operations with different component counts in 0.15 :)

It's, a strange setup. Panner isn't meant to be used on anything other than UV coords, but it shouldn't *break* with the setup you've got. I'll have a look

Found the issue, you're multiplying a Vector3 with a Vector2, which apparently doesn't work on the shader side yet! I'll rename this thread :)

Isolated error case:


Planned

Will fix this!

In the meantime, append a Value of 0 after the Sin node, making it a three-component color should make it multiply with the texture correctly

Hi Joachim,


Thanks for looking into this, I actually forgot to mask out the Sin at the end which is what led me to this issue. Basically I'm using a sin wave (well multiple now) mapped to world-space coords to simulate the a subtle light flicker so that when I have multiple objects, the flicker isn't 'synced' and artificial looking.

Another update: I had a similar issue yesterday when trying to do the following and am wondering if it's related to the above:



Am i doing something wrong here?

That's a separate issue. Currently, you can't use any geometry data (Such as the normal/view vector) going into the alpha clip. Feel free to open a bug request on that :)

Answer
Fixed

Will fix this!

In the meantime, append a Value of 0 after the Sin node, making it a three-component color should make it multiply with the texture correctly


Edit: You can now do operations with different component counts in 0.15 :)