Jump to content

  • Log In with Google      Sign In   
  • Create Account

myers80

Member Since 13 Jun 2008
Offline Last Active Oct 16 2013 11:54 AM

#5084428 Using genetic algorithms to 'train' my AI

Posted by myers80 on 09 August 2013 - 10:51 AM

Interesting project; I like GAs.  I didn't see it mentioned in your blog, but are you using elitism?  That is, letting your best performer(s) through to the next generation unaltered?  It's a good way to ensure you don't lose your best candiates to a bad crossover.




#5034822 Unix/Mac equivalent to GetKeyboardLayoutName?

Posted by myers80 on 20 February 2013 - 07:53 PM

A bummer that Linux does not make it easy.  I will continue to look into it and report back if I figure it out.  Thanks for the reply.




#4832038 How to Setup DirectX with Visual C++ 2010

Posted by myers80 on 06 July 2011 - 07:33 PM

Ok I got to step 2 Posted Image there is no Property Manager under View. I'm using the Express Edition btw if that has anything to do with it.


I'm not sure how to set it up for all future projects like the post above was doing, but to set it up for one project.

1. View -> Solution Explorer
2. Right click on the project name in the solution explorer and select properties
3. Under configuration properties select VC++ directories
4. You will need to have this point to both the include and library directories of the DirectX SDK you downloaded.


#4829651 [DX11] Shader not getting all instanced data

Posted by myers80 on 30 June 2011 - 10:56 AM

Edit: I just fixed it. In case anyone is curious the fix was, for polygonLayout[2] the AlignedByteOffset needs to be set to 12, since polygonLayout[1] is 12 bytes.

I have a simple shader that paints the pixels a color, and I'm trying to get this to work with instancing. My vertex layout contains the vertex position, the instanced object's position, and the instanced object's color. The objects appear in the correct position on the screen, so the instanced object's position is getting read correctly, however the color is not correct. My first thought is that I'm am incorrectly creating the vertex layout. Is this the correct way to do it for what I want?

  // Create the vertex input layout description.
  D3D11_INPUT_ELEMENT_DESC polygonLayout[3];
	polygonLayout[0].SemanticName = "POSITION";
	polygonLayout[0].SemanticIndex = 0;
	polygonLayout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
	polygonLayout[0].InputSlot = 0;
	polygonLayout[0].AlignedByteOffset = 0;
	polygonLayout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
	polygonLayout[0].InstanceDataStepRate = 0;

	polygonLayout[1].SemanticName = "TEXCOORD";
	polygonLayout[1].SemanticIndex = 0;
	polygonLayout[1].Format = DXGI_FORMAT_R32G32B32_FLOAT;
	polygonLayout[1].InputSlot = 1;
	polygonLayout[1].AlignedByteOffset = 0;
	polygonLayout[1].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA;
	polygonLayout[1].InstanceDataStepRate = 1;

	polygonLayout[2].SemanticName = "TEXCOORD";
	polygonLayout[2].SemanticIndex = 1;
	polygonLayout[2].Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
	polygonLayout[2].InputSlot = 1;
	polygonLayout[2].AlignedByteOffset = 0;
	polygonLayout[2].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA;
	polygonLayout[2].InstanceDataStepRate = 1;

And inside my vertex shader the structure is,

struct VS_INPUT {
float4 position : POSITION;
float3 instPos : TEXCOORD0;
float4 instColor : TEXCOORD1;
};


PARTNERS