[0.15.x] Weird line artifacts in radar-world view
[0.15.x] Weird line artifacts in radar-world view
The lines are stationary, but they have the same "vibrating" effect as the rest of the radar screen.
It does not happen in non radar-world views.
It looks the same with and without vsync enabled.
The lines have been there since the first 0.15 release.
Spec:
OS: OS X 10.11.6
GPU: Intel Iris Pro 1536 MB
This is how it looks like (zoom in for better views):
Graphics settings:
It does not happen in non radar-world views.
It looks the same with and without vsync enabled.
The lines have been there since the first 0.15 release.
Spec:
OS: OS X 10.11.6
GPU: Intel Iris Pro 1536 MB
This is how it looks like (zoom in for better views):
Graphics settings:
Re: [0.15.x] Weird line artifacts in radar-world view
Turn off "wait for vsync" and try again? Looks like the grain overlay is causing this.
Re: [0.15.x] Weird line artifacts in radar-world view
Yes, that was my first guess too, but:
r0mai wrote: [...]
It looks the same with and without vsync enabled.
[...]
Re: [0.15.x] Weird line artifacts in radar-world view
We use this function for radar-view noise
return frac(sin(a * 12.9898 + b) * 43758.5453);
So I'd guess it is low precision 'sin' implementation inside Intel Iris or maybe bad tolerance for argument wrapped around 2*pi many times. Do those lines stay at the same place relatively to monitor edges when you scroll?
return frac(sin(a * 12.9898 + b) * 43758.5453);
So I'd guess it is low precision 'sin' implementation inside Intel Iris or maybe bad tolerance for argument wrapped around 2*pi many times. Do those lines stay at the same place relatively to monitor edges when you scroll?
Re: [0.15.x] Weird line artifacts in radar-world view
yes, they stay at the same place relative to the monitor edges regardless of where I move or zoom the camera.
Re: [0.15.x] Weird line artifacts in radar-world view
If that helps, I'm happy to compile and run some C++ code, to aid debugging this GPU.
Re: [0.15.x] Weird line artifacts in radar-world view
You can play with Factorio/data/core/graphics/shaders/zoom-to-world.glsl
Re: [0.15.x] Weird line artifacts in radar-world view
I played with it a bit. I reproduced the problem on a constant color background and timer uniform's value hardcoded. I used the following noise function:
The issue is clearly visible, if you increase the 50.0 constant to let's say 50000000.0 (at least on my GPU).
In other words it only happens if timer value is too large (in the millions range). A quick workaround could be to reduce the domain to let's say [0, 50000]:
I hope this helps.
Code: Select all
vec3 getnoise3(vec2 p)
{
return vec3(
0.0,
fract(sin(p.x + 50.0) * 10.0),
0.0
);
}
In other words it only happens if timer value is too large (in the millions range). A quick workaround could be to reduce the domain to let's say [0, 50000]:
Code: Select all
vec3 getnoise3(vec2 p)
{
return vec3(hash3(p.x, p.y, floor(mod(timer, 50000.0) / 3.)));
}
Re: [0.15.x] Weird line artifacts in radar-world view
Thanks, we'll check that Sorry for late reply with important thing, you can also start factorio with "--shader=runtime-reload" parameter - this way shaders will be reloaded with every frame, no need to restart the game. Though with directx version it will reload .cso, so you will have to run compile.bat after every attempt, or work directly with glsl version - it's reloaded by game from source without any intemediates. I.e. edit .glsl - hit Ctrl-S (or command-S probably in Mac), immediately see result. For that in case of windows start factorio with "--force-opengl" key, in case of mac/linux it's opengl anyway.
Re: [0.15.x] Weird line artifacts in radar-world view
I couldn't reproduce those lines in my GTX570M, but issue is clear - you had that being long into the game (big tick count) while I tested from the start. So if Intel decided to use half-precision for floats or something, that would lead to this kind of problems.
What if you use original shader code with a single change of
for noise function? if that solves the problem - we will put it this way into next release.
What if you use original shader code with a single change of
Code: Select all
return vec3(hash3(p.x, p.y, floor(mod(timer, 50000.0) / 3.)));
Re: [0.15.x] Weird line artifacts in radar-world view
Oh --shader=runtime-reload is good to know
What is timer equal to? Number of ticks since map start? Indeed the lines don't appear on a newly generated map.
What is timer equal to? Number of ticks since map start? Indeed the lines don't appear on a newly generated map.
Re: [0.15.x] Weird line artifacts in radar-world view
Yes, looks like a tick number (actually posila wrote this code)
Re: [0.15.x] Weird line artifacts in radar-world view
Should be fixed in 0.15.21
Re: [0.15.x] Weird line artifacts in radar-world view
Thanks, I don't see the lines anymore!