Page 1 of 1

please explain Ogre lighting model

Posted: Fri Jun 13, 2025 11:48 am
by slapin

Hi, all!
I still struggle with Ogre materials as on every stage I think I understand them something happens and I know I don't.
as I understand Ogre simulates fixed function pipeline without PBR support with only ambient/diffuse/specular/emission.
All of these depend on light source except for ambient (which still won't do what I want)...
I found the solution for debug materials but not skybox material.

Code: Select all

material Debug/Red
{
        technique
        {
                pass
                {
                        lighting off
                        depth_check on
                        depth_write on
                        depth_func always_pass
                        ambient 1.0 0.0 0.0 1.0
                        diffuse vertexcolour
                        specular 0.0 0.0 0.0 1.0
                        cull_software none
                        cull_hardware none
                }
        }
}

The above code generates red material which passes through everything only when I set vertex color to red.
any attempts in making diffuse or ambient work failed. Red texture image works too. But whatever colors I set in
the material script are ignored.
Also when I put this material on skybox, it displays black+yellow spots. Please help me understand.


Re: please explain Ogre lighting model

Posted: Fri Jun 13, 2025 11:58 am
by paroj

Re: please explain Ogre lighting model

Posted: Fri Jun 13, 2025 1:09 pm
by slapin

And a follow-up question - if I need my custom shader program, I have to implement it separately for each render system, right?
is there no unified shading language? No cross-language support?


Re: please explain Ogre lighting model

Posted: Fri Jun 13, 2025 1:24 pm
by paroj