Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Understanding the various BUILD xxx MATRIX4 commands

Author
Message
skyser
22
Years of Service
User Offline
Joined: 11th Sep 2003
Location: New York, NY
Posted: 26th Sep 2003 21:49
Could someone please tell me what some or all of these commands are good for and where/why you'd use RH vs. LH?

BUILD FOV LHMATRIX4
BUILD FOV RHMATRIX4
BUILD LOOKAT LHMATRIX4
BUILD LOOKAT RHMATRIX4
BUILD ORTHO LHMATRIX4
BUILD ORTHO RHMATRIX4
BUILD PERSPECTIVE LHMATRIX4
BUILD PERSPECTIVE RHMATRIX4
BUILD REFLECTION MATRIX4
BUILD ROTATION AXIS MATRIX4

Many thanks!

--skyser
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 26th Sep 2003 22:06
They're for shaders. Don't worry about them because outside of that they are pretty useless. As for whether one would use left handed versus right-handed matricies, that would depend on the coordinate system you are using. If you are using a right handed coordinate system them you would use rh. If you are using a lefthanded coordinate system, which I believe is the default for DBPro, then you would use LH.

I'm pressed for time right now so if you would like a detailed explaination of each just ask and I'll try to get around to it later.
The admiral
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 27th Sep 2003 02:05
Shaders? what are you going on about these are 3d maths commands not shader commands.

[href]www.vapournet.com/~flyer[/href]
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 27th Sep 2003 06:38
@The admiral

"Shaders? what are you going on about these are 3d maths commands not shader commands."

Shaders will frequently need information that only the 3d math commands can provide. How do you think the set effect constant matrix command works? You need to build the required matrix with one or more of the 3d math commands. There is simply no other way to provide a matrix to a shader without using the matrix commands in the 3d math set. Simple as that.

Login to post a reply

Server time is: 2026-07-25 07:01:09
Your offset time is: 2026-07-25 07:01:09