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 17 Dec 2012
Offline Last Active Feb 16 2014 10:34 PM

Posts I've Made

In Topic: Can you use alpha to coverage with instancing and a geometry shader?

29 November 2013 - 09:46 PM

Is your call to CreateBlendState succeeding?

Yeah, result = S_OK

In Topic: Shader (LPD3DXEFFECT) crashes when setting my Matrix

20 February 2013 - 03:30 AM

You were right to change it to LINEAR (WRAP is wrong for the filters). You said in a previous post you copied the effect to different locations to try getting it to work. Are you sure you changed the right copy?

Oh god, yeah I forgot about that.


Thanks heaps, it's compiling now 

In Topic: Shader (LPD3DXEFFECT) crashes when setting my Matrix

20 February 2013 - 02:19 AM

Call D3DXCreateEffectFromFile() with the debug flag and see what error message is being produced.


if (FAILED(D3DXCreateEffectFromFile( g_pd3dDevice, str1, NULL, NULL, dwShaderFlags, NULL, &g_pTestShader, &pErrors ) ))
	if (pErrors != NULL)
		char *errorString = (char*)pErrors->GetBufferPointer();

It says:



 "C:\Users\Trav\Desktop\2 Person Platformer\DirectX - Sprites\TestShader.fx(12,17): Unrecognized RHS value in assignment: 'WRAP'
C:\Users\Trav\Desktop\2 Person Platformer\DirectX - Sprites\TestShader.fx(12,5): ID3DXEffectCompiler: Unexpected error
ID3DXEffectCompiler: There was an error initializing the compiler
So I changed "WRAP" in the shader to "LINEAR" to test it, it gives me the same error as above (including "WRAP" even though that doesn't exist in the shader when I ran it/anymore) 

In Topic: Shader (LPD3DXEFFECT) crashes when setting my Matrix

20 February 2013 - 12:03 AM

g_pTestShader is a NULL pointer, or Cam is a NULL reference.

Yeah, g_pTestShader is a NULL pointer. 

I think the problem is my file directory (
"TestShader.fx"), but I have the shader file in my root directory and in the cpp files location (just in case). But it still doesn't seem to load the file correctly 

In Topic: ID3DXLine to world space (instead of screen)

06 February 2013 - 04:26 PM

Never mind