Created
February 17, 2019 13:46
-
-
Save xDShot/49daa59485337ce0c7a26a61f0d3ee7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"VetexLitGeneric" | |
{ | |
"$basetexture" "your/animated/texture" | |
//Put your desired values here | |
// Edit these | |
$_totalframes 4 | |
$_framerate 2 //animatedTextureFrameRate | |
//Do not touch these | |
$frame 0 | |
$_frame 0 | |
$_frame_frac 0.00 | |
$_frame_int 0.00 | |
$_prevframe 0 | |
$_framecmp 0 | |
$_framecmpabs 0 | |
$_framecollision 0 | |
$_animatedtextureframe 0 | |
$_currentframe 0 | |
$_currenttime 0 | |
$_currenttime_frac 0.00 | |
$_currenttime_int 0 | |
$_noisevalue 0 | |
$_assignnoisevalue 0 | |
$_zero 0 | |
$_one 1 | |
$_two 2 | |
$_zeropointone 0.02 | |
"Proxies" | |
{ | |
"AnimatedTexture" | |
{ | |
animatedTextureVar "$basetexture" | |
animatedTextureFrameNumVar $_animatedtextureframe | |
animatedTextureFrameRate 2 // Must be same as $_framerate. Assigning value doesn't work | |
} | |
//Random value | |
"UniformNoise" | |
{ | |
minVal 1 | |
maxVal "$_totalframes" | |
resultVar "$_noisevalue" | |
} | |
//Increase over time | |
"LinearRamp" | |
{ | |
rate "$_framerate" | |
initialValue 1 | |
resultVar "$_currenttime" | |
} | |
// Frac part of currenttime | |
"Frac" | |
{ | |
srcVar1 "$_currenttime" | |
resultVar "$_currenttime_frac" | |
} | |
// Int part of currenttime | |
"Subtract" | |
{ | |
srcVar1 "$_currenttime" | |
srcVar2 "$_currenttime_frac" | |
resultVar "$_currenttime_int" | |
} | |
//Is it time to assign random value? | |
"LessOrEqual" | |
{ | |
srcVar1 "$_currenttime_frac" // if srcVar1 | |
srcVar2 "$_zeropointone" // <= srcVar2 | |
resultVar "$_assignnoisevalue" // resultVar = | |
LessEqualVar "$_one" // LessEqualVar | |
greaterVar "$_zero" // else resultVar = greaterVar | |
} | |
// It's time to assign random value, do it if needed | |
"LessOrEqual" | |
{ | |
srcVar1 "$_assignnoisevalue" // if srcVar1 | |
srcVar2 "$_zero" // <= srcVar2 | |
resultVar "$_frame" // resultVar = | |
LessEqualVar "$_frame" // LessEqualVar | |
greaterVar "$_noisevalue" // else resultVar = greaterVar | |
} | |
"Frac" //Frac part of frame | |
{ | |
srcVar1 "$_frame" | |
resultVar "$_frame_frac" | |
} | |
"Subtract" //Int part of frame | |
{ | |
srcVar1 "$_frame" | |
srcVar2 "$_frame_frac" | |
resultVar "$_frame_int" | |
} | |
Equals | |
{ | |
srcVar1 "$_frame_int" | |
resultVar "$frame" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment