[Bug 31260] Tomb Raider 4 Broken Lighting

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Sep 17 05:23:49 CDT 2016


https://bugs.winehq.org/show_bug.cgi?id=31260

--- Comment #25 from andy <andy86 at fastwebnet.it> ---
I found part of source code that probability generate error output in terminal:

> if (!(colorop == WINED3D_TOP_MODULATE
>         && colorarg1 == WINED3DTA_TEXTURE && colorarg2 == WINED3DTA_CURRENT
>         && alphaop == (tex_alpha ? WINED3D_TOP_SELECT_ARG1 : WINED3D_TOP_SELECT_ARG2)
>         && alphaarg1 == WINED3DTA_TEXTURE && alphaarg2 == WINED3DTA_CURRENT))
>     ERR("Unexpected texture stage state setup, returning D3DTBLEND_MODULATE - likely erroneous.\n");

and that source file have this comment:

>  /* Note about D3DRENDERSTATE_TEXTUREMAPBLEND implementation: most of values
>  for this state can be directly mapped to texture stage colorop and alphaop, but
>  D3DTBLEND_MODULATE is tricky: it uses alpha from texture when available and alpha
>  from diffuse otherwise. So changing the texture must be monitored in SetTexture to modify
>  alphaarg when needed.

>  Aliens vs Predator 1 depends on accurate D3DTBLEND_MODULATE emulation

>  Legacy texture blending (TEXTUREMAPBLEND) and texture stage states: directx6 docs state that
>  TEXTUREMAPBLEND is deprecated, yet can still be used. Games must not use both or results
>  are undefined. D3DTBLEND_MODULATE mode in particular is dependent on texture pixel format and
>  requires fixup of stage 0 texture states when texture changes, but this fixup can interfere
>  with games not using this deprecated state. So a flag 'legacyTextureBlending' has to be kept
>  in device - TRUE if the app is using TEXTUREMAPBLEND.

>  Tests show that setting TEXTUREMAPBLEND on native doesn't seem to change values returned by
>  GetTextureStageState and vice versa. Not so on Wine, but it is 'undefined' anyway so, probably, ok,
>  unless some broken game will be found that cares. */

i think this bug is right for this.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list