Shaders in Ogre

Shaders and Compositors are changing in the most recent versions of Ogre. Check the Ogre forums and docs in the latest 2.0 and 2.1 versions for new information. 2.1 is especially different with the addition of the HLMS system. I also read that there are plans to add HLMS to 1.9.

http://www.ogre3d.org/tikiwiki/tiki-index.php?page=JaJDoo+Shader+Guide

Good tutorial about HLSL and shaders in Ogre

http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Shaders&structure=Cookbook

Snippets about using shaders in Ogre

http://www.ogre3d.org/tikiwiki/tiki-index.php?page=HLSL&structure=Cookbook

Notes about using HLSL in Ogre

http://rbwhitaker.wikidot.com/intro-to-shaders

An explanation of the graphics pipeline

http://www.robg3d.com/shaders.html

Example shaders in Ogre

http://www.packtpub.com/article/ogre-3d-fixed-function-pipeline-and-shaders

Shaders in Ogre

DX10 Note:

chincillya wrote:

One thing I have been wondering about...

Since DX 10 has no fixed function pipeline, does this mean that my OGRE app (which does not use any shaders at this point) won't work with the DX 10 render system? Or does OGRE "simulate" fixed functionality by creating shaders on the run and passing these to the GPU?

OGRE "simulate" fixed functionality by creating shaders on the run and passing these to the GPU.

DX11 note :

If you get this error when running your Ogre app -

OGRE EXCEPTION(3:RenderingAPIException): D3D11 device can't create shader resource view.

Error Description:invalid parameters were passed.

Just make sure you're targeting the correct shader model with the correct rendering system. If you're targeting multiple Render Systems, then make sure you define unified definitions in your .material file so Ogre can pick the correct version for the render system you are running. Also, if targeting DX10 or DX11, make sure to change you're semantics to follow the SV_* format. Read here - http://msdn.microsoft.com/en-us/library/windows/desktop/bb509647(v=vs.85).aspx