Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Blaster

Difference between SW and HW vertex processing

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a GeForce2 MX 400 and I''m using DirectX 8.1. The SW and HW vertex processing are not giving the same results. In SW, the point sprites are working correctly. But in HW, even though the caps says the MaxPointSize is 64, I can''t see the point sprites. In HW, the generated tex coord for a reflection on a plane (with a render to texture) are OK. But in SW, it''s all screwed up. Here is what I do :
m_pDevice->SetTextureStageState( nStage, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3 | D3DTTFF_PROJECTED );
m_pDevice->SetTextureStageState( nStage, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEPOSITION | nCoordIndex );
m_pDevice->SetTransform( static_cast< D3DTRANSFORMSTATETYPE >( D3DTS_TEXTURE0 + nStage ), &mat );
 
The matrix is the projection matrix multiplied with 0.5, -0.5 scaling, and 0.5, 0.5 translation. Is there something in the caps regarding the support for point sprites? From what I can see, the MaxPointSize is > 1 if the point sprites are supported. ---------------- Blaster Computer game programmer and part time human being Strategy First - http://www.strategyfirst.com BlasterSoft - http://www.blastersoft.com

Share this post


Link to post
Share on other sites
Advertisement
I was wrong. The correct stuff for the reflection is D3DTTFF_COUNT4 | D3DTTFF_PROJECTED. With that it works in both SW and HW. That's it for the reflection. Now with the point sprites.

In HW, after I set the point sprite stuff, I do a ValidateDevice and it finds no error. But still, no sprites are visible.

In HW, for a simple texture scrolling (with a texture transform matrix), the ValidateDevice works and the visual result is correct.
But the same thing in SW VP gives a D3DERR_CONFLICTINGRENDERSTATE, and the visual result is correct. Of course, even with the debug out set to max, D3D doesn't give any info on why ValidateDevice fails.

Finally, with the reference rasterizer, everything works perfectly.

I find all of this so stupid!

Edit : it seems that only the GeForce3 and up support hardware point sprites. Damn, I have to go back to billboards... Easy!

----------------
Blaster
Computer game programmer and part time human being
Strategy First - http://www.strategyfirst.com
BlasterSoft - http://www.blastersoft.com

[edited by - Blaster on June 29, 2002 2:01:00 PM]

Share this post


Link to post
Share on other sites
I agree, because the SDK samples for point sprites works in pure hw.

----------------
Blaster
Computer game programmer and part time human being
Strategy First - http://www.strategyfirst.com
BlasterSoft - http://www.blastersoft.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!