Looking for a more complex demo using shaders

I’m looking for a more complex demo that uses shaders and does parallax mapping and specular mapping. This demos would support 3 lights:

ambient light - determines the color of shadows and unlit visible areas
side light - a light given by a vector and a color that is used to light the sides of an object passed as a parameter to the shader
main light - the strongest light also passed as a parameter

Texture channels:

color map -
normal map -
specular map -

Has anyone done something like this you could share? This would be a huge help.

Found what looks to be an excellent shader resource site:


I should be able to use one of these and work out a good demo, probably.

Thats a nice link should probably look into how the custom shaders are generated.

Did you see this?


I posted a while back about using the new shader generator- I think I have most of the effects of the site you linked to. normal, gloss, bloom, and combos of the these.

I haven’t done the car-paint one- I’m not sure it can be done with the current state of the automatic shader generator, you’d probably have to write your own.

The car paint one seems to be similar to the ‘x-ray’ shader that changes the transparency of the texture based on how aligned the normal is to the line of sight from the camera- thus looking straight on produces transparency while the more tangental areas are have full opacity. The dude in the link has an interesting solution by rendering ‘view point gradient’ then subtracting it from the final render. I assume you could also multiply it to the final render to get the x-ray effect. You could get two very cool effects for the price of one!

It seems like this would be an excellent addition to the automatic shader generator Josh has been building.

Thats a very interesting demo. My problem with using per pixel lighting and more sophisticated techniques is with the lights. Most shaders only support one light which makes scenes very dark and unnatural. To have more natural scenes we need at least one extra ambient light (or support for lightmaps) that works as the fill light for dark areas and at least two more lights. If it can calculate those lights in a single pass then it’s a great speed advantage for older cards.

The OGRE wiki has a shader that does 3 lights in a single pass with normal mapping but nothing else:
ogre3d.org/wiki/index.php/Pe … ighting_II