|
![]() |
#1 |
Junior Member
Join Date: May 2008
Posts: 6
|
Mystery noise in uv
Is there a Milkdrop 2 preset author who could try the attached test preset for me and post a screenshot of the result?
It's a blank preset with this one-line warp shader: ret = (uv.y*5000)%2 < 1; in a window 416 pixels high (as shown by the monitor at top right). Here, the output id this: ![]() (or a variant, depending on window height) continually changing, not a static pattern of unbroken horizontal lines as expected. |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: May 2008
Posts: 6
|
Oops - attachment lost.
Reattaching here. |
![]() |
![]() |
![]() |
#3 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
It depends a lot on the actual screensize, as you are getting moiré patterns.
To avoid this, don't use "5000" but the actual screen height in pixels like this: float k= 15; ret = (uv.y*texsize.y*k)%2 < 1; You can adjust the appearance by setting the value of k. It makes rather a difference whether it is a multiple of 2 or not. Note - the pattern is actually moving because of the line "warp = 0.01000" in the milk file. Unless you explicitly overwrite these distortion parameters (e.g. rot, warp, zoop, sx,sy,dx,dy) in your code (in the per frame or per vertex section), milkdrop takes the values from the .milk file. So you'll see a distortion effect but no corresponding code, which can be a bit confusing. |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: May 2008
Posts: 6
|
[QUOTE=Nitorami;3146604]It depends a lot on the actual screensize[quote]
I know. Hence my "(or a variant, depending on window height)". [QUOTE=Nitorami;3146604]It makes rather a difference whether it is a multiple of 2 or not./QUOTE] Sure does ![]() And I'm guessing that's not the only thing that makes a difference. E.g. GPU model. I'd be interested in seeing your screenshot for comparison. |
![]() |
![]() |
![]() |
#5 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
chrisjj
I have checked with nvidia and an AMD iGPU, there is no difference. I would be surprised if there was any, with such simple code. With the mods as suggested, you'll get a definitive behaviour which does not depend on screen size neither on GPU. With your orginal code, the appearance is very sensitive on screen size. Sometimes I get a picture similar as yours, sometimes the fine lines as you seem to expect. There is not much point in making a screenshot, it would be rather random, and I do not know how to set a height of exactly 416 pixels. |
![]() |
![]() |
![]() |
#6 | |||
Junior Member
Join Date: May 2008
Posts: 6
|
Quote:
Quote:
Quote:
1) Press N to engage the monitor in top left 2) Resize the window until the monitor says 416.0000 |
|||
![]() |
![]() |
![]() |
#7 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
416 lines
|
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: May 2008
Posts: 6
|
Belatedly, thanks.
|
![]() |
![]() |
![]() |
#9 | |
Junior Member
Join Date: Jul 2018
Posts: 4
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
What "problem" with which "configuration" ?
If you want a pattern of horizontal lines in 1 pixel distance: shader_body { ret = (uv_orig.y*texsize.y)%2 < 1; } |
![]() |
![]() |
![]() |
#11 |
FRISIAN
Join Date: Sep 2003
Location: in a house
Posts: 16,469
|
you most likely replied to a bot, serveral posts with nothing to say except , i also have this and nice post.
|
![]() |
![]() |
![]() |
#12 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
Agreed. I just wonder what they try to achieve without a link or some sort of other bait. Seems pointless to me
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|