World to Object matrix in custom shaders

In custom shaders we use uniform mat4 matrix_model; for model matrix (or Object to World matrix).

What variable is for world matrix (World to Object matrix)? matrix_world or matrix_object isn’t working

Maybe you could try using the inverse function to create the matrix?

mat4 matrix = inverse(matrix_model);

I don’t know if there is any build in matrix.

I don’t think there is one, here’s what engine sets up

2 Likes