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

Mesh is not illuminated correctly with light color

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: openjfx16
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None

      Description

      Both Point and Spot light are not correctly applied to Mesh when number of faces is increased to more than 60.

      Following are steps to reproduce with Point light with existing source without the fix for JDK-8234920.

      1. Apply this patch current repo, to change the LightSample to use less number of quads. The diff may not apply after JDK-8234920 is integrated. The diff is small and can be done manually too.

      --- a/tests/performance/3DLighting/attenuation/LightingSample.java
      +++ b/tests/performance/3DLighting/attenuation/LightingSample.java
      @@ -69,8 +69,8 @@ public class LightingSample extends Application {
               var sphere = new Button("Sphere");
               sphere.setOnAction(e -> switchTo(environment.createSphere((int) subdivisionSlider.getValue())));

      - var quadSlider = new Slider(500, 10_000, 1000);
      - quadSlider.setMajorTickUnit(500);
      + var quadSlider = new Slider(10, 200, 60);
      + quadSlider.setMajorTickUnit(10);
               setupSlier(quadSlider);

               var quadLabel = new Label();

      2. Compile and run AttenLightingSample

      3. Turn on Magenta light and click Mesh button. Observe that light is proper. Check attached screenshot_1.

      4. Increase the number of quads to 70 and observe that light is not proper. Check attached screenshot_2.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nlisker Nir Lisker
              Reporter:
              arapte Ambarish Rapte
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: