Hello!
I’ve been learning some HLSL and how to write it in Unreal but I’ve been running into an interesting situation with my materials.
The material displays some streaky artifacts during the animation and I can’t figure out where it’s coming from.
It seems like it’s not an issue with the Material node(from what I can tell) because it also happens when I preview the output of my custom HLSL before plugging it into the base color.
Does anyone have an idea of why this would be happening? This is a fresh 5.2 project.
Here are some screenshots and the code
float result = 0;
float pi = 3.14159;
for (int i = 0; i < nInstances; i++) {
float angle = (i / nInstances) * time * pi;
float2 pos = center + radius * float2(cos(angle), sin(angle));
result += length(pos - uv) < instanceSize;
}
return result;