Currently the vertex animation hook only operates on the model in local coordinates (eg, what was passed in to the shader). I chose to do it this way for simplicity. This is lacking in that vertex animations can't bypass how world coordinates are generated.
This update could do one of several things:
Add a second hook for morphing in world coordinates.
Make the morph swappable function be responsible for generating both the local and world coordinates.
I feel warmer towards option 2.
This relates to issue #64, because a heightmap prefab would likely not use a world matrix to produce world coordinates.
Tasks:
[ ] update simple.vert (possibly factor out "model_view" var)
[ ] update dynamic_glsl demo so the monkey heads bob up and down in the water
[ ] update dynamic_glsl demo so the trees sway gently in the wind
[ ] once satisfied with the changes, port to other standard shaders
Currently the vertex animation hook only operates on the model in local coordinates (eg, what was passed in to the shader). I chose to do it this way for simplicity. This is lacking in that vertex animations can't bypass how world coordinates are generated.
This update could do one of several things:
morph
swappable function be responsible for generating both the local and world coordinates.I feel warmer towards option 2.
This relates to issue #64, because a heightmap prefab would likely not use a world matrix to produce world coordinates.
Tasks: