Re: RFR: 8260013: Snapshot does not work for nodes in a subscene [v4]

2024-01-29 Thread Michael Strauß
On Mon, 29 Jan 2024 09:32:06 GMT, Lukasz Kostyra  wrote:

>> Originally this issue showed the problem of Node being incorrectly rendered 
>> (clipped) when snapshotting, compared to a snapshot of the whole Scene. 
>> Later on there was another problem added - lights not being taken into 
>> account if they are added to a SubScene.
>> 
>> As it later turned out, the original problem from this bug report is a 
>> problem with ParallelCamera incorrectly estimating near/far clipping planes, 
>> which just happened to reveal itself while snapshotting a Node. During 
>> testing I found out you can make the Node clip regardless of snapshot 
>> mechanism. Clipping issue was moved to a separate bug report and this PR 
>> only fixes the inconsistency in lights being gathered for a snapshot.
>> 
>> `Scene.doSnapshot()` was expanded to also check if SubScene provided to it 
>> is non-null and to fetch lights assigned to it. Scenario was tested with 
>> added SnapshotLightsTest.
>> 
>> Rest of the tests were checked and don't produce any noticeable regressions.
>
> Lukasz Kostyra has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Minor review adjustments

Looks good!

-

Marked as reviewed by mstrauss (Committer).

PR Review: https://git.openjdk.org/jfx/pull/1332#pullrequestreview-1850271783


Re: RFR: 8260013: Snapshot does not work for nodes in a subscene [v4]

2024-01-29 Thread Kevin Rushforth
On Mon, 29 Jan 2024 09:32:06 GMT, Lukasz Kostyra  wrote:

>> Originally this issue showed the problem of Node being incorrectly rendered 
>> (clipped) when snapshotting, compared to a snapshot of the whole Scene. 
>> Later on there was another problem added - lights not being taken into 
>> account if they are added to a SubScene.
>> 
>> As it later turned out, the original problem from this bug report is a 
>> problem with ParallelCamera incorrectly estimating near/far clipping planes, 
>> which just happened to reveal itself while snapshotting a Node. During 
>> testing I found out you can make the Node clip regardless of snapshot 
>> mechanism. Clipping issue was moved to a separate bug report and this PR 
>> only fixes the inconsistency in lights being gathered for a snapshot.
>> 
>> `Scene.doSnapshot()` was expanded to also check if SubScene provided to it 
>> is non-null and to fetch lights assigned to it. Scenario was tested with 
>> added SnapshotLightsTest.
>> 
>> Rest of the tests were checked and don't produce any noticeable regressions.
>
> Lukasz Kostyra has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Minor review adjustments

Marked as reviewed by kcr (Lead).

-

PR Review: https://git.openjdk.org/jfx/pull/1332#pullrequestreview-1849876151


Re: RFR: 8260013: Snapshot does not work for nodes in a subscene [v4]

2024-01-29 Thread Lukasz Kostyra
> Originally this issue showed the problem of Node being incorrectly rendered 
> (clipped) when snapshotting, compared to a snapshot of the whole Scene. Later 
> on there was another problem added - lights not being taken into account if 
> they are added to a SubScene.
> 
> As it later turned out, the original problem from this bug report is a 
> problem with ParallelCamera incorrectly estimating near/far clipping planes, 
> which just happened to reveal itself while snapshotting a Node. During 
> testing I found out you can make the Node clip regardless of snapshot 
> mechanism. Clipping issue was moved to a separate bug report and this PR only 
> fixes the inconsistency in lights being gathered for a snapshot.
> 
> `Scene.doSnapshot()` was expanded to also check if SubScene provided to it is 
> non-null and to fetch lights assigned to it. Scenario was tested with added 
> SnapshotLightsTest.
> 
> Rest of the tests were checked and don't produce any noticeable regressions.

Lukasz Kostyra has updated the pull request incrementally with one additional 
commit since the last revision:

  Minor review adjustments

-

Changes:
  - all: https://git.openjdk.org/jfx/pull/1332/files
  - new: https://git.openjdk.org/jfx/pull/1332/files/5259be87..f05e4415

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx=1332=03
 - incr: https://webrevs.openjdk.org/?repo=jfx=1332=02-03

  Stats: 20 lines in 2 files changed: 0 ins; 7 del; 13 mod
  Patch: https://git.openjdk.org/jfx/pull/1332.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1332/head:pull/1332

PR: https://git.openjdk.org/jfx/pull/1332