Billboarding trees are not visible

Started by
32 comments, last by Hseptic 11 years, 9 months ago
Nevermind. I see what you mean.
Advertisement
I mean simply transforming (multiplying by your world-view-projection matrix) the trees without reorienting them to face the camera.
Ok I tried what you said, and now all I am getting is a black square situated about the center of the xz plane.
Does the debug runtime give you anything useful?

You can enable it in the DirectX properties panel (dxcpl.exe)
I still can't figure out how to enable it. What should I look for once I do though?
try setting this
HR(mFX->SetMatrix(mhWVP, &(mTreeWorld*mView*mProj)));

to
HR(mFX->SetMatrix(mhWVP, &(mView*mProj)));//not using tree world its in the vertex data
Since you've set the world matrix to the indentity matrix, it seems right the quad shows at the origin of the plane.

The fact that it's all black could indicate there's something wrong with the texture you have set. That's something the debug runtime could give you more insight on.

If you instead of sampling the texture, output some random color, does that get rendered correctly?

float4 AABillBoardPS(float2 tex0 : TEXCOORD0) : COLOR
{
return(float4(1.f, 0.f, 0.f, 1.f));
}
Now I am getting a red square. I still don't know how to enable or use debug runtime though.
Ok, I have tried re-enabled billboarding and now I can't see anything. Not even a red square. Something is still wrong. Again, I still don't know how to enable or use debug runtime.
It's in windrive:/Program Files/Microsoft DirectX SDK/Utilities/bin/dxcpl.exe -> Direct3D 9 tab -> 'Use Debug Version of Direct3D 9'.

Debug messages are printed in VS' output window.

This topic is closed to new replies.

Advertisement