normal mapping shader

Problems building or running the engine, queries about how to use features etc.
slapin
Bronze Sponsor
Bronze Sponsor
Posts: 148
Joined: Fri May 23, 2025 5:04 pm
x 5

normal mapping shader

Post by slapin »

Hi, all!

Is there some template shader I could add to my fragment shaders to implement normal mapping?
I guess it should do something like

Code: Select all

gl_FragColor = ambient * diffuse *lightDiffuse * dot(lightDir, normal);

It would be too annoying to add that to all the shaders including the light direction bind, need some help from Ogre...

paroj
OGRE Team Member
OGRE Team Member
Posts: 2204
Joined: Sun Mar 30, 2014 2:51 pm
x 1188

Re: normal mapping shader

Post by paroj »

why not just use the RTSS?

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 148
Joined: Fri May 23, 2025 5:04 pm
x 5

Re: normal mapping shader

Post by slapin »

I would if I could. Need some example on how to use RTSS after a custom shader.

paroj
OGRE Team Member
OGRE Team Member
Posts: 2204
Joined: Sun Mar 30, 2014 2:51 pm
x 1188

Re: normal mapping shader

Post by paroj »

this describes how to add your custom shader into the RTSS:
https://ogrecave.github.io/ogre/api/lat ... extensions