http://bugs.freedesktop.org/show_bug.cgi?id=10686

           Summary: calculation of Bitmap's Fog color is incorrect
           Product: Mesa
           Version: CVS
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


If we enable fog when draw a bitmap, the fog color calculation is incorrect.

Root cause:
In func _swrast_Bitmap (swrast/s_bitmap.c), at Line 93 it calls 
_swrast_span_default_fog() which modify the fog coord value:
span->attrStart[FRAG_ATTRIB_FOGC][0]
      = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance);
So the fog coord state value becomes the fog factor.

Line 150, _swrast_Bitmap() calls--> _swrast_write_rgba_span(ctx, &span)
-->_swrast_fog_rgba_span(ctx, span) which calls macro FOG_LOOP(swrast/s_fog.c
L73).
In macro FOG_LOOP, it still use span->attrStart[FRAG_ATTRIB_FOGC][0] as the fog
coord which has been changed in _swrast_span_default_fog().

We should not call _swrast_span_default_fog to change the fog coord state
value, does it?


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to