Closed siro20 closed 8 years ago
This issue occurs with shaders set to medium or high. With shaders set to Low the problem doesn't exists, the grass is always visible.
I added the following code to NineTexture9_ctor:
if (Height > 0 && Width > 0 && Pool == D3DPOOL_DEFAULT && Format == D3DFMT_INTZ) {
unsigned blocksy;
unsigned stride;
D3DLOCKED_RECT locked_rect;
struct NineSurface9 *surface;
ERR("info->last_level = %d\n");
for (l = 0; l <= info->last_level; ++l) {
surface = This->surfaces[l];
stride = nine_format_get_stride(pf, u_minify(Width, l));
hr = NineSurface9_LockRect(surface, &locked_rect, NULL, D3DLOCK_DISCARD);
if (SUCCEEDED(hr)) {
blocksy = util_format_get_nblocksy(pf, u_minify(Height, l));
for (unsigned y = 0; y < blocksy; y++) {
memset(locked_rect.pBits, 0, stride);
locked_rect.pBits += locked_rect.Pitch;
}
NineSurface9_UnlockRect(surface);
}
}
}
which fixes the problem in Guild Wars 2 and the provided apitrace. Maybe this uncovers just an INTZ bug, where the depth texture isn't written as it should be and because of that the texture contains invalid values.
Tested with NV84 (Nvidia Geforce 8600GT 256MB vram) The problem still exists, so this is a nine bug.
Do you have a trace ?
trace is on FTP /minor_bugs/issue.139.GuildWars2/
Fixed by 4744770e64599604559b4812fdde512989923e55
The grass is visible as long as the mouse isn't touched. Once the mouse have been moved the grass is invisble until the game is reloaded.
Using WINE the grass is visible all the time. This can be reproduced using the apitrace.