Just one shader or combination of shaders?
This was a very interesting read:
http://www.marmoset.co/toolbag/learn/pbr-practice
http://www.codinglabs.net/article_physi ... ering.aspx
OSG shaders
- psi29a
- Posts: 5361
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: OSG shaders
Managed to dig out PeterBitt's old normal maps from my hard drive, looks nice. If I remember correctly, these were auto-generated with Photoshop.
A feature that was requested before, but never implemented in the Ogre version (due to Ogre's resource queries being too slow), is having the game automatically use normal maps when they have an appropriate file name. This is now implemented. For example, for the color texture foo.dds, the game will automatically use foo_n.dds as a normal map (if it exists). The benefit is that you don't have to go around modifying (and distributing) all the .nif files / mesh files. To use this feature, you'll need to enable the following in settings.cfg:
Specular maps are now supported again, but I couldn't find any textures to showcase this.
Terrain shaders are done, also supporting normal maps and specular maps.
All that's left to do is to update the wiki documentation on how to actually use these features.
A feature that was requested before, but never implemented in the Ogre version (due to Ogre's resource queries being too slow), is having the game automatically use normal maps when they have an appropriate file name. This is now implemented. For example, for the color texture foo.dds, the game will automatically use foo_n.dds as a normal map (if it exists). The benefit is that you don't have to go around modifying (and distributing) all the .nif files / mesh files. To use this feature, you'll need to enable the following in settings.cfg:
Code: Select all
auto use terrain normal maps = true
auto use terrain specular maps = true
auto use object normal maps = true
auto use object specular maps = true
normal map pattern = _n
specular map pattern = _spec
Terrain shaders are done, also supporting normal maps and specular maps.
All that's left to do is to update the wiki documentation on how to actually use these features.
- psi29a
- Posts: 5361
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: OSG shaders
awesome work!
under what sections do these settings go? can they by default be on/set instead of having to turn them on?
under what sections do these settings go? can they by default be on/set instead of having to turn them on?
Re: OSG shaders
Excited to try this!
Re: OSG shaders
See the wiki that I just wrote:under what sections do these settings go? can they by default be on/set instead of having to turn them on?
These settings are not enabled by default, to prevent incompatibilities with mods that may be inadvertently using these naming schemes.
- ElderTroll
- Posts: 499
- Joined: 25 Jan 2012, 07:01
Re: OSG shaders
Great! I saw on the trello board that terrain shaders are done.
Re: OSG shaders
Wouldn't it be better to just have one option for automatically using these, if that? As more mods start to make use of auto normal/specular maps, it's unlikely the _n or _spec patterns can really be changed, and having more generic options to control terrain or object normal/specular maps (regardless if it's automatic or defined in the game data) would work just as well.scrawl wrote:Code: Select all
auto use terrain normal maps = true auto use terrain specular maps = true auto use object normal maps = true auto use object specular maps = true normal map pattern = _n specular map pattern = _spec
These settings are not enabled by default, to prevent incompatibilities with mods that may be inadvertently using these naming schemes.
- psi29a
- Posts: 5361
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: OSG shaders
Scrawl, I read this:
OpenGL 2
OpenGL 3
Vulkan?
And/or would this be something to be auto-detected for best performance?
In the 'future' will this mean that we can select either in game or in the launcher with which spec to render against?Currently shaders have a moderate performance impact, which is to be expected with a hybrid FFP/shader OpenGL2 renderer. Using OpenGL3 features (e.g. UBOs) in place of fixed-function state could mitigate this, but is not in my near future plans. Rather than OpenGL3 it might be a better idea to make the leap to Vulkan instead (which is further off in the future).
OpenGL 2
OpenGL 3
Vulkan?
And/or would this be something to be auto-detected for best performance?
Re: OSG shaders
Now that shaders are implemented, folk like hrndchamd should now have everything they need to bring PBR to OpenMW.scrawl wrote: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.
I hope there's an interest in doing so, very exciting times ahead.