Its on its way! If anyone wants to see what gpu code can look like (this drone is gpu accellerated.) heres what mine does-> (its the whole robot update read and write)
its finished on my computer now, but things are left out of this one so its nonrunnable.
DRONE_KEY run_drone(DRONE& drone)
{
DRONE_KEY key;
memset(&key,0,sizeof(DRONE_KEY));
SRV views[1000];
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// SHITTY 3D SENSE (i dont think you want to use this for now, just pass it a depth map.)
//
views[0]=drone.retina_srv;
RunComputeShader(dc, drone_sobel, 1, views, nullptr, nullptr, 0, drone.sobel_retina_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
views[0]=drone.sobel_retina_srv;
RunComputeShader(dc, drone_blur_sobel, 1, views, nullptr, nullptr, 0, drone.blur_sobel_retina_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
views[0]=drone.sobel_retina_srv;
views[1]=drone.blur_sobel_retina_srv;
RunComputeShader(dc, drone_tune_blur_sobel, 2, views, nullptr, nullptr, 0, drone.tune_blur_sobel_retina_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
//then just leave the 3d there for now.
//basic "depth green screen" so the foreground is mostly separate from the back, but it makes blunders.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// EYE (1st near neighbour solution!)
//
int i;
for(i=0;i<drone.lods;i++)
{
views[0]=drone.retina_srv;
RunComputeShader(dc, drone_make_eye_keys, 1, views, nullptr, nullptr, 0, drone.eyekeys_uav[i], (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
}
for(i=0;i<drone.membanks_eye;i++){views[i]=drone.eyemem_srv[i];};
for(i=0;i<drone.lods;i++)
{
views[i+1]=drone.eyekeys_srv[i];
}
RunComputeShader(dc, drone_jumble_match_eye_keys, drone.lods+1, views, nullptr, nullptr, 0, drone.class_map_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
//suppress the output map.
views[0]=drone.class_map_srv;
RunComputeShader(dc, drone_suppress_eye_keys, 1, views, nullptr, nullptr, 0, drone.class_map_suppressed_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
//form the word keys.
views[0]=drone.class_map_suppressed_srv;
RunComputeShader(dc, drone_make_phrases, 1, views, nullptr, nullptr, 0, drone.phrase_keys_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
//run the soft body word router. //then you class it, MAN, WOMAN, PRIMO & PRIMA
views[0]=drone.phrase_keys_srv;
RunComputeShader(dc, drone_match_phrases, 1, views, nullptr, nullptr, 0, drone.phrase_map_uav, (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
for(i=0;i<drone.lods;i++)
{
//form the environment keys. suppress the words off one at a time.
views[0]=drone.phrase_map_srv;
RunComputeShader(dc, drone_suppress_phrases, 1, views, nullptr, nullptr, 0, drone.suppressed_phrase_map_uav[0][i], (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
}
//keep a history chain, at some point back
for(i=drone.divergences-2;i>=0;i--){memcpy(&drone.motorkey_history[i+1],&drone.motorkey_history[i],sizeof(DRONE_KEY));}
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// MOTOR (huge population over time!)
//
views[0]=drone.phrase_keys_srv;
uint j;
for(j=0;j<drone.lods;j++) //add the j dimension
{
for(i=0;i<drone.membanks_motorsensor;i++){views[1+i]=drone.motorsensormem_srv[0][i][j];}
for(i=0;i<drone.membanks_sensormotor;i++){views[1+i+drone.membanks_motorsensor]=drone.motorsensormem_srv[1][i][j];}
RunComputeShader(dc, drone_run_pop, 1, views, nullptr, nullptr, 0, drone.blended_motor_key_uav[0], (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// SENSOR MOTOR MEMS. and output key.
//
//write new motor key, to environment keys. //U HAVE TO TRUNCATE IT FOR EACH LOD MEMORY.
for(i=0;i<drone.lods;i++){views[i]=drone.suppressed_phrase_map_srv[i];}
for(i=0;i<drone.membanks_motorsensor;i++){views[drone.lods+i]=drone.motorsensormem_srv[0][i];}
RunComputeShader(dc, drone_run_pop, 1, views, nullptr, nullptr, 0, drone.blended_motor_key_uav[0], (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
//write old environment keys to new motor key //U DO IT FOR LODS.
views[0]=drone.phrase_map_srv;
for(i=0;i<drone.membanks_motorsensor;i++){views[1+i]=drone.motorsensormem_srv[0][i];}
RunComputeShader(dc, drone_run_pop, 1, views, nullptr, nullptr, 0, drone.blended_motor_key_uav[0], (1<<drone.logretina)/32, (1<<drone.logretina)/32, 1 );
//
//keep history.
for(i=0;i<drone.lods;i++){dc->CopyResource(drone.suppressed_phrase_map[1][i],drone.suppressed_phrase_map[0][i]);}
dc->CopyResource(drone.blended_motor_key[1],drone.blended_motor_key[0]);
//troublesome VIDEO to SYSTEM copy.
ID3D11Buffer* debugbuf = CreateAndCopyToDebugBuf( g_pDevice, g_pContext, drone.blended_motor_key[0]);
D3D11_MAPPED_SUBRESOURCE MappedResource;
BufType *p;
g_pContext->Map(debugbuf,0,D3D11_MAP_READ,0,&MappedResource );
p = (BufType*)MappedResource.pData;
memcpy(&key,p,sizeof(DRONE_KEY)); //not right. its wrong.
g_pContext->Unmap(debugbuf, 0);
SAFE_RELEASE( debugbuf );
//OUTPUT MOTOR
return key;
}