[QUOTE=Anddos;24668300]I was just thinking the inverse of view is worldspace ,so perhaps i could render from an offset off that?[/QUOTE]
Calculating a general matrix inverse is really, [i]really[/i] expensive. Avoid it when you can.
what do you mean by expensive, i dont see any fps drop
Maybe not you, but others might. It takes a lot of computation.
what do you think to that camera class?, is it the right way to go for a fps type game?
[QUOTE=Anddos;24669134]what do you think to that camera class?, is it the right way to go for a fps type game?[/QUOTE]
The camera is fine. Did you write it yourself, or are you borrowing it from a tutorial? It seems like you don't totally understand what it's doing.
I understand that matrix operations are not at all intuitive for most people. I've been working with them for a while now, and half the time my coding process when working with matrices still degenerates into guess-and-check. However, you should at least put some effort into trying the solution I've listed. You'll learn a lot by trying a few things on your own.
[QUOTE=Anddos;24668656]what do you mean by expensive, i dont see any fps drop[/QUOTE]
You won't see a huge difference from [i]one[/i] matrix inversion. Just don't make it a habit. In this case, it can be easily avoided, so you shouldn't really use it.
If you do it per-object on a complex scene, you'll probably see a pretty significant decrease in performance.
Also, it'll probably run slower on machines with more limited SIMD instruction sets, assuming Direct3D does SIMD optimization for matrix math.
[editline]08:29PM[/editline]
Also, you realize that by applying the matrix inverse, you're just turning the current matrix back into the identity matrix, right? You're literally doing like dozens of floating point operations just to set the matrix to a known, constant value.
[quote]
Also, you realize that by applying the matrix inverse, you're just turning the current matrix back into the identity matrix, right? You're literally doing like dozens of floating point operations just to set the matrix to a known, constant value.
[/quote]
well i understand when you inverse the matrix you are taking 1 step back in the pipe line so
objectspace > worldspace > viewspace > projectedspace
so the inverse of viewspace is worldspace , the inverse of (world * view) , would be objectspace right?
[QUOTE=Anddos;24672466]well i understand when you inverse the matrix you are taking 1 step back in the pipe line so
objectspace > worldspace > viewspace > projectedspace
so the inverse of viewspace is worldspace , the inverse of (world * view) , would be objectspace right?[/QUOTE]
You don't invert a space. You invert a matrix. The inverse with matrix math is just like the inverse in anything else.
If you have the matrix [I]A[/I], its inverse [I]A'=A^-1[/I], and the vector [I]a⃗[/I], then:
[I]A'Aa⃗ = a⃗[/I]
[I]A'A =
[1 0 0]
[0 1 0]
[0 0 1][/I]
If you multiply a matrix with its multiplicative inverse, you get the identity.
Just as with the normal multiplicative inverse:
[I]x' = x^-1 = 1/x[/I]
[I]x'*x = x/x = 1[/I]
If you multiply the scalar [I]x[/I] with it's multiplicative inverse, you get the multiplicative identity [I]1[/I].
I am afraid you have confused me
I am going to recommend that you use OpenGL, its crossplatform (even runs on android) and its opensource
[QUOTE=CountNoobula;24687295]I am going to recommend that you use OpenGL, its crossplatform (even runs on android) and its opensource[/QUOTE]
Actually most OpenGL implementations are closed source.
take a look at System FLL, its a heavy wip, but that is a project im writing off opengl, works like a dream
[editline]05:15PM[/editline]
[URL=http://pro.dylanvorster.com/]link[/URL]
[QUOTE=Overv;24687539]Actually most OpenGL implementations are closed source.[/QUOTE]
I think he meant it was an "open standard".
[QUOTE=CountNoobula;24687295]I am going to recommend that you use OpenGL, its crossplatform (even runs on android) and its opensource[/QUOTE]
I am going to recommend he sticks with directX.
It's the industry standard and it's very well documented.
I don't want an argument here. Just let the man use what he wants, because frankly a quarter of the programming forum could argue all day on the matter.
[QUOTE=Jallen;24688850]It's the industry standard and it's very well documented.[/QUOTE]
They're both industry standards, and OpenGL is a very valid alternative for what he wants to do.
However, telling someone to switch to OpenGL in a Direct3D thread is totally and completely asinine.
[QUOTE=Jallen;24688850]I am going to recommend he sticks with directX.
It's the industry standard and it's very well documented.
I don't want an argument here. Just let the man use what he wants, because frankly a quarter of the programming forum could argue all day on the matter.[/QUOTE]
The point is that DirectX shouldn't be the industry standard. If it is, there won't be games for platforms other than Windows, and to be honest, that's the only reason I can even see for getting Windows nowadays. To play games I've bought. Because, you know, they use DirectX and can't run on my Linux distro of choice.
Not to mention I've found OpenGL, especially from 3.0 up, to be fairly easy and intuitive, even with all that stuff with the shaders.
[QUOTE=ROBO_DONUT;24688905]They're both industry standards, and OpenGL is a very valid alternative for what he wants to do.
[B]However, telling someone to switch to OpenGL in a Direct3D thread is totally and completely asinine.[/B][/QUOTE]
Yeah, that was my point. I was just trying to show that there are two sides to the argument and that his suggestion wasn't an appropriate one.
[QUOTE=Jallen;24688850]I am going to recommend he sticks with directX.
It's the industry standard and it's very well documented.
I don't want an argument here. Just let the man use what he wants, because frankly a quarter of the programming forum could argue all day on the matter.[/QUOTE]
It's kind of stupid to voice your opinion, and then say "but hey I don't want an argument".
Just say to let him use what he wants.
[QUOTE=Jawalt;24699752]It's kind of stupid to voice your opinion, and then say "but hey I don't want an argument".
Just say to let him use what he wants.[/QUOTE]
thanks i didnt know anything about stuff jawalt you are very useful :downs:
But seriously, there was no argument afterwards, are you [I]trying[/I] to cause one? My point was to show that there are two sides of the argument, not just "OpenGL is better".
Sorry, you need to Log In to post a reply to this thread.