-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aliased resistor bands #139
Comments
@jonathanolson I think these are rendered with |
Here's a note about detecting aa capabilities: |
@jonathanolson tried gl.SAMPLES on his chrome and got a result of |
@jonathanolson ran gl.SAMPLES on iPad2 and got back a value of 0, which means that AA is not supported by WebGL on iPad2. |
We investigated supersampling by setting a backing scale of 2.0. This makes the rectangles look beautiful, but it doubles the WebGL memory usage. Will this crash the sim earlier, or exacerbate #141? Possibly, or perhaps the graphics memory is separate from the JS heap memory and hence OK to go a bit higher. The easiest thing to do would be to leave this aliased on platforms that don't support WebGL antialias out of the box (like iPad2)--it doesn't seem like a pedagogical issue at all (to me). @arouinfar thoughts? |
@arouinfar said it would be good to not introduce new memory issues. @jonathanolson said there is a way to implement our own antialiasing for iPad2 that could take around 8 hours to implement (by reducing alpha near the edges). @arouinfar said she wasn't sure that would be warranted. @kathy-phet what do you recommend? |
@samreid @kathy-phet @arouinfar @jonathanolson It might be worth it to point out that there is significant aliasing on these components during rotation as well, so the custom AA would probably fix it all, right?: |
If this is correct, then I'm more inclined to say custom AA is worth the time expenditure. Still think it would be good for @kathy-phet to take a look. |
The strategy @jonathanolson indicated in #139 (comment) would only work for rectangles and drawn shapes, not for images. We may wish to investigate the 2x backing scale and try to solve the memory issues. |
@jonathanolson committed the 2x backing scale above. |
Here's a dev version for testing: @phet-steele and @arouinfar can you take a look? If it is too crashy, we can hopefully look into saving memory elsewhere. |
@samreid I do not think this makes performance any better or worse. The components do look crisper though! It may just be my imagination, but maybe:
@arouinfar is pleased with the new version. |
iPad2 on local wifi refreshing dev.155 (in seconds) dev.154 (aliased) There is some variability, but dev.155 doesn't seem significantly worse, closing. |
Similar in appearance to #111, the resistor bands are heavily aliased when rotated on an iPad 2 and Firefox.
Seen on macOS 10.12.6 FF and iOS 9.3.5. For phetsims/qa/issues/33.
URL: http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.153/circuit-construction-kit-dc_en.html
Version: 1.0.0-dev.153 2017-08-12 02:34:08 UTC
Features missing: touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0
Language: en-US
Window: 1920x1009
Pixel Ratio: 2/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0
Vendor: Mozilla (Mozilla)
Vertex: attribs: 16 varying: 16 uniform: 1024
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16)
Max viewport: 16384x16384
OES_texture_float: true
Dependencies JSON: {"assert":{"sha":"928741cf","branch":"master"},"axon":{"sha":"2545ad65","branch":"master"},"babel":{"sha":"9fc5cbec","branch":"master"},"brand":{"sha":"90738131","branch":"master"},"chipper":{"sha":"3042728b","branch":"master"},"circuit-construction-kit-common":{"sha":"5c1826cb","branch":"master"},"circuit-construction-kit-dc":{"sha":"5da7fd82","branch":"master"},"dot":{"sha":"f7d9de8b","branch":"master"},"joist":{"sha":"e3c3c82f","branch":"master"},"kite":{"sha":"dc5c4382","branch":"master"},"phet-core":{"sha":"6bfeef5c","branch":"master"},"phetcommon":{"sha":"7ec5d299","branch":"master"},"query-string-machine":{"sha":"c74e454e","branch":"master"},"scenery":{"sha":"7414c4fa","branch":"master"},"scenery-phet":{"sha":"7bdef2ee","branch":"master"},"sherpa":{"sha":"be8e800b","branch":"master"},"sun":{"sha":"b5554519","branch":"master"},"tandem":{"sha":"74233a04","branch":"master"},"twixt":{"sha":"3ca102d0","branch":"master"}}
The text was updated successfully, but these errors were encountered: