dilevin / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
2 stars 5 forks source link

test-02 weird translations #14

Closed alexei-zolotarevschi closed 5 years ago

alexei-zolotarevschi commented 5 years ago

I was getting wonky behavior in test2, so I messed around with my model.glsl to only apply 1 transformation to the moon at a time, and translating seems to be the culprit. I compared the matrix to the slides and am pretty sure that translate.glsl is correct. Does this look familiar to anyone? Untitled Untitled1

AllenLXL commented 5 years ago

Have you try to add transpose to translation matrix? Glsl is using col-major order.

alexei-zolotarevschi commented 5 years ago

Worked like a charm, thanks. Not sure how I haven't noticed this before.