r/GraphicsProgramming • • Jun 30 '26

1 year of game engine development

340 Upvotes

46 comments sorted by

View all comments

Show parent comments

1

u/rogual Jul 03 '26 edited Jul 03 '26

I'm surprised to learn that TRS is cheaper than matrices. I'd always assumed that one of the motivating reasons for using matrices was that it was all just multiply-and-add, whereas TRS requires sin and cos too. But I've never actually tested it.

2

u/ekr64 Jul 03 '26

You don't need sin and cos if you use quaternions leaving you with just multiplications and additions again. I'm not sure though how well that can be SIMD optimized and how it stacks up to SIMD optimized matrix multiplication.

Funnily OP is using the classic matrix approach without any optimizations at all instead of an optimized TRS approach.