phetsims / alpenglow

Experimental rasterization engine, by PhET Interactive Simulations
MIT License
9 stars 0 forks source link

Examine visual differences with RenderFromNode.showSim() #5

Open jonathanolson opened 11 months ago

jonathanolson commented 11 months ago

(Fairly difficult, it's unclear if this is the linear/radial gradients having an issue, RenderFromNode having an issue, or an internal other Alpenglow issue. Will require knowledge of color spaces and blending, since there might be a bad blend going on - possibly only on gradients with transparency)

There are some minor visual differences that I'm interested in. I am NOT interested in the rendering differences that are size-small (like the slight differences in rendering small lines or text), however I am interested in the gradient shifts (both linear and radial) that seem to happen when using RenderFromNode.showSim().

In Pendulum Lab, this is most noticeable on the ResetAllButton, but also visible on the gradient on the masses themselves.

To reproduce:

  1. Check out Scenery's 'vello' branch (at least at commit https://github.com/phetsims/scenery/commit/e7d846a69d80c34ea94f7f2238103a1e12c5880b, pull once it's checked out - I've merged main into it)
  2. Move font files into scenery/js/display/vello/ (talk to @jonathanolson)
  3. Open up Pendulum Lab, go to the first screen
  4. Run phet.alpenglow.RenderFromNode.showSim() in the console. It will display a Canvas OVER everything else with the alpenglow software-rendered image.
  5. To switch back and forth to see visual differences, select the Canvas in devtools, and toggle visibility on it (might need to add the CSS inline), like the following:
image

Alpenglow-rendered:

image

Scenery (SVG) rendered:

image

Alpenglow:

image

Scenery SVG:

image