grapefrukt @grapefrukt.com · Mar 25

i'm doing camera matrix crimes in unity, but when i manually set the view and projection matrices for my render pass i get (very similar but) wrong values. what's going wrong here?

3 likes 3 replies

?

Replies

grapefrukt · Mar 25

i need to render a thing as if viewed from another camera, but doing an overlay is killing performance, so i'm messing with the camera matrix. but, as a first step i'm trying to replicate the normal matrix, so these values should be the same and they're not?

Sos "Buy Lazy Kickers" Sosowski · Mar 25

Multiplication order?

Freya Holmér · Mar 25

are you supplying the gpu style matrices or the cpu ones? iirc the view matrix is Z is forward on the cpu side, but Z is backwards gpu side (there's a built-in function somewhere for getting the gpu representation)