Skip to content

Commit

Permalink
Merge pull request #11317 from Corollarium/vat
Browse files Browse the repository at this point in the history
Baked vertex animation textures
  • Loading branch information
sebavan authored Nov 4, 2021
2 parents c380bc7 + 467fe4c commit b6c214f
Show file tree
Hide file tree
Showing 46 changed files with 836 additions and 166 deletions.
1 change: 1 addition & 0 deletions dist/preview release/what's new.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add support for up to 6 uv sets in the standard, PBR and node materials ([Popov72](https://github.com/Popov72))
- Added GUI Editor to easily build GUI controls ([msDestiny14](https://github.com/msDestiny14))
- Added support for Order Independent Transparency on simple scenes. `scene.useOrderIndependentTransparency = true` now makes transparent meshes shade correctly when stacked onto each other. ([CraigFeldspar](https://github.com/CraigFeldspar))
- Added vertex animation textures with `BakedVertexAnimationManager` ([brunobg](https://github.com/brunobg), [Popov72](https://github.com/Popov72), [raggar](https://github.com/raggar))

## Updates

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/cell/cell.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -53,6 +54,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/fire/fire.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -53,6 +54,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/fur/fur.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
uniform float furLength;
Expand Down Expand Up @@ -73,6 +74,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

//FUR
float r = Rand(position);
Expand Down
4 changes: 3 additions & 1 deletion materialsLibrary/src/gradient/gradient.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec2 uv2;
attribute vec4 color;
#endif
#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -45,7 +46,8 @@ varying vec4 vColor;

void main(void) {
#include<instancesVertex>
#include<bonesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/lava/lava.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -166,6 +167,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

#ifdef NORMAL
// get a turbulent 3d noise using the normal, normal to high freq
Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/mix/mix.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -50,6 +51,7 @@ varying vec4 vColor;
void main(void) {
#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/normal/normal.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -48,6 +49,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/shadowOnly/shadowOnly.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ attribute vec3 normal;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -38,6 +39,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/simple/simple.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -53,6 +54,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/terrain/terrain.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -50,6 +51,7 @@ varying vec4 vColor;
void main(void) {
#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/triPlanar/triplanar.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -55,6 +56,7 @@ void main(void)

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);

Expand Down
2 changes: 2 additions & 0 deletions materialsLibrary/src/water/water.vertex.fx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ attribute vec4 color;
#endif

#include<bonesDeclaration>
#include<bakedVertexAnimationDeclaration>

// Uniforms
#include<instancesDeclaration>
Expand Down Expand Up @@ -74,6 +75,7 @@ void main(void) {

#include<instancesVertex>
#include<bonesVertex>
#include<bakedVertexAnimation>

vec4 worldPos = finalWorld * vec4(position, 1.0);
vPositionW = vec3(worldPos);
Expand Down
Loading

0 comments on commit b6c214f

Please sign in to comment.