Page 5 of 5

Re: Re:

Posted: Thu Jul 26, 2012 1:13 pm
by CTZn
galinette wrote:
CTZn wrote:Seriously what are the fourth line and column for ?
Homogeneous coordinates. An application of a math object known as "projective spaces". Hyper-useful for rasterized 3D.

For making it short, it generalizes the transformation matrix to translations, frustum projections, etc... using a 4x4 matrix. You can combine all the transformations (rotaton, scaling, skew, translation, perspective, etc...) just by multiplying 4x4 matrices, and with the resulting 4x4 matrix you have a transformation that will change object-local vertex coordinates into screen space coordinates in one matrix-vector multiplication. Isn't that magic?
I suppose that the column/row defining perspective/frustum is the one not used by translation... matrices have simply an overhelming amount of properties, that's totally flipping. Dark magic I'm out :D

Whatever the word play is about Headroom I abide by. I'm just getting a better notion of the properties of multiplications...

You should know that it took me about one week to get this guy right:

Code: Select all

periodX = fract(
			paramTilesX() * texi() + paramMortarWidth() / 2.0
		) / paramMortarWidth() * 3.14159265
8) :lol:

What it does is to insert half a sin wave between two tiles whatever their spacing is. I should have asked for help much earlier, every day I was certain it would be the day I'd crack it... madness.

Re: Guide For Exporter Writers

Posted: Thu Jul 26, 2012 1:50 pm
by CTZn
Having typed this I'm finding out that

Code: Select all

(b * (2.0 * b) * 50.0) * eva(pos)
is throwing an error while

Code: Select all

eva(pos)*(b * (2.0 * b) * 50.0)
doesn't.

Lol ?

Re: Guide For Exporter Writers

Posted: Thu Jul 26, 2012 9:12 pm
by fused
CTZn wrote:Having typed this I'm finding out that

Code: Select all

(b * (2.0 * b) * 50.0) * eva(pos)
is throwing an error while

Code: Select all

eva(pos)*(b * (2.0 * b) * 50.0)
doesn't.

Lol ?
The operator is defined as mul(vec3, float) so it expects arguments in that order :)

Re: Guide For Exporter Writers

Posted: Fri Jul 27, 2012 1:44 am
by CTZn
fused wrote:
CTZn wrote:Having typed this I'm finding out that

Code: Select all

(b * (2.0 * b) * 50.0) * eva(pos)
is throwing an error while

Code: Select all

eva(pos)*(b * (2.0 * b) * 50.0)
doesn't.

Lol ?
The operator is defined as mul(vec3, float) so it expects arguments in that order :)
Yup I figured that out quickly but I would not tell, I found the fact funny in this context of mathematisches war fog !

What's Headroom's joke really about ?