Topic: Parallax Shader

Okay I found a glsl parallax shader for free. And was wondering how I would implement it. I know for the most part how shaders are applied but I don't know how to implement it correctly. A parallax shader usually uses a black and white map (Or alpha) for the effect. But setting a map for it to use would work. I would be happy to link it too you if you like. I don't know if using parallax is even feasible with this engine yet but I just wanted to see if it was possible. Thanks in advance.

Re: Parallax Shader

Hi,
I don't know exactly how parallax works, but it should work on Maratis as you can apply custom glsl shaders,
do you have a link to the free shader you speak about ?

Re: Parallax Shader

there is a very good parallax shader article on the Unity3d website wink

http://unity3d.com/support/documentatio … ffuse.html

but as say in the article, parallax shader is "on the more expensive rendering side" ... we can make a game with very good graphism only with diffuse/normal/specular/shadow map wink

Re: Parallax Shader

Here is the link.
http://en.wikibooks.org/wiki/GLSL_Progr … y_Surfaces

The article also explains how it works.

I thought it could be done but I'm not sure how to implement it, how would I set the alpha map or would it automatically use the alpha on the diffuse texture. Yeah I know that parallax is expensive but like some other techniques you use them in only some places and not everywhere and parallax is still less costly than drawing all of those polygons.

Re: Parallax Shader

The article you linked is showing how to do normal mapping (bump), but not parallax,
parallax is a additional pass that uses a displace map to offset the texture, it can be done in different ways,
you can add the displace map as a alpha component in the normal map texture, or use a separate texture.

This example uses glsl, the shader can probably be adapted :
http://www.dhpoware.com/demos/glslParal … pping.html

Re: Parallax Shader

Found this about steep parallax mapping :

http://graphics.cs.brown.edu/games/Stee … index.html

They give the code of a basic steep parallax shader at the bottom of the page, hope it can be adapted cause
it looks sooo damn good

Re: Parallax Shader

There is nothing preventing you from applying parallax shader in Maratis.
With Maratis shader based pipeline it all comes down to your graphics cards capability's.

We should probably go hunt down free shaders and drop them in Maratis to build up a collection.

Re: Parallax Shader

Wish it was that simple =p
http://forum.maratis3d.com/viewtopic.php?id=169

Re: Parallax Shader

Vegas wrote:

Wish it was that simple =p
http://forum.maratis3d.com/viewtopic.php?id=169

Well I don't literally mean just drop them in. As anael said there are some
modifications that may need to be made.

My point was that with Maratis shader based pipeline you imagination
is only limited by your hardware's capability's.

Look for GLSL 4.0 based shaders.

Here is a really good book on OpenGL 4 and Shaders
http://www.packtpub.com/opengl-4-0-shad … kbook/book

https://www.packtpub.com/sites/default/files/imagecache/productview/4767_OpenGL%204.0%20Shading%20Language%20Cookbook.jpg

Last edited by zester (2012-01-16 21:23:41)