Sign in to follow this  
Kamil9132

DX11 Directx 11 instancing

Recommended Posts

Kamil9132    135
Hi,
I want to draw 50 000 cubes using instance drawing.
I tried make it in this way, but there is no object on scene:
 
Efekty.fx
Texture2D txDiffuse : register( t0 );
SamplerState samLinear : register( s0 );

cbuffer cbNeverChanges : register( b0 )
{
	matrix View;
};

cbuffer cbChangeOnResize : register( b1 )
{
    matrix Projection;
};

cbuffer cbChangesEveryFrame : register( b2 )
{
    matrix World;
	bool cPrzez;
	int kolorP;
};

cbuffer cbPixelShader : register( b3 )
{
	float4 kolorS;
	float4 kolorL;

};

//--------------------------------------------------------------------------------------
struct VS_INPUT
{
    float4 Pos : POSITION;
    float2 Tex : TEXCOORD0;
};

struct PS_INPUT
{
    float4 Pos : SV_POSITION;
    float2 Tex : TEXCOORD0;
};

struct VS_INS_INPUT
{
    float4 Pos : POSITION;
    float2 Tex : TEXCOORD0;

	row_major matrix instancePos : INSTANCEPOS;
	uint instanceID : SV_InstanceID;

};
//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
PS_INPUT VS( VS_INPUT input )
{
    PS_INPUT output = (PS_INPUT)0;
    output.Pos = mul( input.Pos, World );
    output.Pos = mul( output.Pos, View );
    output.Pos = mul( output.Pos, Projection );
    output.Tex = input.Tex;
    
    return output;
}

PS_INPUT VS_INS( VS_INS_INPUT input ){
   
	PS_INPUT output = (PS_INPUT)0;
    output.Pos = mul( input.Pos, input.instancePos );
    output.Pos = mul( output.Pos, View );
    output.Pos = mul( output.Pos, Projection );
    output.Tex = input.Tex;
    
    return output;
}
//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------


float4 PS( PS_INPUT input) : SV_Target{

	float4 diffuse = txDiffuse.Sample( samLinear, input.Tex ) * kolorP / 100 + kolorS + kolorL;

	if (cPrzez){

		clip(diffuse.a < 0.5f ? -1:1);

	}

	return diffuse;

}

main.cpp

ID3D11InputLayout*                  IN_g_pVertexLayout = NULL;
ID3D11Buffer*                       IN_g_pVertexBuffer[2];
ID3D11VertexShader*                 IN_g_pVertexShader = NULL;
ID3D11Buffer*                       IN_g_pInstanceVertexBuffer;

struct INS{

	XMFLOAT4X4 IN_N;

};

std::vector <INS> InstancV;
	ID3DBlob* IN_pVSBlob = NULL;
	D3DX11CompileFromFile( L"Efekty.fx", NULL, NULL, "VS_INS", "vs_4_0", 0, 0, NULL, &IN_pVSBlob, 0, NULL );
	d3d11Device->CreateVertexShader( IN_pVSBlob->GetBufferPointer(), IN_pVSBlob->GetBufferSize(), NULL, &IN_g_pVertexShader );

    D3D11_INPUT_ELEMENT_DESC layoutWW[] =
    {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
		
		{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 1, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 2, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }

    };
    UINT numElementsWW = ARRAYSIZE( layoutWW );


	d3d11Device->CreateInputLayout (layoutWW, numElementsWW, IN_pVSBlob->GetBufferPointer(),  IN_pVSBlob->GetBufferSize(), &IN_g_pVertexLayout);
    IN_pVSBlob->Release();
	
	IN_g_pVertexBuffer[0] = g_pVertexBuffer;
	IN_g_pVertexBuffer[1] = IN_g_pInstanceVertexBuffer;
XMMATRIX WSG;
INS WSF;
for (short int TB_01 = 0; TB_01 < w; TB_01++){

	for (short int TB_02 = 100; TB_02 < 150; TB_02 += 10){

		for (short int TB_03 = 0; TB_03 < w; TB_03++){

			WSG = XMMatrixTranspose (XMMatrixRotationNormal (camUp, 0) * 
				XMMatrixScaling( skala, skala, skala ) * XMMatrixTranslation( 
				static_cast <float> (TB_01 * skala * 2), 
				static_cast <float> (TB_02 * skala * 2),
				static_cast <float> (TB_03 * skala * 2)));
								
			XMStoreFloat4x4 (&WSF.IN_N, WSG);
			InstancV.push_back (WSF);

		}

	}

}
D3D11_BUFFER_DESC bd;
ZeroMemory( &bd, sizeof(bd) );
bd.Usage = D3D11_USAGE_DEFAULT;
bd.ByteWidth = sizeof (INS) * InstancV.size();
bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
bd.CPUAccessFlags = 0;
D3D11_SUBRESOURCE_DATA InitData;
ZeroMemory( &InitData, sizeof(InitData) );
InitData.pSysMem = &InstancV[0];
d3d11Device->CreateBuffer( &bd, &InitData, &IN_g_pInstanceVertexBuffer );

Drawing with instancing (not working):

			UINT strideI[2] = {sizeof(SimpleVertex), sizeof(INS)};
			UINT offsetI[2] = {0,0};

			d3d11DevCon->IASetInputLayout (IN_g_pVertexLayout);
			d3d11DevCon->IASetVertexBuffers( 0, 2, IN_g_pVertexBuffer, strideI, offsetI );	
			d3d11DevCon->VSSetShader( IN_g_pVertexShader, NULL, 0 );

			d3d11DevCon->PSSetShaderResources( 0, 1, &texturaU[0] );

			d3d11DevCon->DrawIndexedInstanced (ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][1], InstancV.size(), ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][0], 0, 0);
 

Drawing without instancing (working):

			UINT stride = sizeof( SimpleVertex );
			UINT offset = 0;

			d3d11DevCon->IASetInputLayout (g_pVertexLayout);
			d3d11DevCon->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );	
			d3d11DevCon->VSSetShader( g_pVertexShader, NULL, 0 );
			
			d3d11DevCon->PSSetShaderResources( 0, 1, &texturaU[0] );

			
			for (short int TB_01 = 0; TB_01 < w; TB_01++){

				for (short int TB_02 = 100; TB_02 < 150; TB_02 += 10){

					for (short int TB_03 = 0; TB_03 < w; TB_03++){

						cb.mWorld = XMMatrixTranspose (XMMatrixRotationNormal (camUp, 0) * 
							XMMatrixScaling( skala, skala, skala ) * XMMatrixTranslation( 
							static_cast <float> (TB_01 * skala * 2), 
							static_cast <float> (TB_02 * skala * 2),
							static_cast <float> (TB_03 * skala * 2)));
						
						d3d11DevCon->UpdateSubresource( g_pCBChangesEveryFrame, 0, NULL, &cb, 0, 0 );
						d3d11DevCon->DrawIndexed (ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][1], ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][0], 0);

					}

				}

			}

Edited by Kamil9132

Share this post


Link to post
Share on other sites
ongamex92    3255

I cannot quite remember but i think that it should be:

{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }

 

I havent look in depth...

Share this post


Link to post
Share on other sites
Kamil9132    135

I changed it, but it still does not work.

I added also this line:

d3d11DevCon->VSSetShader( IN_g_pVertexShader, NULL, 0 );

Edited by Kamil9132

Share this post


Link to post
Share on other sites
Aqua Costa    3691

Internally the compiler expands

row_major matrix instancePos : INSTANCEPOS; 

into something like:

float4 instancePos : INSTANCEPOS0;
float4 instancePos : INSTANCEPOS1;
float4 instancePos : INSTANCEPOS2;
float4 instancePos : INSTANCEPOS3;

 
So the input layout should be:

{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 1, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 2, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }
Edited by TiagoCosta

Share this post


Link to post
Share on other sites
Migi0027    4628

Not to sound like the old champ.

 

But. Enable the debug layer, look at the messages being sent to you. Anything relevant?

 

EDIT:

 

Im curious, since theres no NULL component in the input layout, what does numElementsWW equal?

Edited by Migi0027

Share this post


Link to post
Share on other sites
Kamil9132    135

numElementsWW is equal to 6

D3D11 WARNING: Live ID3D11Device at 0x00850D84, Refcount: 96 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING: 	Live ID3D11Context at 0x00D40070, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING: 	Live ID3DDeviceContextState at 0x00E042A0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING: 	Live ID3D11BlendState at 0x00E0A3F4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x00E0C96C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x00E0D0A4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x00E0E7FC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Query at 0x00E0EA14, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #438: LIVE_QUERY]
D3D11 WARNING: 	Live IDXGISwapChain at 0x00E0EC30, Refcount: 1 [ STATE_CREATION WARNING #442: LIVE_SWAPCHAIN]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E0F194, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11RenderTargetView at 0x00E100F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #428: LIVE_RENDERTARGETVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E10474, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11DepthStencilView at 0x00E117CC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #429: LIVE_DEPTHSTENCILVIEW]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x00E11B2C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x00E13714, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E441564, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x00E1799C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x00E1E214, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x00E22F3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x00E1A2FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x00E235B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E65AF04, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E65B83C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E65C77C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E65D764, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E65F9A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E660104, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E665764, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E665A04, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E667BB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E667E1C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E66CA1C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E66CCBC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E66E3FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E66E664, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E26A54, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E26CF4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E28284, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E284EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E29D8C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2A02C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E2B2F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2B55C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E2C984, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2CC24, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E2E8A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2EAE4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E303A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E30644, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E31A3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E31C7C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E330C4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E33364, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3511C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E3535C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E367A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E36A44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E37F74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E381B4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3D56C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E3D80C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3F214, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E3F47C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3FE4C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E442FE4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44427C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E444544, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E445AA4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E445D7C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E447014, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4472EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44884C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E448B24, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E449DBC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44A094, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44B5F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44B8CC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44CB64, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44CE3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E66C41C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44E994, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E450E9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45113C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E452F74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45323C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E4544D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45479C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E45FCF4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45FF94, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46125C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E461524, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E463184, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E463424, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E464BAC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E464E74, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46613C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E466404, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46769C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E467964, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E468BFC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E468EC4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46A15C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46A424, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46BB54, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46BDF4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46D0BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46D384, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46E61C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46E8E4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46FB7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46FE44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E4710DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4713A4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E47263C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E472904, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E473B9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E473E64, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E4750FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4753C4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E47665C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E4768C4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E47717C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4779B4, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E478C44, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E478F14, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E47ABF4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E47AFA4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E47C64C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E47D87C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E47DAEC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E4CAAB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E4C40B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E4C7DB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E4CFC7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E4D2974, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E402C7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x2E4CBEC4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x2E4CD384, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E4CC00C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E40673C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E41017C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E4103EC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E435D34, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4D55BC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]




 @iedoc:
    bd.Usage = D3D11_USAGE_IMMUTABLE;
    bd.ByteWidth = sizeof( DWORD ) * Incidesy.size();
    bd.BindFlags = D3D11_BIND_INDEX_BUFFER;
    bd.CPUAccessFlags = 0;
    InitData.pSysMem = &Incidesy[0];
    d3d11Device->CreateBuffer( &bd, &InitData, &g_pIndexBuffer );
    

    // Set index buffer
	d3d11DevCon->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R32_UINT, 0 );
 
Drawing cubes without instanced is working properly, so i think, index buffer is set properly.
Incidesy is vector with indexes.
 
 
Full code of function:
    D3D_DRIVER_TYPE driverTypes[] =
    {
        D3D_DRIVER_TYPE_HARDWARE,
        D3D_DRIVER_TYPE_WARP,
        D3D_DRIVER_TYPE_REFERENCE,
    };
    UINT numDriverTypes = ARRAYSIZE( driverTypes );

    D3D_FEATURE_LEVEL featureLevels[] =
    {
        D3D_FEATURE_LEVEL_11_0,
        D3D_FEATURE_LEVEL_10_1,
        D3D_FEATURE_LEVEL_10_0,
    };
    UINT numFeatureLevels = ARRAYSIZE( featureLevels );

    DXGI_SWAP_CHAIN_DESC sd;
    ZeroMemory( &sd, sizeof( sd ) );
    sd.BufferCount = 1;
    sd.BufferDesc.Width = Width;
    sd.BufferDesc.Height = Height;
    sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    sd.BufferDesc.RefreshRate.Numerator = 60;
    sd.BufferDesc.RefreshRate.Denominator = 1;
    sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
    sd.OutputWindow = hwnd;
    sd.SampleDesc.Count = 1;
    sd.SampleDesc.Quality = 0;
    sd.Windowed = TRUE;

    for( UINT driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++ )
    {
        g_driverType = driverTypes[driverTypeIndex];
//		hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED, featureLevels, numFeatureLevels,
//			D3D11_SDK_VERSION, &sd, &g_pSwapChain, &d3d11Device, &g_featureLevel, &d3d11DevCon );
      
		hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, D3D11_CREATE_DEVICE_DEBUG, featureLevels, numFeatureLevels,
			D3D11_SDK_VERSION, &sd, &g_pSwapChain, &d3d11Device, &g_featureLevel, &d3d11DevCon );

        if (SUCCEEDED (hr))  break;
    }


	d3d11Device->QueryInterface(__uuidof(ID3D11Debug), reinterpret_cast<void**>(&debugDev));
	debugDev->QueryInterface( __uuidof(ID3D11InfoQueue), (void**)&d3dInfoQueue );


    // Create a render target view
    ID3D11Texture2D* pBackBuffer = NULL;
    g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer );


    d3d11Device->CreateRenderTargetView( pBackBuffer, NULL, &g_pRenderTargetView );
    pBackBuffer->Release();


    // Create depth stencil texture
    D3D11_TEXTURE2D_DESC descDepth;
    ZeroMemory( &descDepth, sizeof(descDepth) );
    descDepth.Width = Width;
    descDepth.Height = Height;
    descDepth.MipLevels = 1;
    descDepth.ArraySize = 1;
    descDepth.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
    descDepth.SampleDesc.Count = 1;
    descDepth.SampleDesc.Quality = 0;
    descDepth.Usage = D3D11_USAGE_DEFAULT;
    descDepth.BindFlags = D3D11_BIND_DEPTH_STENCIL;
    descDepth.CPUAccessFlags = 0;
    descDepth.MiscFlags = 0;
	d3d11Device->CreateTexture2D( &descDepth, NULL, &g_pDepthStencil );

    // Create the depth stencil view
    D3D11_DEPTH_STENCIL_VIEW_DESC descDSV;
    ZeroMemory( &descDSV, sizeof(descDSV) );
    descDSV.Format = descDepth.Format;
    descDSV.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
    descDSV.Texture2D.MipSlice = 0;
    d3d11Device->CreateDepthStencilView( g_pDepthStencil, &descDSV, &g_pDepthStencilView );


	d3d11DevCon->OMSetRenderTargets( 1, &g_pRenderTargetView, g_pDepthStencilView );

    // Setup the viewport
    D3D11_VIEWPORT vp;
    vp.Width = (FLOAT)Width;
    vp.Height = (FLOAT)Height;
    vp.MinDepth = 0.0f;
    vp.MaxDepth = 1.0f;
    vp.TopLeftX = 0;
    vp.TopLeftY = 0;
	d3d11DevCon->RSSetViewports( 1, &vp );

    // Compile the vertex shader
    ID3DBlob* pVSBlob = NULL;
	D3DX11CompileFromFile( L"Efekty.fx", NULL, NULL, "VS", "vs_4_0", 0, 0, NULL, &pVSBlob, 0, NULL );


    // Create the vertex shader
	d3d11Device->CreateVertexShader( pVSBlob->GetBufferPointer(), pVSBlob->GetBufferSize(), NULL, &g_pVertexShader );


    // Define the input layout
    D3D11_INPUT_ELEMENT_DESC layout[] =
    {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },

    };
    UINT numElements = ARRAYSIZE (layout);








	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
   
	ID3DBlob* IN_pVSBlob = NULL;
	D3DX11CompileFromFile( L"Efekty.fx", NULL, NULL, "VS_INS", "vs_4_0", 0, 0, NULL, &IN_pVSBlob, 0, NULL );
	d3d11Device->CreateVertexShader( IN_pVSBlob->GetBufferPointer(), IN_pVSBlob->GetBufferSize(), NULL, &IN_g_pVertexShader );

    D3D11_INPUT_ELEMENT_DESC layoutWW[] =
    {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
		
		{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 1, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 2, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }

    };
    UINT numElementsWW = ARRAYSIZE( layoutWW );

	pomoc15 = ToString (numElementsWW);
	d3d11Device->CreateInputLayout (layoutWW, numElementsWW, IN_pVSBlob->GetBufferPointer(),  IN_pVSBlob->GetBufferSize(), &IN_g_pVertexLayout);

    IN_pVSBlob->Release();
	
	IN_g_pVertexBuffer[0] = g_pVertexBuffer;
	IN_g_pVertexBuffer[1] = IN_g_pInstanceVertexBuffer;
	
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






    // Create the input layout
	d3d11Device->CreateInputLayout (layout, numElements, pVSBlob->GetBufferPointer(),  pVSBlob->GetBufferSize(), &g_pVertexLayout);
    pVSBlob->Release();


    // Set the input layout
	d3d11DevCon->IASetInputLayout (g_pVertexLayout);

    // Compile the pixel shader
    ID3DBlob* pPSBlob = NULL;
	D3DX11CompileFromFile (L"Efekty.fx", NULL, NULL, "PS", "ps_4_0", 0, 0, NULL, &pPSBlob, 0, NULL);
 

    // Create the pixel shader
    d3d11Device->CreatePixelShader (pPSBlob->GetBufferPointer(), pPSBlob->GetBufferSize(), NULL, &g_pPixelShader);
    pPSBlob->Release();


    // Create vertex buffer

	std::vector <SimpleVertex> Vertexy;
	std::vector <DWORD> Incidesy;

	WczObj (Vertexy, Incidesy);

    D3D11_BUFFER_DESC bd;
    ZeroMemory( &bd, sizeof(bd) );
	bd.Usage = D3D11_USAGE_IMMUTABLE;
    bd.ByteWidth = sizeof( SimpleVertex ) * Vertexy.size();
    bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
    bd.CPUAccessFlags = 0;
    D3D11_SUBRESOURCE_DATA InitData;
    ZeroMemory( &InitData, sizeof(InitData) );
    InitData.pSysMem = &Vertexy[0];
    d3d11Device->CreateBuffer( &bd, &InitData, &g_pVertexBuffer );
 

    UINT stride = sizeof( SimpleVertex );
    UINT offset = 0;
	d3d11DevCon->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );	

    bd.Usage = D3D11_USAGE_IMMUTABLE;
    bd.ByteWidth = sizeof( DWORD ) * Incidesy.size();
    bd.BindFlags = D3D11_BIND_INDEX_BUFFER;
    bd.CPUAccessFlags = 0;
    InitData.pSysMem = &Incidesy[0];
    d3d11Device->CreateBuffer( &bd, &InitData, &g_pIndexBuffer );
    

    // Set index buffer
	d3d11DevCon->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R32_UINT, 0 );

    // Set primitive topology
	d3d11DevCon->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );

    // Create the constant buffers
    bd.Usage = D3D11_USAGE_DEFAULT;
    bd.ByteWidth = sizeof(CBNeverChanges);
    bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
    bd.CPUAccessFlags = 0;
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBNeverChanges );
 
    bd.ByteWidth = sizeof(CBChangeOnResize);
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBChangeOnResize );

    bd.ByteWidth = sizeof(CBPixelShader);
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBPixelShader );
  
	bd.ByteWidth = sizeof(CBChangesEveryFrame);
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBChangesEveryFrame );

	std::string ntextur;

	for (int ptextur = 0; ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV + ltexturIM; ptextur++){

		if (ptextur < ltextur1D){

			if (ptextur < 9){

				ntextur = "Data/Textures/1D/textura1D_0" + ToString(ptextur + 1);

			}

			if (ptextur >= 9){

				ntextur = "Data/Textures/1D/textura1D_" + ToString(ptextur + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D){

			if (ptextur - ltextur1D < 9){

				ntextur = "Data/Textures/2D/textura2D_0" + ToString(ptextur - ltextur1D + 1);

			}

			if (ptextur - ltextur1D >= 9){

				ntextur = "Data/Textures/2D/textura2D_" + ToString(ptextur - ltextur1D + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D){

			if (ptextur - ltextur1D - ltextur2D < 9){

				ntextur = "Data/Textures/3D/textura3D_0" + ToString(ptextur - ltextur1D - ltextur2D + 1);

			}

			if (ptextur - ltextur1D - ltextur2D >= 9){

				ntextur = "Data/Textures/3D/textura3D_" + ToString(ptextur - ltextur1D - ltextur2D + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D < 9){

				ntextur = "Data/Textures/M/texturaM_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D >= 9){

				ntextur = "Data/Textures/M/texturaM_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli < 9){

				ntextur = "Data/Textures/MV/texturaMV_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli >= 9){

				ntextur = "Data/Textures/MV/texturaMV_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV < 9){

				ntextur = "Data/Textures/M/P/texturaMP_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV >= 9){

				ntextur = "Data/Textures/M/P/texturaMP_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP < 9){

				ntextur = "Data/Textures/MV/PV/texturaMPV_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP >= 9){

				ntextur = "Data/Textures/MV/PV/texturaMPV_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV + ltexturIM){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV < 9){

				ntextur = "Data/Textures/IM/Menu_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV >= 9){

				ntextur = "Data/Textures/IM/Menu_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV + 1);

			}

		}
	
		if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV){

			MultiByteToWideChar( CP_ACP, 0, (ntextur + ".dds").c_str(), - 1, dtextur, 100 );	

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV + ltexturIM){

			MultiByteToWideChar( CP_ACP, 0, (ntextur + ".png").c_str(), - 1, dtextur, 100 );	

		}

		D3DX11CreateShaderResourceViewFromFile( d3d11Device, dtextur, NULL, NULL, &texturaU[ptextur], NULL );

		if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV){

			MultiByteToWideChar( CP_ACP, 0, (ntextur + "_M.png").c_str(), - 1, dtextur, 100 );
			D3DX11CreateShaderResourceViewFromFile( d3d11Device, dtextur, NULL, NULL, &texturaUM[ptextur], NULL );

		}

	}

//////////////////////////////TRANSPARENCY//////////////////////////////

	D3D11_BLEND_DESC blendDesc;
	ZeroMemory( &blendDesc, sizeof(blendDesc) );

	D3D11_RENDER_TARGET_BLEND_DESC rtbd;
	ZeroMemory( &rtbd, sizeof(rtbd) );

	rtbd.BlendEnable			 = true;
	rtbd.SrcBlend				 = D3D11_BLEND_SRC_COLOR;
	rtbd.DestBlend				 = D3D11_BLEND_BLEND_FACTOR;
	rtbd.BlendOp				 = D3D11_BLEND_OP_ADD;
	rtbd.SrcBlendAlpha			 = D3D11_BLEND_ONE;
	rtbd.DestBlendAlpha			 = D3D11_BLEND_ZERO;
	rtbd.BlendOpAlpha			 = D3D11_BLEND_OP_ADD;
	rtbd.RenderTargetWriteMask	 = D3D10_COLOR_WRITE_ENABLE_ALL;

	blendDesc.AlphaToCoverageEnable = false;
	blendDesc.RenderTarget[0] = rtbd;

	d3d11Device->CreateBlendState(&blendDesc, &Transparency);


//////////////////////////////TRANSPARENCY//////////////////////////////



    // Create the sample state
    D3D11_SAMPLER_DESC sampDesc;
    ZeroMemory( &sampDesc, sizeof(sampDesc) );
    sampDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
    sampDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
    sampDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
    sampDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
    sampDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;
    sampDesc.MinLOD = 0;
    sampDesc.MaxLOD = D3D11_FLOAT32_MAX;
    d3d11Device->CreateSamplerState( &sampDesc, &g_pSamplerLinear );

	font.initFont(d3d11Device,d3d11DevCon);
    
	d3d11DevCon->VSSetShader( g_pVertexShader, NULL, 0 );
	d3d11DevCon->VSSetConstantBuffers( 0, 1, &g_pCBNeverChanges );
	d3d11DevCon->VSSetConstantBuffers( 1, 1, &g_pCBChangeOnResize );
	d3d11DevCon->VSSetConstantBuffers( 2, 1, &g_pCBChangesEveryFrame );
	d3d11DevCon->PSSetShader( g_pPixelShader, NULL, 0 );
	d3d11DevCon->PSSetConstantBuffers( 2, 1, &g_pCBChangesEveryFrame );
	d3d11DevCon->PSSetConstantBuffers( 3, 1, &g_pCBPixelShader );
	d3d11DevCon->PSSetSamplers( 0, 1, &g_pSamplerLinear );
			
	cbPS.kolorL = KolorN_00;

Edited by Kamil9132

Share this post


Link to post
Share on other sites
Kamil9132    135

I don't get any errors. I get only couple of warmings about macro redefinition.

This is the entire output window:

'Game.exe' (Win32): Loaded 'C:\Users\Kamil\Documents\MVS\Game\Debug\Game.exe'. Symbols loaded.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3dx11_43.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Users\Kamil\Documents\Moje Dokumenty\MVS\CraftMine\Debug\FW1FontWrapper.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dsound.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110d.dll'. Symbols loaded.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgidebug.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvwgf2um.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\psapi.dll'. Cannot find or open the PDB file.
The thread 0x1858 has exited with code 0 (0x0).
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvspcap.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\gdi32.dll'
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11_1sdklayers.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\DWrite.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\clbcatq.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\propsys.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\AudioSes.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\avrt.dll'. Cannot find or open the PDB file.
The thread 0x145c has exited with code 0 (0x0).
The thread 0x16f8 has exited with code 0 (0x0).
D3D11 WARNING: Live ID3D11Device at 0x17F10D84, Refcount: 96 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING: 	Live ID3D11Context at 0x2CD30070, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING: 	Live ID3DDeviceContextState at 0x2CDF4120, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2CDFA274, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x2CDFC7EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x2CDFCF24, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2CDFE67C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Query at 0x2CDFE894, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #438: LIVE_QUERY]
D3D11 WARNING: 	Live IDXGISwapChain at 0x2CDFEAB0, Refcount: 1 [ STATE_CREATION WARNING #442: LIVE_SWAPCHAIN]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CDFF014, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11RenderTargetView at 0x2CDFFF74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #428: LIVE_RENDERTARGETVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE002F4, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11DepthStencilView at 0x2CE0164C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #429: LIVE_DEPTHSTENCILVIEW]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2CE01C8C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2CE034CC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2CE0F68C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2CE0FE3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2CE0A73C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2CE2488C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E732034, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2CE2442C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E51BAEC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E51C424, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E51D364, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E51E34C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2533C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE25A9C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2B0FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE2B39C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2D54C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE2D7B4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE15CA4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE15F44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE17684, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE178EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE1C43C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE1C6DC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE1DC6C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE1DED4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE1F774, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE1FA14, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE20CDC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE20F44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2236C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE2260C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE233BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C0F3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C271C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C29BC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C3DB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C3FF4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C543C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C56DC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C7494, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C76D4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C8B1C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C8DBC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6CA2EC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6CA52C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6CF46C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6CF70C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D0C9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D0F04, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D232C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D25CC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D3894, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D3B5C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D50BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D5394, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D662C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D6904, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D7E64, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D813C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D93D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D96AC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6DAC0C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6DAEE4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6DC17C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6DC454, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6DD9B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6DDC7C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6E01B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6E0454, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6E25DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6E287C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6E3B14, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6E3DDC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6F3AB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6F3D54, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6F501C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6F52E4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6F5E3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E522C3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E5243C4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52468C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E525954, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E525C1C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E526EB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52717C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E528414, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E5286DC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E529974, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E529C3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52B36C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52B60C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52C8D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52CB9C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52DE34, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52E0FC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52F394, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52F65C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E5308F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E530BBC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E531E54, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E53211C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E5333B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E53367C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E534914, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E534BDC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E535E74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E5360DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E536994, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E5371CC, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E53845C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E53872C, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E53A40C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E53A7BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E53BE64, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E53D094, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E53D4F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E549B9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E54A2EC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E54AC7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E548F3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E55348C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E554424, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x2E5545F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x2E54F5DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E5535D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E54EA2C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E55FC6C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E5716CC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E7357AC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E744394, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
The thread 0x1868 has exited with code 0 (0x0).
'Game.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\avrt.dll'
The thread 0x15bc has exited with code 0 (0x0).
The thread 0x450 has exited with code 0 (0x0).
The thread 0x17dc has exited with code 0 (0x0).
The thread 0x1774 has exited with code 0 (0x0).
The thread 0x1908 has exited with code 0 (0x0).
The thread 0xda0 has exited with code 0 (0x0).
The thread 0x1a00 has exited with code 0 (0x0).
The thread 0x1604 has exited with code 0 (0x0).
The thread 0x1350 has exited with code 0 (0x0).
The thread 0x17cc has exited with code 0 (0x0).
The thread 0x19b0 has exited with code 0 (0x0).
The thread 0x1a58 has exited with code 0 (0x0).
The thread 0xd58 has exited with code 0 (0x0).
The thread 0x16d0 has exited with code 0 (0x0).
The thread 0x16a8 has exited with code 0 (0x0).
The thread 0xed8 has exited with code 0 (0x0).
The thread 0x17e4 has exited with code 0 (0x0).
The thread 0x1920 has exited with code 0 (0x0).
The thread 0x11f0 has exited with code 0 (0x0).
D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Producer at 0x17F10DF8, Refcount: 31. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CD30070, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDF4120, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFA274, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFC7EC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFCF24, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFE67C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFE894, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFEAB0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFF014, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFFF74, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE002F4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0164C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE01C8C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE034CC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0F68C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0FE3C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0A73C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2488C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E732034, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2442C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51BAEC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51C424, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51D364, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51E34C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2533C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE25A9C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2B0FC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2D7B4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE15CA4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE178EC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE1C43C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE1DED4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE1F774, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE20F44, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2236C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C0F3C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C271C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C3FF4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C543C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C76D4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C8B1C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6CA52C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6CF46C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6D0F04, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6D232C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6DDC7C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E01B4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E0454, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E25DC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E287C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E3B14, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E3DDC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6F3AB4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E52468C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E525954, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E525C1C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E526EB4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E52717C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E528414, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E536994, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5371CC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53845C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53872C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53A40C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53A7BC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53BE64, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53D094, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53D4F4, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E549B9C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54A2EC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54AC7C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E548F3C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E55348C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E554424, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5545F4, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54F5DC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5535D4, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54EA2C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E55FC6C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5716CC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E7357AC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E744394, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live                         Object :     82 [ STATE_CREATION WARNING #0: UNKNOWN]
DXGI WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: Live Producer at 0x17E51C70, Refcount: 4. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x17E64FB8, Refcount: 2. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: Live                         Object :      1 [ STATE_CREATION WARNING #0: ]
The program '[5820] Game.exe' has exited with code 0 (0x0).

Share this post


Link to post
Share on other sites
Kamil9132    135

matrix World is used in drawing without instancing

row_major matrix instancePos is used in drawing with instancing

Edited by Kamil9132

Share this post


Link to post
Share on other sites
Mona2000    1967

Yes, but you are using them in the same way, passing the same data, yet one is column_major and the other is row_major. That doesn't sound right, unless I'm missing something.

Share this post


Link to post
Share on other sites
Kamil9132    135

I am not sure, but i think that for every instance instancePos is changing and World is constant, World is only changing when i update resource using `UpdateSubresource` in main code.

Share this post


Link to post
Share on other sites
Kamil9132    135

I found what was wrong.

I had something like this in code:

ID3D11Buffer*   BTV[2] = {Buffer1, Buffer2};

Then i created Buffer1 and Buffer2.

 

Now i create buffers first, then i create ID3D11Buffer* BTV[2].

Share this post


Link to post
Share on other sites

I think I ran into that similiar issue whereas I forgot to include the two buffers for instancing. It happens but it's a great learning cuve to remember.

 

Rule of thumb - if nothing renders on screen it can be either a shader issue or the rendering part issue in code. I can't count how many times I plug something in and go; wait? Why isn't it rendering anything? I go back to the rendering section of the code look through it and find it. Sometimes it's in the shader code as well.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By gsc
      Hi! I am trying to implement simple SSAO postprocess. The main source of my knowledge on this topic is that awesome tutorial.
      But unfortunately something doesn't work... And after a few long hours I need some help. Here is my hlsl shader:
      float3 randVec = _noise * 2.0f - 1.0f; // noise: vec: {[0;1], [0;1], 0} float3 tangent = normalize(randVec - normalVS * dot(randVec, normalVS)); float3 bitangent = cross(tangent, normalVS); float3x3 TBN = float3x3(tangent, bitangent, normalVS); float occlusion = 0.0; for (int i = 0; i < kernelSize; ++i) { float3 samplePos = samples[i].xyz; // samples: {[-1;1], [-1;1], [0;1]} samplePos = mul(samplePos, TBN); samplePos = positionVS.xyz + samplePos * ssaoRadius; float4 offset = float4(samplePos, 1.0f); offset = mul(offset, projectionMatrix); offset.xy /= offset.w; offset.y = -offset.y; offset.xy = offset.xy * 0.5f + 0.5f; float sampleDepth = tex_4.Sample(textureSampler, offset.xy).a; sampleDepth = vsPosFromDepth(sampleDepth, offset.xy).z; const float threshold = 0.025f; float rangeCheck = abs(positionVS.z - sampleDepth) < ssaoRadius ? 1.0 : 0.0; occlusion += (sampleDepth <= samplePos.z + threshold ? 1.0 : 0.0) * rangeCheck; } occlusion = saturate(1 - (occlusion / kernelSize)); And current result: http://imgur.com/UX2X1fc
      I will really appreciate for any advice!
    • By isu diss
       I'm trying to code Rayleigh part of Nishita's model (Display Method of the Sky Color Taking into Account Multiple Scattering). I get black screen no colors. Can anyone find the issue for me?
       
      #define InnerRadius 6320000 #define OutterRadius 6420000 #define PI 3.141592653 #define Isteps 20 #define Ksteps 10 static float3 RayleighCoeffs = float3(6.55e-6, 1.73e-5, 2.30e-5); RWTexture2D<float4> SkyColors : register (u0); cbuffer CSCONSTANTBUF : register( b0 ) { float fHeight; float3 vSunDir; } float Density(float Height) { return exp(-Height/8340); } float RaySphereIntersection(float3 RayOrigin, float3 RayDirection, float3 SphereOrigin, float Radius) { float t1, t0; float3 L = SphereOrigin - RayOrigin; float tCA = dot(L, RayDirection); if (tCA < 0) return -1; float lenL = length(L); float D2 = (lenL*lenL) - (tCA*tCA); float Radius2 = (Radius*Radius); if (D2<=Radius2) { float tHC = sqrt(Radius2 - D2); t0 = tCA-tHC; t1 = tCA+tHC; } else return -1; return t1; } float RayleighPhaseFunction(float cosTheta) { return ((3/(16*PI))*(1+cosTheta*cosTheta)); } float OpticalDepth(float3 StartPosition, float3 EndPosition) { float3 Direction = normalize(EndPosition - StartPosition); float RayLength = RaySphereIntersection(StartPosition, Direction, float3(0, 0, 0), OutterRadius); float SampleLength = RayLength / Isteps; float3 tmpPos = StartPosition + 0.5 * SampleLength * Direction; float tmp; for (int i=0; i<Isteps; i++) { tmp += Density(length(tmpPos)-InnerRadius); tmpPos += SampleLength * Direction; } return tmp*SampleLength; } static float fExposure = -2; float3 HDR( float3 LDR) { return 1.0f - exp( fExposure * LDR ); } [numthreads(32, 32, 1)] //disptach 8, 8, 1 it's 256 by 256 image void ComputeSky(uint3 DTID : SV_DispatchThreadID) { float X = ((2 * DTID.x) / 255) - 1; float Y = 1 - ((2 * DTID.y) / 255); float r = sqrt(((X*X)+(Y*Y))); float Theta = r * (PI); float Phi = atan2(Y, X); static float3 Eye = float3(0, 10, 0); float ViewOD = 0, SunOD = 0, tmpDensity = 0; float3 Attenuation = 0, tmp = 0, Irgb = 0; //if (r<=1) { float3 ViewDir = normalize(float3(sin(Theta)*cos(Phi), cos(Theta),sin(Theta)*sin(Phi) )); float ViewRayLength = RaySphereIntersection(Eye, ViewDir, float3(0, 0, 0), OutterRadius); float SampleLength = ViewRayLength / Ksteps; //vSunDir = normalize(vSunDir); float cosTheta = dot(normalize(vSunDir), ViewDir); float3 tmpPos = Eye + 0.5 * SampleLength * ViewDir; for(int k=0; k<Ksteps; k++) { float SunRayLength = RaySphereIntersection(tmpPos, vSunDir, float3(0, 0, 0), OutterRadius); float3 TopAtmosphere = tmpPos + SunRayLength*vSunDir; ViewOD = OpticalDepth(Eye, tmpPos); SunOD = OpticalDepth(tmpPos, TopAtmosphere); tmpDensity = Density(length(tmpPos)-InnerRadius); Attenuation = exp(-RayleighCoeffs*(ViewOD+SunOD)); tmp += tmpDensity*Attenuation; tmpPos += SampleLength * ViewDir; } Irgb = RayleighCoeffs*RayleighPhaseFunction(cosTheta)*tmp*SampleLength; SkyColors[DTID.xy] = float4(Irgb, 1); } }  
    • By amadeus12
      I made my obj parser
      and It also calculate tagent space for normalmap.
      it seems calculation is wrong..
      any good suggestion for this?
      I can't upload my pics so I link my question.
      https://gamedev.stackexchange.com/questions/147199/how-to-debug-calculating-tangent-space
      and I uploaded my code here


      ObjLoader.cpp
      ObjLoader.h
    • By Alessandro Pozzer
      Hi guys, 

      I dont know if this is the right section, but I did not know where to post this. 
      I am implementing a day night cycle on my game engine and I was wondering if there was a nice way to interpolate properly between warm colors, such as orange (sunset) and dark blue (night) color. I am using HSL format.
      Thank  you.
    • By thefoxbard
      I am aiming to learn Windows Forms with the purpose of creating some game-related tools, but since I know absolutely nothing about Windows Forms yet, I wonder:
      Is it possible to render a Direct3D 11 viewport inside a Windows Form Application? I see a lot of game editors that have a region of the window reserved for displaying and manipulating a 3D or 2D scene. That's what I am aiming for.
      Otherwise, would you suggest another library to create a GUI for game-related tools?
       
      EDIT:
      I've found a tutorial here in gamedev that shows a solution:
      Though it's for D3D9, I'm not sure if it would work for D3D11?
       
  • Popular Now