[Piglit] GL_LIGHTING test

Michal Suchanek hramrach at centrum.cz
Thu Aug 12 08:06:05 PDT 2010

On 12 August 2010 15:54, Brian Paul <brianp at vmware.com> wrote:
> On 08/12/2010 07:38 AM, Michal Suchanek wrote:
>> On 12 August 2010 15:12, Brian Paul<brianp at vmware.com>  wrote:
>>> On 08/12/2010 05:18 AM, Michal Suchanek wrote:

>> With any driver the object is dark when the light is placed in the
>> positive z subspace.
> Hmmm, I changed the light position to be +Z:
> GLfloat light_position[4] = { 0, 0, +(1.0 * radius * 2.3), 1 };
> and the sphere is now brightly lit (NVIDIA, gallium softpipe & llvmpipe).
>> The difference in rendering between swrast and llvmpipe is quite
>> subtle.
>> The object is lit with either driver but the bright area is
>> slightly larger with llvmpipe and the gradient steeper around it than
>> with swrast.
> They look distictly different here when I compare here.  See attached pics
> (with negative Z light position).

Yes, the bright picture is what I get from swrast (with negative light
z position) and is likely the correct gradient.

However, llvmpipe and r600 gets the gradient wrong.

As to on what side of the sphere the gradient should be painted I am
not sure. I certainly find the requirement that the light has negative
z position odd but then there might be something with the view
geometry causing this.

>> There are two lighting results and which is correct is disputable. The
>> one produced by r300/swrast/Intel looks more natural to me than the
>> one produced by r600/r600g/llvmpipe but the scene is obviously
>> artifical so I can't judge unless I looked up some specs on the
>> lighting.
> I'm inclined to think that the gallium and NVIDIA drivers are correct in
> this case.

Have you tried gallium llvmpipe current git ?

For me it paints the light on the same side of the sphere as 7.8.2 swrast.

I am inclined to believe these that this is correct as somebody would
notice if everything was lit from the other side with mesa. It works
the same way with r300 and Intel drivers of 7.8.2 as well.



More information about the Piglit mailing list