What will be return value of tex1D( Sampler, Index ), when sampler texture format is an 8 bit one.
  Home FAQ Contact Sign in
microsoft.public.win32.programmer.directx.graphics.shaders only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... shaders Profile…
 Up
What will be return value of tex1D( Sampler, Index ), when sampler texture format is an 8 bit one.         


Author: Santhosh
Date: Sep 16, 2008 05:35

If my Sampler Texture is a D3DFMT_A8.

float4 Output = tex1D( Sampler, index );

what will be the content of Output.a, Output.r,Output.g,Output.b.

In which component I will get the correct value from Sampler texture.
2 Comments
Re: What will be return value of tex1D( Sampler, Index ), when sampler texture format is an 8 bit one.         


Date: Sep 16, 2008 16:49

[Please do not mail me a copy of your followup]

Santhosh gmail.com> spake the secret code
<144355e1-972d-4dec-8caa-7ab008a57513@n33g2000pri.googlegroups.com> thusly:
>If my Sampler Texture is a D3DFMT_A8.
>
>float4 Output = tex1D( Sampler, index );
>
>what will be the content of Output.a, Output.r,Output.g,Output.b.
>
>In which component I will get the correct value from Sampler texture.

You could find out by trying it really quick in FX Composer or
RenderMonkye.

My guess is that it would go to the alpha or be replicated across all
components of the float4.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
no comments
Re: What will be return value of tex1D( Sampler, Index ), when sampler texture format is an 8 bit one.         


Author: SHKiN00
Date: Sep 17, 2008 03:41

On Sep 16, 4:35 pm, Santhosh gmail.com> wrote:
> If my Sampler Texture is a D3DFMT_A8.
>
> float4 Output = tex1D( Sampler, index );
>
> what will be the content of Output.a, Output.r,Output.g,Output.b.
>
> In which component I will get the correct value from Sampler texture.

As DirectX SDK says

"If the source texture contains fewer than four components, defaults
are placed in the missing components. Defaults depend on the texture
format as shown in the following table:
Show full article (0.83Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Re: Challenge 13 - Textures - JoeB #2 - two texturescorel.PaintShopPro_Photography ·