krauthaufen/FShade

M44d.TransformPosProj

Closed this issue · 7 comments

It might be convenient also translate M44d.TransformPosProj to an appropriate shader code (like we already do with TransformDir and other).

let p = uniform.ProjTrafo.TransformPosProj someVec3

Isn't the implementation in your commit wrong? Or did i miss the w-division?

Should be there. Maybe you looked at the -Full variant in Compiler.fs? TransformPosProj is implemented at expression level in Shader.fs.

But the full variant should also divide by w right?

The Aardvark.Base implementation does not do the division.

Okay, didn't know that, but TransformPosProjFull is then identical to m * V4d(arg, 1.0) right?

Yeah, it's identical.

I also find the name misleading, it should only be TransformPosFull.