Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 10 Apr 2013
Offline Last Active Jun 27 2013 08:38 PM

#5070216 can 'SetTextureStageState' be used with pixel shader

Posted by tcige on 16 June 2013 - 12:45 PM


In pixel shader:

float4 textureColor = tex2D( samp, texCoord );
float alpha = textureColor.a; 


yeah, pixel shader is so convenient

#5069425 how do i know the vertex coordinate of the mesh

Posted by tcige on 13 June 2013 - 08:25 AM

i test using D3DXCreateTeapot, but can not find any info about its vertex coordinate

#5067036 usage of hlsl function

Posted by tcige on 03 June 2013 - 02:38 AM

Earlier versions can't use it, because it wasn't added to the spec until SM5.
You have to just use "1/x" for earlier versions.


i test it works for 'vs_1_1', and D3DXCompileShaderFromFile returns no error

#5066101 what does 'w' mean in shader assembler

Posted by tcige on 30 May 2013 - 05:07 AM

It's the homogeneous coordinate. I would strongly suggest reading more graphics theory before proceeding.


thanks a lot


but i do not agree with your opinion, i am using api, not designing api

#5066084 what does 'w' mean in shader assembler

Posted by tcige on 30 May 2013 - 03:35 AM

it seems to be the fourth component of input register, and D3DDECLTYPE_FLOAT3 sets it to 1