Jump to content

Webgl 2 Shadows


Sebavan
 Share

Recommended Posts

Hello,

Thanks to Webgl 2, we have been able to introduce two new kind of shadows: PCF (improved version of poisson sampling) and PCSS (contact hardening shadows). They are only available on Webgl 2 and will fallback to poisson sampling on other devices.

Here is a quick shot at how contact hardening tries to simulate real life by getting softer when the blocker is further away from the receiver: https://playground.babylonjs.com/#ZT8BKT#2

And a real use in a scene with self shadows: https://www.babylonjs-playground.com/#EYEPRI#3

As usual, the doc have been upgraded: https://doc.babylonjs.com/babylon101/shadows#percentage-closer-filtering-webgl2-only

And to properly setup self shadow: https://doc.babylonjs.com/babylon101/shadows#self-shadow

Hope you ll enjoy it.

Link to comment
Share on other sites

@Sebavan Thanks for great work.

Tested example with helmet  on my mac mini, have 60 FPS on Safari but thats Webgl1, but on chrome and firefox (webgl2) get 4 fps. 

Expected? Hardware issue?

Device: 

Graphic: Intel Iris 1536 MB

CPU: 3 GHz Intel Core i7

Memory: 16 GB 1600 MHz DDR3

 

Browsers:

Chrome:  65.0.3325.162 

Firefox Quantum : 59.0.1

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...