Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

read a texture with directx 10 in c++

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 the dodger uk   Members   

148
Like
0Likes
Like

Posted 27 February 2013 - 05:17 AM

i want to read in a perlin noise map  or height map , but  in the c++ side of directx

 

and  use the information in the map , to initilise particles,

 

so  i would read in map

 

width , height

 

 

for ( int width = 0 ; i < maxWidth ; i++)

{

     for ( int height= 0 ; j < maxhieght ; j++)

     {

         if ( texture[i][j].alphaAmount >0.5)

               CreateParticle(i,j);

      }

 

}

 

 

this is what i want to do , but cant see any code that will allow me , to do  this 

 

what i need to know is how to read the texture in  and the correct mannor


Edited by the dodger uk, 27 February 2013 - 06:30 AM.


#2 Yourself   Members   

1937
Like
0Likes
Like

Posted 27 February 2013 - 05:50 AM

Is the perlin noise texture updated on the gpu ?

if not, don't use a texture (calculate the noise on the fly or use a look-up array).

 

if it is updated on the gpu, use the map methond to read the content of the texture.



#3 Nyssa   GDNet+   

691
Like
0Likes
Like

Posted 27 February 2013 - 06:07 PM

This page has an example of reading a texture from the CPU side.



#4 the dodger uk   Members   

148
Like
0Likes
Like

Posted 28 February 2013 - 01:48 PM

thank you 






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.