Re: [info-performer] PFB format and mipmapping filter

Date view Thread view Subject view Author view

From: Juergen Gotschlich (juergen.gotschlich++at++dlr.de)
Date: 11/18/2003 08:39:07


Hello Paolo,

sorry for the delay answering your detailed error analysis. Thank you
very much !!!!!!!!!!
You're completely right! And I wouldn't ever have found that answer.

Thanks alot again

J|rgen

Paolo Farinelli wrote:

> Hi J|rgen,
>
> I think I found the origin of your problem.
>
> 1. Examining the differences in the two .pfa files you sent me, I can
> see that
> the texture e009n52-2-1-8.pfi has indeed been saved with different
> minification filter (mag filters are identical).
>
> On Indigo, minfilter is set to 0x2010 (PFTEX_LINEAR | PFTEX_MIPMAP)
> while on Onyx, it is set to 0x8010 (PFTEX_TRILINEAR | PFTEX_MIPMAP)
>
> 2. If you look at the source for the dwb loader in
> /usr/share/Performer/src/lib/libpfdb/libpfdwb/pfdwb.c, you will see
> the
> following in function getDwbTexture:
>
> ...
> switch ((int) ((double) tex->tex.minfilter))
> {
> case DWB_TX_POINT: minf = PFTEX_POINT; break;
> case DWB_TX_BILINEAR: minf = PFTEX_BILINEAR; break;
> case DWB_TX_BICUBIC: minf = PFTEX_BICUBIC; break;
> case DWB_TX_MIPMAP_POINT: minf = PFTEX_MIPMAP_POINT; break;
>
> case DWB_TX_MIPMAP_LINEAR:
> if (GfxType & GFX_REALITY)
> minf = PFTEX_MIPMAP_TRILINEAR;
> else
> minf = PFTEX_MIPMAP_LINEAR;
> break;
>
> case DWB_TX_MIPMAP_BILINEAR:
> if (GfxType & GFX_REALITY)
> minf = PFTEX_MIPMAP_TRILINEAR;
> else
> minf = PFTEX_MIPMAP_BILINEAR;
> break;
>
> case DWB_TX_MIPMAP_TRILINEAR: minf = PFTEX_MIPMAP_TRILINEAR; break;
>
> default:
> fprintf (stderr, "LoadDwb: Unknown minFilter for %s\n", tex->name);
> minf = PFTEX_BILINEAR;
> break;
> }
> ...
>
> 3. The value of GfxType is set somewhere else, like this:
>
> GfxType = 0;
> pfQueryFeature (PFQFTR_TEXTURE_SHARPEN, &sharpen);
> pfQueryFeature (PFQFTR_MULTISAMPLE, &multisample);
> if (sharpen) GfxType |= GFX_REALITY;
> if (multisample) GfxType |= GFX_MULTISAMPLE;
>
>
> CONCLUSION:
>
> The original minification filter specified in your .dwb file is
> DWB_TX_MIPMAP_BILINEAR and *NOT* DWB_TX_MIPMAP_TRILINEAR.
> This means that the .pfa saved by the Indigo is actually the correct
> one (ie it uses
> exactly the minfilter specified in the .dwb file).
> On Onyx systems however, the dwb loader replaces the requested
> MIPMAP_BILINEAR filter with a MIPMAP_TRILINEAR filter.
>
> So, if you want a MIPMAP_TRILINEAR minfilter on both platforms, you need
> to explicitely request a DWB_TX_MIPMAP_TRILINEAR minfilter in your
> .dwb file.
>
> Hope this solves your problem.
> Let me know if you need further assistance.
>
> Best Regards,
> Paolo
>
>
>
>
> Juergen Gotschlich wrote:
>
>> Hi Paolo,
>>
>> here are the two pfa-files and the original dwb.
>>
>> 1.
>> (INDIGO) > pfconv -M pfb,2,1 e009n52-2-1-8.dwb
>> e009n52-2-1-8-indigo.pfa
>>
>> 2.
>> (ONYX) > pfconv -M pfb,2,1 e009n52-2-1-8.dwb e009n52-2-1-8-onyx.pfa
>>
>> I cannot interpret the difference in the pfa-files.
>>
>> thanks, J|rgen
>
>


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Nov 21 2003 - 13:00:03 PST