Announcement

Collapse
No announcement yet.

Mystery noise in uv

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Oops - attachment lost.

    Reattaching here.
    Attached Files

    Comment


    • #3
      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.

      Comment


      • #4
        [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.

        Comment


        • #5
          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.

          Comment


          • #6
            Originally Posted by Nitorami View Post
            With the mods as suggested, you'll get a definitive behaviour which does not depend on screen size neither on GPU.
            The mods as selected just reduce the sensitivity of the test.

            Originally Posted by Nitorami View Post
            With your orginal code, the appearance is very sensitive on screen size.
            Same here. Which is why I specified screen size.

            Originally Posted by Nitorami View Post
            There is not much point in making a screenshot, it would be rather random
            Not if you set the screen height, I suspect.

            Originally Posted by Nitorami View Post
            I do not know how to set a height of exactly 416 pixels.
            1) Press N to engage the monitor in top left
            2) Resize the window until the monitor says 416.0000

            Comment


            • #7
              416 lines
              Attached Files

              Comment


              • #8
                Belatedly, thanks.

                Comment


                • #9
                  Originally Posted by chrisjj View Post
                  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.
                  I also have a problem with the correct configuration of this.

                  Comment


                  • #10
                    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;
                    }

                    Comment


                    • #11
                      you most likely replied to a bot, serveral posts with nothing to say except , i also have this and nice post.
                      latest version of Winamp
                      DSP Plug V2.41
                      Language Packs

                      Comment


                      • #12
                        Agreed. I just wonder what they try to achieve without a link or some sort of other bait. Seems pointless to me

                        Comment

                        Working...
                        X
                        😀
                        🥰
                        🤢
                        😎
                        😡
                        👍
                        👎