this might be a bit newbie post, but I would like to be sure that I am doing everything right and I understand these two map types correctly.
Normal maps
- How are normal maps used in shader? Is it just a colour, which is taken from a prepared 2D sampler and according to the light direction, intensity of diffuse colour is calculated? If so and I am using directional light (sun), can I "bake" this "lit" directly into the textures (if I am not rotating these objects - e.g. terrain textures)? If I am rotating the terrain textures in 4 directions (0°, 90°, 180° and 270°) it won't work if it is baked, correct?
- How are normal maps usually created from a texture? Do you have any tips for certain tools? I know that Photoshop has functionality to create normal maps but it did not really work well for me.
- I am using atlas texture for terrain and the normal map of it would have the same UV coordinate as the atlas (in another sampler). Would it be worth to use 3D sampler or cube sampler in this case? Aka two "layers", in one would be the diffuse texture, in another would be the normal map. I hope it is understandable what I mean.
- How do displacement maps work with shaders? Is it in fragment or vertex shader calculated?
- Are there any examples of using displacement maps in Ogre?
- Is there anything needed geometry-wise to use displacement maps? Any changes required of the actual meshes?
- Is there a significant drop of performance when using displacement maps?
Thank you.