I have a material in which I take a texture (which is generated in realtime by a blueprint), blur it and increase the contrast. I want the result to serve as a displacement map for a tessellated surface. However, no matter what I do I get a load of errors. I suspect the four errors at the bottom are because of the two at the top.
I’ve tried using a MakeFloat3 node, putting the CheapContrast result into X and a Constant1 value of 0 into Y and Z. I’ve tried using CheapContrast_RGB as well, and various combinations.
Thanks for replying. Is a vector not just a collection of scalars?
The output from CheapContrast is a ‘Mask(R)’ node, so the Append node receives a scalar to A and a Vector2 to B. Does this not make a Vector3, which would therefore be the same variable type as the ‘1,1,1’ input into the multiply node?
Might be something in the blur node. Whatever. To check what exactly is the cause, you can view HLSL code, and check the lines, that are specified in the error message.
However, the line numbers don’t correspond to anything that makes sense - some are blank and some are comment blocks. Unless I’ve misunderstood the line numbers (I can find no documentation that explains them). I assume it’s the first number in brackets; I don’t know what the range after the comma means (I thought it was the column range but they’re too big).
BTW The blur node returns a Float3 which is why I use a Mask(R) node.
Edit: Ha ha, the line numbers made no sense because of word wrapping in Word. It looks like it is something to do with the blur node but I’m still trying to figure out what’s causing it.
As you can see, both lines are entering or adding a Texture2D to a float3. On the face it I can see why that could cause an error. However, what I don’t understand is why these two lines don’t cause an error in the first of the two cases in the images above, but do in the second. The difference between the two cases occurs after this blur node, and ostensibly the inputs to it are identical in both.
I’m sure it’s something simple but I’ve wasted so much time on it.
PS I did have the whole blur node’s HLSL code in here but it just wouldn’t let me post, even though I was within the character limit.
I’ve eliminated the first two errors - the vector truncation ones - by changing CurColour in the blur node’s custom node’s HLSL code from a float3 to a float4 (and changing the output to float4). However, I still get the other four errors.
It’s definitely something to do with the output from the SpiralBlur node, but I have no idea what the problem is.
Just saying, if this helps out! but when I received the error it was because I accidentally associated the material with Niagara sprites, thus changing it in usage properties.