phetsims / bending-light

"Bending Light" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/bending-light
GNU General Public License v3.0
8 stars 8 forks source link

WebGL Wave View is too Gray #367

Closed samreid closed 7 years ago

samreid commented 7 years ago

@kathy-phet said:

In the original simulation, you could see the reflected wave propogating in color in the wave view. I forget whether it was an explicit design decision to not have this any more - or if this is a new bug that the reflected wave is just gray.

image

I now suspect it is a new bug - because I just saw in the HTML screenshot on our website it isn't grey.

samreid commented 7 years ago

I think this is a WebGL bug, because running with ?webgl=false, I do not see this issue.

kathy-phet commented 7 years ago

Also, with webgl active, I see if I go all the way to glass --- to get a stronger reflected beam --- you can actually see that the moving wave form is there. It seems like their is a layering problem and the grey is on top, instead of perhaps on the bottom layer.

samreid commented 7 years ago

@ariel-phet would you like to review/prioritize/schedule this issue?

ariel-phet commented 7 years ago

Please note we were aware of this issue (it appears I made the call) https://github.com/phetsims/bending-light/issues/299

This is not a huge deal to me, since as you rotate the beam you can see the wave view fade in and out (as the reflected power goes up and down)

Although I agree the canvas behavior is preferable it seems since we have had no reports into phethelp of this being an issue, it is not high priority (people often write to us when a feature that was present in the Java version has changed and it was important to them)

Unless @kathy-phet feels strongly, I feel that we should defer any work on this bug until after CCK is into the QA phase. @samreid perhaps link this issue in CCK master checklist or such and unassign for now?

samreid commented 7 years ago

I put a reminder on my personal calendar for July 12, 2017.

samreid commented 7 years ago

By the way, I should mention that @jonathanolson would probably be great at solving this webgl problem, and I wouldn't mind if he worked on it instead of me.

jonathanolson commented 7 years ago

I saw that the color (in addition to the transparency) was being modified by the power level. I made a patch above that I believe improves the appearance (no gray), but is still slightly different than the CanvasNode approach (which may not be using just transparency).

@samreid and @kathy-phet, does this look correct?

jonathanolson commented 7 years ago

New WebGL: bending-webgl

Current Canvas: bending-canvas

samreid commented 7 years ago

The canvas node uses step functions for improved performance, the appearance in the WebGL version seems good to me. Would be great for @kathy-phet or possibly @ariel-phet to confirm.

kathy-phet commented 7 years ago

The new WebGL image above looks great! It's a big improvement in my opinion. I would favor re-release -- but in need of testing so just in the queue there somewhere lowish.

samreid commented 7 years ago

@jonathanolson will publish a maintenance release soon.

jonathanolson commented 7 years ago

Correct, 1.1.2 deployed with the fix.

samreid commented 7 years ago

In testing on iOS, I noticed #368, @mattpen is checking to see if this is a problem on iPad too.

samreid commented 7 years ago

Testing will need to be done in https://github.com/phetsims/tasks/issues/786

phet-steele commented 7 years ago

@samreid @jonathanolson this looks great! Thanks.