Jump to content

  • Log In with Google      Sign In   
  • Create Account


CoffeeandCode

Member Since 18 Apr 2013
Offline Last Active Jun 29 2014 01:35 AM
-----

#5148251 Custom view matrices reduces FPS phenomenally

Posted by CoffeeandCode on 19 April 2014 - 05:40 PM

whereas the GPU will need to do it per vertex.


If your graphics drivers are any good, it will only do the multiplication once. If your driver can't perform this optimization, switch gpu vendor.


#5148241 Custom view matrices reduces FPS phenomenally

Posted by CoffeeandCode on 19 April 2014 - 05:13 PM

So each time I translate() an object, or manipulate any of these matrices, all 5 are uploaded to my Uniform Buffer Object on the GPU.


You can't be doing this, its too expensive.

If you modify a model matrix, don't update your projection matrix just for shits and giggles, that's inefficient and a huge performance drop. Imagine how many times per second you are doing that!

Instead, figure out the offset of each matrix into the buffer and store those indices then whenever you NEED to do an operation, map the buffer and modify the matrix based on one of those indices.

Also, instead of working out the model view proj matrix on the CPU, do the multiplication in your shader. GPUs are far better at matrix multiplication in almost any situation.


#5113931 possible to have opengl in a command line program?

Posted by CoffeeandCode on 02 December 2013 - 09:41 PM

What exactly is the question? How to open up a context or how to send the render over tcp/ip?




PARTNERS