Archive 17/01/2023.

PBR in WebGL (finally!)

godan

Yep, just got it working (test it out here):

Controls:

  • RMB to orbit
  • CTRL + RMB to zoom
  • SHIFT + RMB to pan

Also, this probably won’t run on mobile. Would be great to hear back about any issues on various browsers/platforms, though.

KonstantTom

Windows 7, FIrefox 53.0 (64-bit).
All works perfect! But FPS is very low.

godan

@KonstantTom what are your system specs?

KonstantTom

@godan I found the problem: it’s because Intel HD Graphics is default video card on my PC. After I force Firefox to use Nvidia GeForce, FPS become normal. :slight_smile:

Mike

Works great :slight_smile:
Controls are RMB instead of LMB.

johnnycable

Works good on my mac! Great job!
No way on ipad browser: it shows the scene, but doesn’t move.

godan

Well, I don’t think I’ve coded a touch version of the orbit cam, so it might actually be working fine! I will get on that :slight_smile:

Can you move the slider at all?

dragonCASTjosh

@godan Do you intend to merge these changes back into master. If not would you be willing to share your changes so PBR can be accessed on all platforms.

monkeyface

Very cool! Now all we need is realtime reflections.

godan

Like this?

dragonCASTjosh

I’d assume the reflection there are done by updating the reflection probe. If I get time id like to look into Screen Space Reflections but i have been very busy at the moment

monkeyface

That looks cool @godan !
Would you be able to get that into the Urho core or does it rely on your framework too much?

I would really like to use your cool shader stuff in a game but tbh I can’t really tell how it can be used outside the Iogram editor.

godan

@godan Do you intend to merge these changes back into master. If not would you be willing to share your changes so PBR can be accessed on all platforms.

Yes, I will definitely push the PBR changes back to the main repo. The changes are actually minimal and entirely in the shaders. The trick was finding them! Debugging webgl is such a pain :slight_smile:

As for the reflection probes, I’m still experimenting with them (also would like to hear more about your screen space reflection idea), but yes, I would be fine with pushing that back to Urho as well.

johnnycable

I was able to move the slider just once

Modanung

Nice progress!
Apart from an unresponsive script warning while loading it works fine here in Firefox 52.0.2 on 64-bit Linux Mint.

lexx

Works great (up-to-date chrome, w7 x64, amd 7870). All controls works.

dragonCASTjosh

Screen Space Reflections is a way to do real time reflections doing reflection traces as a screen space effect. There are many ways of doing it but the best i found was probably frostbites approach found here.

Pros:

  • good performance compared to other solutions(planar, realtime cubemaps)
  • high quality results
  • intergrates well with PBR (e.g per pixel roughness)

Cons:

  • only reflects what is vissible
  • sometimes color diffrances between SSR and Cubemaps causes distracting reflections
Lumak

Isn’t this similar to how light probes work? Looking forward to your release.