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

Mesh is not illuminated correctly with light color

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx16
    • javafx
    • None

      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.

        1. screenshot_1.png
          73 kB
          Ambarish Rapte
        2. screenshot_2.png
          64 kB
          Ambarish Rapte

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

              Created:
              Updated: