Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


What is an half4 and half for Xoliulshader? gonna use it in D3D9?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 lucky6969b   Members   -  Reputation: 636

Like
0Likes
Like

Posted 09 November 2012 - 09:07 PM

What is the primitive typedef of half4 and half defined in Xoliulshader?
Want to use it in my D3D9 Project
Thanks
Jack

Sponsor:

#2 Radikalizm   Crossbones+   -  Reputation: 2989

Like
0Likes
Like

Posted 09 November 2012 - 09:59 PM

Half primitives are usually half-precision (ie. 16-bit) floating point types, I'm not sure to which degree HLSL supports these (if at all) so a good alternative would be regular float primitives.

I gets all your texture budgets!


#3 Hodgman   Moderators   -  Reputation: 31920

Like
0Likes
Like

Posted 09 November 2012 - 10:50 PM

On old hardware, half will be a float with less precision, but possibly more speed.
On new hardware, half is treated the same as float.

#4 Matias Goldberg   Crossbones+   -  Reputation: 3713

Like
0Likes
Like

Posted 10 November 2012 - 12:34 PM

What Hodgman said. On G70 & G60 hardware (and some Intel chips) it will faster (up to 2x faster).
But beware that if you're using new hardware, you may miss a few bugs. I've had a case where a half was overflowing it's 16-bit precision, but on new HW it worked correctly because it was just being calculated in 32-bit precision.

When we tried it on old HW (an nForce 6150 & an Intel Mobile 4 Series to be exact), all hell break loose; and had to change a few variables from half to float (and add a clamp statement for a few halfs).

#5 lucky6969b   Members   -  Reputation: 636

Like
0Likes
Like

Posted 11 November 2012 - 04:49 AM

Okay, thanks. I'll take thorough thought about it. Another question is do you guys know where the shadowmap function (the functor is pointing at) is? I guess it is in 3ds max, but can't find it anywhere
Thanks
Jack

Edited by lucky6969b, 11 November 2012 - 04:50 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS