How to enable per pixel shading in Ogre3d

700 Views Asked by At

enter image description here

I am lighting a plane with a spot light in Ogre3D. However, the edge on the hotspot shows zigzag effect. It looks like the shading on the plane is done at every vertex without any interpolation.

The wireframe rendering result is shown below: enter image description here

How can I enable per-pixel lighting in Ogre3D, which can smooth out the hotspot's boundary?

1

There are 1 best solutions below

0
Philip Allgaier On

In the current Ogre versions (so below 2.0), there are two options:

  1. Manually create a Cg/HLSL/GLSL shader and use it in the material for the ground plane.

  2. Use Ogre's RTSS (Real-Time Shading System). Its architecture and usage is explained in this wiki article.