# 3D Scoreboard going on air saturday and I've got some issues.

This topic is 3085 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys, got a couple questions for you. We are finally rolling out our new rendering core that I've been working for a while. The old one was directx fpp, the new is totally HLSL based. Our app is essentially a realtime relative of after effects. We do the scoreboards and crawls for ESPN. I've got two MAJOR bugs to get done before sat. Going on air one way or the other, even if I have to hack back to FPP. The first is a occasional "flicker" on a few of the scoreboard elements. I've been using ID3DXEffectPool among our shaders. Disabling it has eliminated the flicker. Has anyone else had problems with the pool or with HLSL shaders flickering? The debug output gives no errors. I would hope a drawprim call would fail if the shader did something off; however, it does not. I've tried tracking this down in pix; however, its no help with this kind of issue. The other issue is with mip maps. Our graphic/text sprites all default to having mips turned off. If the sprite has mips then this gets triggered:
HRESULT CDX9Object::GenerateMipMap(IUnknown *pUnk)
{
IDirect3DTexture9 *ptex=(IDirect3DTexture9 *)pUnk;

D3DSURFACE_DESC desc;

ptex->GetLevelDesc(0,&desc);

HRESULT hr=S_OK;

if (desc.Usage & D3DUSAGE_AUTOGENMIPMAP)
{
hr=ptex->SetAutoGenFilterType(D3DTEXF_LINEAR);
ptex->GenerateMipSubLevels();
}
else
D3DXFilterTexture(ptex,NULL,0,D3DX_DEFAULT );

return hr;
}

This works with textures that are on our UI scene, but that is useless. When we are on air the is no UI scene running. We output via an AJA SDI card--so its an offscreen rendertarget that gets blt'ed. Anyone seen any odd behavior with gpu generated mip maps? Thanks in advance for any insight.

##### Share on other sites
Update:
Getting rid of the pool actually didn't help.
Its so intermittent that it just didn't happen when
we were looking.

Things I've tried:
* Getting rid of the zero matrix for textureless meshes.
[needed to fix obj's w/o texture coordinates, ohh well.]

* Changing the frequency of SetTechnique(...)

* Getting rid of all the "shared" declarations in my shaders
except for the lights.

* Forcing push/pop of our default texture address and transforms
[identity for the matrix, border for the texture address]

* Switching between Quadro and GeForce cards.

* Switching driver versions.

* Getting rid of all DrawIndexPrimitiveUP's for sprites.
[All using compiled vertex/index buffers now]

* Allowing ID3DXStateManager to set sampler and renderstates
after a lighting pass has started.

* Disabling Preshaders, toggled every possible compiler argument.

* Changing fxc.exe shader compiler version

Things left to try:
* Test on ATI
[Useless, we are an nVidia shop and trying to get them
to fix a driver bug is like yelling at a wall.]

* Change the frequency of Begin/BeginPass/EndPass/End
coupling begin/end around meshes causes horrible performance.
The command buffer can only handle so much at once.]

* ??? Running out of ideas. ???

The current [emergency] workaround is to drop back down to old style lighting.
This will get us through on Saturday and doesn't flash...

Any ideas?

##### Share on other sites
Update:

MIP Maps are working!
The UI thread draws a "dummy primitive" line strip offscreen to keep nVidia cards from flashing if no draw prim calls are made between begin/end scene.

I cache all states, transforms, etc, and post them when its time to draw a mesh
I either hand it down to fixed function, or programmable.

The dummy primitive was posting the mip sampler state, the AJA
is a render target so we don't draw the dummy. The the first frame
the scenegraph was setting up all the states, and the endpass was dumping them.