Fight happening base setup
This commit is contained in:
@@ -26,7 +26,6 @@ uniform float heightOffset : hint_range(0.0, 1.0);
|
||||
// With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this
|
||||
uniform float offset = 0;
|
||||
|
||||
|
||||
float getWind(vec2 vertex, vec2 uv, float time){
|
||||
float diff = pow(maxStrength - minStrength, 2.0);
|
||||
float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale;
|
||||
@@ -37,7 +36,7 @@ float getWind(vec2 vertex, vec2 uv, float time){
|
||||
|
||||
void vertex() {
|
||||
vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0);
|
||||
float time = TIME * speed + sin(float(INSTANCE_ID) * offset);
|
||||
//float time = TIME * speed + pos.x * pos.y ; not working when moving...
|
||||
//float time = TIME * speed + sin(float(INSTANCE_ID) * offset); // not working when moving...
|
||||
float time = (TIME + (pos.x * offset)) * speed;
|
||||
VERTEX.x += getWind(VERTEX.xy, UV, time);
|
||||
}
|
||||
Reference in New Issue
Block a user