Benjamin Loisch

  • Content count

  • Joined

  • Last visited

Community Reputation

137 Neutral

About Benjamin Loisch

  • Rank
  1. Hello! I am building a software rasterizer from scratch. I've decided to do clipping after multiplying the verticies by the  projection matrix (so clipping in homogeneous space). Now, I would also like to do texturing. I've looked at perspective correct texturing, but a question comes to my mind. You apply UV coordinates to a set of verticies in object space correct? Then you just pass these along till you get to the perspective correct texture mapping part. But, what about when you clip a set a verticies against a plane? Don't you have to linearly interpolate the uv coordinates when clipping those verticies so as to not let the final result look like a more and more squished texture against the side of the screen? Thanks. 
  2. HLSL mul() and row/column major matricies in directx

    hodgeman, buckeye, vstrahk, thnks for your help. I'm pretty sure I get it now. i used row_major in front of my float4x4 WVP matrix. i was able to send in my WVP matrix and have the mul(vertex, WVP) work just fine. I was also able to do mul(PtVtWt, vertex) and that worked just fine. PtVtWt being the reversed order matrix if you multiply with a column vector which mul(matrix, vector) does. 
  3. HLSL mul() and row/column major matricies in directx

      I am using xnamath and it's matrices. I believe they are stored row-major because I must transpose them before sending them to the vertex shader. Now, in my vertex shader I have to use mul(vertex, matrix) because with mathematical "row-major" you go from left to right that is, vertex * world * view * projection. I know I must transpose the wvp because hlsl accepts matrices in its column-major storage. 
  4. HLSL mul() and row/column major matricies in directx

    How can I send in the WVP matrix, not having to transpose it? 
  5. HLSL mul() and row/column major matricies in directx

    I am using xnamath, and I think this stores its matrices in row-major order. my view of w*v*p = (w*v*p)T is wrong when wondering if you could multiply pvw * vertex using column major. I am wondering now, why do I have to transpose the wvp matrix before sending to hlsl vertex shader? how does hlsl mul() function work, that is, how is mul(vertex, wvp) different from mul(wvp, vertex)? thanks
  6. I have my WVP matrix = World * View * Projection in direct3D. If directx stores its matrices in row major style, and the hlsl mul() function can have mul(vertex, matrix) as row major style multiplication, then why must I tranpose the directx matrix before sending to the hlsl vertex shader file? also, how can I have directx send in column major matrices and have those properly multiply out? I've tried WVP matrix = Projection * view * world and then sent that into the vertex shader which uses mul(wvp, vertex) which should be column major and it doesn't work! 
  7. Hello everyone! I would like some clear advise that will point me in the right direction for learning and programming 3D real-time computer graphics. First, let me describe my problem. My problem consists of jumping back and forth between working on understanding Direct3D and learning math, such as linear algebra, relating to 3D computer graphics. I'll start out by jumping into Direct3D and finding myself to deep attributing this to not knowing enough math. I'll then put all my focus into the math but soon get bored with it and I return to hacking away at Direct3D. Half my gut tells me to jump into Direct3D and keep plowing away at it while learning the math that is only necessary. I know I could continue on this path very well because I've made two ray tracers and my first (copy paste)Direct3D program by learning as I go (which seems to work out quite well, even though this method is very difficult). The other half of my gut tells me there is so much essential math I am missing out on and that I should just focus on learning linear algebra and other math's for several months. Just so you know, I'm a freshman in college, am comfortable with beginner - intermediate programming in C++, and I have beginner knowledge in 3D math. I hope you get the gist of my confusion here! Your advice at this time is invaluable to me as I have potential but need direction!
  8. Are your skills better than mine?

    Competition! Nothing gets me more riled up than that word...and programming. Well, that's why I'm here at this website asking questions! I'm 18 and started programming a couple of years ago. I haven't reached college yet, so I'm wondering what I'm up against in terms of skills of other young programmers. To me, programming is a race, and skills are what help you win it. I'd love to know more specifically what you 3D graphics programmers have made. I've personally made 2 ray tracers in C++ and Python, and a simple Direct3D maze game. What about you? -Ben   Attached is a few pictures of some images from my ray tracer.
  9. Is it better to have well structured code that takes 5 hours in time to make, than have spagetti code that takes 30 mins to pump out? Is it better to become well versed in a particular(or broad) area of study, and then go in and tackle a project, or just learn as you go? I'm wondering, what do YOU guys think are the best ways to learn how to code? btw, for me, it's learning Direct3D right now! :D
  10. I've learned some C++, I've learned some SDL, and am now understanding DirectX 11. But I know I can't possible learn it ALL..... When I think of the pro's, the experienced, the people who use their incredible skills of math and programming to make video games, I sometimes wonder, just how did they make it there? And knowing how they've made it there, just how good are they? These questions I hope will give me an idea to just how smart I should get in order to become a more sucsessull programmer in the future! So hbu? How much do you know? :D