[Piglit] GL_LIGHTING test

Michal Suchanek hramrach at centrum.cz
Tue Aug 17 01:15:38 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:
>>>>
>>>> On 12 August 2010 00:11, Brian Paul<brianp at vmware.com>    wrote:
>>>>>

>>>>
>>>> AFAICT the light source is in front of the object. If it were behind
>>>> the whole object would be dark.
>>>
>>> The light position is:
>>>
>>> GLfloat light_position[4] = { 0, 0, -(1.0 * radius * 2.3), 1 };
>>>
>>> Z is negative there and the modelview matrix is the identity when the
>>> glLight() call is made.
>>>
>>> With gallium drivers and the NVIDIA driver the object is dark (no diffuse
>>> contribution), as I would expect.
>>>
>>
>> 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).
>
>
How is it possible that on your system gallium llvmpipe lights objects
from the other side compared to the systems where I tested?

I tried both 32bit and 64bit, mesa release and git, swrast and
llvmpipe, r300, r600, i915 -  all light the demo on the same side.

Thanks

Michal


More information about the Piglit mailing list