Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Odd world matrix behaviour


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 Naruto-kun   Members   -  Reputation: 358

Like
0Likes
Like

Posted 07 May 2014 - 01:46 PM

Hi guys

 

I am having some odd problems generating a topdown view of some point sprites in a radar simulation here.

 

The first image is how things should be. It was generated by using the D3DXVec3Transform function in C++ on each point with the World matrix. The results were then saved to a file, and then the file was used to plot the display using GDI+ with the origin of the plot (iow 0, 0, 0) at the red dot. The world matrix was not transposed when this was done.

 

Clouds_zps110a5e93.jpg

 

However, if I try to do the same using the mul function in the geometry shader in DX11, without transposing the world matrix, this is what I get:

 

radar_zpsb10931f3.png

 

Transposing the world matrix, either on shader, or on the C++ side before sending it to the shader doesn't help either. As you can see in the above image, there is some sort of repetition going on. Transposing removes that repetition, leaving a single block in the center of the display, but with 2 solid white lines extending from the center up and to the right on X and Y axis.

 

I have verified that when I send the world matrix to the shader, all the elements are being loaded and are going through. This leads me to question how the shader is performing the translation. Any ideas?

 

Thanks

JB



Sponsor:

#2 Krohm   Crossbones+   -  Reputation: 3509

Like
0Likes
Like

Posted 08 May 2014 - 01:19 AM

When you say you have verified the values are "going through" do you mean you had a debugger stepping in and checking the values are correct? Perhaps even a debug output buffer pulling out the values?

Are you really really sure you're uploading to the correct buffer offset? That could explain the solid lines.

Keep in mind the geometry shader runs after VS so if the VS is not passthrough you'll have to upload it a different matrix.



#3 Naruto-kun   Members   -  Reputation: 358

Like
0Likes
Like

Posted 08 May 2014 - 05:51 AM

I am using the ID3DX11Effect system so I don't run into constant buffer issues.

 

If I call GetMatrix on the ID3DX11EffectMatrixVariable object for my world matrix and then compare between the returned array and the array I sent to the shader, they are the same.

 

I cant use shader debuggers like pix or VS2012 unfortunately...the process is running DX9 as well and it appears they cant handle 2 different versions of DX in the same process.


Edited by Naruto-kun, 08 May 2014 - 05:52 AM.


#4 kauna   Crossbones+   -  Reputation: 2888

Like
0Likes
Like

Posted 11 May 2014 - 04:33 PM

Can you show some shader and c++ code?

 

Cheers!






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.



PARTNERS