Archived

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

D3DRS_POINTSIZE_MAX

This topic is 5377 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

Hello again, In D3DCREATE_SOFTWARE_VERTEXPROCESSING_mode, there is no maximum size of the Point Sprite scale, but in D3DCREATE_HARDWARE_VERTEXPROCESSING mode, the maximum screen size seems to be limited to 64 pixels. The function: SetRenderState( D3DRS_POINTSIZE_MAX, FtoDW(512.0f) ); doesn''t work to increase the maximum size. Does anyone met the same problem? Many thanks for a hint. David

Share this post


Link to post
Share on other sites
I haven''t worked with point sprites much, but I''ve read in other threads that many people have met this problem. I think that the max size is dependant on the hardware, and that 64 is a common maximum. There is a function that you can use to query the max size. Point sprites can be any size in software but I''ve read that they can be terribly slow in software (again this is not from personal experience, it''s just what I remember reading). If you are working on a particle system I would suggest making it work with point sprites and billboards, you can then decide which to use based on the user hardware.


pan narrans | My Website | Study + Hard Work + Loud Profanity = Good Code

Share this post


Link to post
Share on other sites
quote:
the maximum screen size seems to be limited to 64 pixels

Quoting the (8.1) docs (D3DRS_POINTSIZE): This value is in screen space units if D3DRS_POINTSCALEENABLE is FALSE; otherwise this value is in world space units.

quote:
I think that the max size is dependant on the hardware, and that 64 is a common maximum.

I believe it''s totally hardware-dependent. On some other mailing list, someone said that his Radeon9700 reports a max point of size of 256 (or something similar that''s >= 64).

Don''t know whether he was using DX 8.1 or 9.

Anyway, the part which causes the confusion is that the max point size is determined by taking the smaller of 2 values:
1. MaxPointSize of D3DCAPS
2. D3DRS_POINTSIZE_MAX: This has a default value of 64, but it can be set to any size such that:
D3DRS_POINTSIZE_MIN <= size <= MaxPointSize (of the caps) 


So you can just SetRenderState( D3DRS_POINTSIZE_MAX, FtoDW( Caps.MaxPointSize ) ) to get the max of the hardware.

quote:
but I''ve read that they can be terribly slow in software

Well, they''re terribly slow with the REF device. But I don''t know about their perf with software vertex processing on HAL devices.

The docs say (8.1) that with SOFTWARE_VERTEX_PROCESSING the functionality is emulated, but it doesn''t mention the performance.

quote:
For hardware mode, I think I will will use billboards, as you suggest

Do this only if you need a max size greater than the one exposed by the hardware.
If you intend to publish/distribute your software someday, then there''s a great chance it''ll be run on hardware that supports point sizes greater than your needs, in which case point sprites should be used.

Cheers,
Muhammad Haggag

Share this post


Link to post
Share on other sites