Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


8 bit textures in DX9


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
5 replies to this topic

#1 RobMaddison   Members   -  Reputation: 770

Like
0Likes
Like

Posted 01 September 2013 - 12:20 PM

Hi

 

I'm trying to create an 8 bit texture using D3DFMT_P8 and I'm getting an error which is basically that it's an invalid format.  Is this the only available 8 bit texture for use with SM3.0?  I only need 8 bits and I need to do a tex2D on it in my shader.

 

Thanks



Sponsor:

#2 hunpro   Members   -  Reputation: 899

Like
1Likes
Like

Posted 01 September 2013 - 12:47 PM

I used an 8 bit texture once with dx9, it had this format: D3DFMT_L8.



#3 Rattenhirn   Crossbones+   -  Reputation: 1807

Like
1Likes
Like

Posted 01 September 2013 - 12:51 PM

P8 is for 8 Bit texture with palette, which is unlikely to be supported on modern GPUs. As the previous poster said, you want L8. L stands for luminance.

#4 RobMaddison   Members   -  Reputation: 770

Like
0Likes
Like

Posted 01 September 2013 - 01:08 PM

P8 is for 8 Bit texture with palette, which is unlikely to be supported on modern GPUs. As the previous poster said, you want L8. L stands for luminance.

 

Thanks - can I still use the standard tex2d with that type?  It returns a float4 so would it just return a float instead?



#5 InvalidPointer   Members   -  Reputation: 1443

Like
0Likes
Like

Posted 01 September 2013 - 10:45 PM

Yes, your value just lives in the red/'x' component of the value. I think some GPUs will actually splat it across the vector, too, but don't quote me on that.


clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

#6 RobMaddison   Members   -  Reputation: 770

Like
0Likes
Like

Posted 02 September 2013 - 01:18 AM

Yes, your value just lives in the red/'x' component of the value. I think some GPUs will actually splat it across the vector, too, but don't quote me on that.


Got it working, thanks




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