Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Sep 2009
Offline Last Active Aug 20 2012 04:12 AM

Topics I've Started


31 July 2012 - 12:05 AM


i tried to compile shader effect. and i met error "error X3025: global variables are implicitly constant, enable compatibility mode to allow modification"
but when i try to compile with flag D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY, works well.
If i use this flag, no error and no trouble. When i googling, can find many same troubles and same solutions.
Well... OK. however it's works.

but i confused.
according to MSDN, D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY flag compile to higher level than ps_1_x. that's all. it just control shader level.
But as a result, It really be involved in semantic and syntax.

Why this happen?
Moreover, I never use ps_1_x.
Why Why Why Why this happen?

thank you.

Is impossible to make DXT1 Render Target?

14 April 2011 - 05:12 AM

Hi. Sorry for my poor english.

I try to make Render Target for DXT1 format.

pD3DDevice->CreateTexture( 512, 512, 1, D3DUSAGE_RENDERTARGET, D3DFMT_DXT1, D3DPOOL_DEFAULT,  &pTexture, NULL)

but It not work. show error message as:

Direct3D9: (ERROR) :Invalid format specified for texture

Is impossible to make DXT1 Render Target?
I want to save Render Target image to file as DXT1 format.
Waht can i do?

May the force be with you :-)

bottleneck : Input assembly, Attribute

02 April 2011 - 10:32 PM

I have a question about bottleneck.
Is it differ Input assembly bottleneck from Attribute bottleneck?
And, Is it depend on vertex count?

God bless you.

directx9 works unified pipeline?

12 February 2011 - 10:08 PM

Hi. Sorry for my poor english.

I know morden GPU works by Unified pipeline.
but i don't know apply to DX9.
How about that?
Is that Unified Pipeline works automatically in DX9?

write RGB8 values at RGBA16 buffer(unsigned 64bit). PLZ help me :-)

28 December 2010 - 02:52 PM

hello guys~
I need your help for my recently work. plz give me a tip. :-)
sorry about my poor english.

I attempted to write two values( Diffuse;lit and Illumination;add) at one 64bit unsigned Render Target(D3DFMT_A16B16G16R16) in DX9.
for each two value assign to 8bit. and save to one channel. It's possible 'cause It's Unsigned 16 bit per component of RGBA.

I use multiplication or division by 256 as Bit Shift. Because Can't use Bit Operator( << and >>) at DX9.

=== HLSL code of Write pass: ===

// Convert to 0~255 Unsigned Int
// 00000000 CCCCCCCC
int3 vDiffuseUint = output.color.rgb * 255.0f;
vDiffuseUint = clamp( vDiffuseUint, 0, 255);
// Bit Shift
// CCCCCCCC 00000000
vDiffuseUint *= 256;

// 00000000 AAAAAAAA
int3 vAddUint = vAdd * 255.0f;
vAddUint = clamp( vAddUint, 0, 255);

// Accumulate
int3 vCompressedUint = vDiffuseUint + vAddUint;
// Convert to 0~1 float
OutPut = (float3)vCompressedUint / ( 65535.0f);

=== HLSL code of Read pass: ===

// Comvert to unsigned Int
int3 vReadColorUint = saturate(vReadColor) * ( 65535.0f);

// Bit Shift
// 00000000 CCCCCCCC
int3 vDiffuseUint = vReadColorUint / 256;
// Bit UnShift
// CCCCCCCC 00000000
int3 vDiffuseUintUnShift = vDiffuseUint * 256;

// Get AddClr
// - CCCCCCCC 00000000
// = 00000000 AAAAAAAA
int3 vAddUint = 0;
vAddUint = vReadColorUint - vDiffuseUintUnShift;

// convert to float. and use this value as result OutPut.
vReadColor = (float3)vDiffuseUint / 255.0f;
vAddColor = (float3)vAddUint / 255.0f;

It works!!!!!! Pretty good.
but damn Geforce 7600 T_T. Error in Geforce 7xxx and lower model. I'll try to check Radeons.

Fundamentally, Why this happen?!?! Why symptoms are different for each H/W?
How can i scan standards( Caps, Query, and so on...)?

Give me a piece of hint please.
God bless you.

[Edited by - ozkill on December 30, 2010 6:45:51 AM]