Pages: « 1 2
  Print  
Author Topic: Need Help Creating 2D Shadow Casting (e.g. Teleglitch)  (Read 5127 times)
Offline (Male) Goombert
Reply #15 Posted on: August 07, 2013, 04:08:12 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
True, Harri, but what I find interesting, why you have to do the +1 with the other projection functions, it seems like you should be able to flip the upvector around to make it work.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #16 Posted on: August 07, 2013, 08:10:26 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
I guess you could. I didn't really test it (I forgot what the last 3 arguments did), so I just thought about it like a "point_to" function. So point from x,y,z to x,y,z+1, which just mean point in the positive z direction and that is just straight down (or the reverse, I can't even remember if the axis was in positive or negative z direction in OpenGL).
Logged
Offline (Male) Goombert
Reply #17 Posted on: August 07, 2013, 09:21:12 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
I don't know, I was just doing the same thing the other day though when working on D3D9 sprites to see if I could do transforms on them to make them billboards. Direct3D and OpenGL though require the same transformation to an ortho projection to make it not be flipped upside down. I think that is dumb they should just do it by default, especially when the sprite and 2D transform functions work the correct way, eg. render targets and surfaces too.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: « 1 2
  Print