fix it by transposing the model matrix

This commit is contained in:
nek0 2023-05-12 14:56:02 +02:00
parent 526b9ba281
commit 455124021f

View file

@ -323,10 +323,10 @@ pokeData frame frameNumber sceneParameters cameraParameters = do
V.mapM_ V.mapM_
(\(index, obj) -> do (\(index, obj) -> do
let modelMatrix = GPUObjectData (objectMatrix obj) let modelMatrix = GPUObjectData (transpose $ objectMatrix obj)
liftIO $ poke liftIO $ poke
(objectPointer `plusPtr` (index * sizeOf (undefined :: GPUObjectData))) (castPtr objectPointer `plusPtr` (index * sizeOf (undefined :: GPUObjectData)))
modelMatrix modelMatrix
) )
(V.zip (V.zip