Page 1 of 2

OSG shaders

Posted: 18 Feb 2016, 00:38
by scrawl
Yay, a new old feature!

Image

Image

Image

... object shaders (and thus normal maps / bump maps) are back! There are still some minor issues that need fixing (e.g. the glow effect on enchanted objects), other than that, works great... sadly the performance isn't as good as I'd hoped, but I should be able to improve it by tweaking the state graph. To be fair though, enabling shaders in the Ogre version also had a considerable FPS hit (about 40% it seems).

As always, the code is on my github if you want to give it a spin before it hits the masses.

Still to do before I make a pull request:
- minor FIXMEs
- terrain shaders
- improve performance

Re: OSG shaders

Posted: 18 Feb 2016, 02:08
by ElderTroll
More great news, Scrawl! Version 0.39 is going to be an exciting release.

Re: OSG shaders

Posted: 18 Feb 2016, 02:44
by Amenophis
Since Hrnchamd just started to introduce PBR into Morrowind engine, can I ask if OSG supports that feature?
http://forums.bethsoft.com/topic/158633 ... prototype/

Re: OSG shaders

Posted: 18 Feb 2016, 07:01
by lysol
Niiice! Been waiting for this. :)

Re: OSG shaders

Posted: 18 Feb 2016, 08:23
by raevol
Wow exciting!

Re: OSG shaders

Posted: 18 Feb 2016, 09:06
by Greendogo
Could someone link me to a good description of PBR and why we'd want it?

Re: OSG shaders

Posted: 18 Feb 2016, 09:39
by psi29a
Great work scrawl! :D
Amenophis wrote:Since Hrnchamd just started to introduce PBR into Morrowind engine, can I ask if OSG supports that feature?
http://forums.bethsoft.com/topic/158633 ... prototype/
I (and Hrndchamd) already answered this here:
viewtopic.php?f=2&t=3325&p=36995&hilit=Hrnchamd#p36995

@Greendogo, read the thread I posted above, it goes into all about PBR/Morrowind/OpenMW.

Re: OSG shaders

Posted: 18 Feb 2016, 09:48
by Chris
Greendogo wrote:Could someone link me to a good description of PBR and why we'd want it?
https://www.youtube.com/watch?v=S1A0YqdRhe4
Essentially, it's a way of modeling light that's physically accurate. It allows a method of authoring materials that works consistently in all lighting conditions, since it relies on actual physics like conservation of energy, fresnel effects, etc, and works with measurable real-world properties to get a believable result (which, again, works consistently in all lighting conditions).

Re: OSG shaders

Posted: 18 Feb 2016, 11:15
by Amenophis
psi29a wrote: I (and Hrndchamd) already answered this here:
viewtopic.php?f=2&t=3325&p=36995&hilit=Hrnchamd#p36995
Thank you!

Re: OSG shaders

Posted: 18 Feb 2016, 15:37
by scrawl
PBR is just a shader. In theory you should be able to plug it in with a new shader file, there wouldn't be any changes needed to the engine itself.