Questions on shaders and which maps to use

So I’ve been trying to work with pixel shaders for the 3D portion of my game, and I’m just not seeing the graphical improvements I thought I’d see.

I got basically a “normal map” shader working, but it really doesn’t seem to improve the look of my walls much, if at all. For these textures, I also have an AO and a height map. My question is, do I need to use the height map too? I thought a normal map would be in place of a height map, not in addition to. And then do I need to roll in the ao? Basically the walls still look “flat” when looked at from an angle, even though I seem to have the shader working and have a normal map applied.

A heighmap is typically used in parallax mapping or such things - or it can be used to generate a normal map from it.

A normal map is what the shader would use to do normal mapping - along with proper tangent/binormal values in the vertexdata during light calculations. Normal Mapping has it’s limitation depending of angle of the directional light and viewing angle - at some combinations of those you’ll see no difference. It’s basically just a per pixel lighting calculation by using the above informations instead of the faces global normal information.

Parallax Mapping will actually “translate” surface data depending on heighmap information to simulate “substance” of an texture - it still has its odds, but normally works well enough in many circumstances.

parallax mapping (texture displacement) and normal map (light calculcation) normally come together and are not interchangeable, as they do different things.

AO is just AO … a baked texture you may apply to dampen light on a pixel - and of course will only fit for a single model which and not correlate with other things in the scene (for that you could do SSAO or something like that, but that may be a bit complex for a beginner.

You could also aim for tesselation and use the heighmap to displace actual vertex data … but that’s even more complex to do and taxing in performance :slight_smile:

Awesome, thank you for the detailed answer! So I think I probably have the normal mapping working correctly then. It does look better from some angles but not all. I have displacement maps for many of my textures - could you perhaps point me to a guide / tutorial or example of a displacement / parallax map shader?

It’s been a while since I gathered information about Parallax Mapping, I just remember that there was some good readups but was for OpenGL - it’s not overly complex so it’s not too hard to reassemble everything into HLSL shader. So unfortunately I can only recommend you to your favourite search engine.

Ok, I will go googling, thank you!