Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Oct 2011
Offline Last Active Jun 26 2012 05:06 AM

Topics I've Started

Texture transfer between two GPUs

02 June 2012 - 06:11 AM

Is there any way to transfer textures between multiple (two) GPU in DX or OGL? Let's say I render something off-screen on a slave GPU and use it on primary GPU.

Thank You!

DirectX11/HLSL issue

29 October 2011 - 12:56 PM

Hello everyone!

I'm quite new to DirectX and I'm making a school project in DX11. I have some issues with constants in HLSL...

Could anyone pls explain to me, how do constants/global variables in HLSL work? Because I'm making a simple demo, and want to access constants in cbuffer from pixel shader. But it doesn't work! I tried to even put them outside the cbuffer and set it manually in .fx source - same result.

snippet from .fx file:
cbuffer ConstantBuffer : register (b0)
	matrix mWorld;
	matrix mView;
	matrix mProj;
	float4 cColor; // - always black

float4 gColor = float4(1.0f,0.0f,0.0f,1.0f); //same here

... VS.....

float4 PS_Main( PS_Input frag ) : SV_TARGET
	//return cColor; // - doesn't work, always black
	//return gColor; // - same here
	//return frag.color; //works, but not elegant
	return float4( 1.0f,0.0f,0.0f,1.0f); //works, also not nice

Any answer greatly appreciated

EDIT1: partially solved, forgot to call PSSetConstantBuffers.... jeez
EDIT2: the global stuff still not working