Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088212

A rendering issue when the PerspectiveTransform effect enters the degenerate state

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx1.0
    • javafx

      Moving from internal bug database - #6663398 -

      Attached the test and screen-shot:

      1st tab(PerspectiveTransform), try to drag from top right to bottom left direction. When the mouse pointer pass the half of the way, the image was inverted as expected. But there is a part of image at the bottom left as you see in the screen-shot.

      -baechul

      The strange rendering you are seeing is due to the perspective entering a degenerate state where coordinates now "inside the quad" map to infinity and coordinates extending to infinity map to valid texture coordinates.

      If one wanted to be pedantic about it one might say that one should render any coordinate in the infinite plane whose coordinate mapping yields a valid texture coordinate, but the bounds of such a rendering would be the infinite plane. That's fun to toy with as a rendering concept, but not really useful in real-world 3D or perspective transformations. To wit, when I investigated this stuff within the context of adding a perspective drawImage to Java2D I discovered that the OGL pipeline would render nothing if the transform turned into one of these degenerate cases - it would only render if the quad was "well-behaved" for some mathematical definition of "well-behaved" that I'd have to go digging through old code to define - but suffice it to say that this "disjoint pieces of image" that you see there would not happen if the transform was so "well-behaved".

      I've been meaning to dig up that formula and add code to the PerspectiveTransform effect to NOP if the formula returned a degenerate assessment, but I haven't gotten around to it.

      Entry 1 bae-chul.kim [2008-02-14 19:53]

        1. decora.zip
          546 kB
        2. pic7.png
          pic7.png
          30 kB

            Unassigned Unassigned
            pmohan Praveen Mohan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: