RobiNERD Posted February 27, 2017 Share Posted February 27, 2017 Hey so I wanted to know how to decide a resolution to render to and then downscale the render; specifically get the user's screen width, *3 and then scale it down to /3 to get a subpixel effect, using 3 times more available pixels (also if probably causing artifacts). I don't even know if this method works so i would really know how to do this/a working method. Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted February 28, 2017 Share Posted February 28, 2017 There is engine.setHarwaresScalingLevel(0.333); But. the anti-aliasing quality does not worth it (still looks bad). The rendering cost is so high, If I switch this on with my UHD screen, it even hangs windows 10, no other program can do this If any post-processing is switched on, the default built-in MSAA in the browser switches off. (It only works if rendering directly to the frame buffer) This looks awful. The best would be somehow implement TAA (Temporal Anti Aliasing) https://threejs.org/examples/webgl_postprocessing_taa.html Three.js does it and looks really good with very little cost. I tried, but failed, I really don't know (yet) how to render the camera jittering by subpixels. Quote Link to comment Share on other sites More sharing options...
Kesshi Posted February 28, 2017 Share Posted February 28, 2017 It is possible to implement TAA with BabylonJs. I did it already. You can see it here: https://box.pcon-solutions.com/ For the jittering you have to generate your own camera projection matrix. I can't give you the source code of my implementation because this is a commercial project. Rendering a higher resolution and downsample it is very easy. Here is a playground: http://www.babylonjs-playground.com/#1DEDHH#0 In line 30 i create a postprocess which renders 4 times bigger. The other 2 postprocesses are used to downsample it. BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 28, 2017 Share Posted February 28, 2017 Hey @Kesshi, I would have love to get a PR on this one Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.