On Tue, 12 Jan 2021 00:31:54 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Nir Lisker has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update to the gl pipeline > > The updated API looks fine, with a few wording suggestions. I haven't looked > at the updated shaders yet. > > I have a few general comments and I left a few inline. > > 1. It's too late for JavaFX 16, so you will need to update the `@since` tags > to 17 and the fixVersion of both the Enhancement request and the CSR in JBS > to openjfx17. > > 2. I see you renamed the `setPointLight` method in the Prism pipelines to > `setLight` and got rid of the separate `setSpotLight` method. Have you > considered whether this will still make sense when adding a DirectionalLight? > Maybe leaving the name as `setPointLight` is best? > > 3. I get the following error when trying to run any 3D program on Mac, such > as the "3D Box" sample in Ensemble8: > > Shader compile log: ERROR: 0:314: '==' does not operate on 'float' and 'int' > ERROR: 0:314: '==' does not operate on 'float' and 'int' > ERROR: 0:315: Expression in 'return' statement must match return type of > function (and no available implicit conversion) > ERROR: 0:319: '!=' does not operate on 'float' and 'int' > ERROR: 0:320: No matching function for call to clamp(float, int, int) > ERROR: 0:322: '>=' does not operate on 'float' and 'int' > ERROR: 0:326: '!=' does not operate on 'float' and 'int' > ERROR: 0:329: No matching function for call to clamp(float, int, int) > ERROR: 0:331: '==' does not operate on 'float' and 'int' > ERROR: 0:332: Expression in 'return' statement must match return type of > function (and no available implicit conversion) > ERROR: 0:336: '>=' does not operate on 'float' and 'int' > ERROR: 0:342: '!=' does not operate on 'float' and 'int' > ERROR: 0:343: No matching function for call to clamp(float, int, int) > ERROR: 0:345: '>=' does not operate on 'float' and 'int' > > java.lang.RuntimeException: Error creating fragment shader > at > javafx.graphics/com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:141) > at > javafx.graphics/com.sun.prism.es2.ES2PhongShader.getShader(ES2PhongShader.java:177) > at > javafx.graphics/com.sun.prism.es2.ES2Context.getPhongShader(ES2Context.java:142) > at > javafx.graphics/com.sun.prism.es2.ES2Context.renderMeshView(ES2Context.java:474) > at > javafx.graphics/com.sun.prism.es2.ES2MeshView.render(ES2MeshView.java:123) > at > javafx.graphics/com.sun.javafx.sg.prism.NGShape3D.renderMeshView(NGShape3D.java:204) > ... > at > javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) > at java.base/java.lang.Thread.run(Thread.java:832) I forgot to mention that I edited the topmost comment to include another API discussion point about using the rotation of the node as the direction of the light. We might also need to be careful about a (0, 0, 0) direction since it's not normalizable. ------------- PR: https://git.openjdk.java.net/jfx/pull/334