Why are you writing pixels with values greater than 0 but less than 255 to the colour buffer ?

If you explicitly set the semi transparent pixels to have an alpha of 1.0 or 255 in r3dshader, surely everything should work as expected?
Ian wrote:hy are you writing pixels with values greater than 0 but less than 255 to the colour buffer ?
If you explicitly set the semi transparent pixels to have an alpha of 1.0 or 255 in r3dshader, surely everything should work as expected?
Bart wrote:What's the deal with contour textures anyway? How is the threshold for blended alpha values that fall between 0 and 1 determined?
Copyright 2011-2018 by Bart Trzynadlowski, Nik Henson, Ian Curtis,
Harry Tuttle, and Spindizzi
Thanks for the inclusion, I really appreciate that.
Theorically it should be set by SetContourThreshold command (see DevGuide), but we don't know where this value is/should be stored.
Ian wrote:It's just set client side when processing the textures before they are sent to the hardware. So it won't appear in any culling node or whatever. The same as having a library processing textures before uploading them to opengl.
void __thiscall PRO_Texture::SetContourThreshold(PRO_Texture *this, __int32 a2)
{
__int32 v2; // eax@1
v2 = a2;
if ( a2 >= 1 )
{
if ( a2 > 254 )
v2 = 254;
*((_DWORD *)this + 15) = v2;
}
else
{
*((_DWORD *)this + 15) = 1;
}
}
unsigned __int16 __cdecl getPackedTexel5551(struct PRO_Texture *a1, __int32 a2)
{
return (unsigned __int8)(*(_BYTE *)(*((_DWORD *)a1 + 13) + a2) >> 3) | (unsigned __int16)(4
* ((unsigned __int8)(*(_BYTE *)(*((_DWORD *)a1 + 12) + a2) & 0xF8) | (unsigned __int16)(32 * ((unsigned __int8)(*(_BYTE *)(*((_DWORD *)a1 + 11) + a2) & 0xF8) | (unsigned __int16)(((unsigned int)*(_BYTE *)(*((_DWORD *)a1 + 14) + a2) < *((_DWORD *)a1 + 15)) << 8)))));
}
Users browsing this forum: No registered users and 1 guest