Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
undev-studio committed Nov 25, 2024
1 parent cd9de1c commit b5fe59e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const
render = op.inTrigger("Render"),
inArea = op.inValueSelect("Area", ["Everywhere", "Sphere", "Box"], "Everywhere"),
inMethod = op.inValueSelect("Method", ["Point", "Direction", "Collision", "Rotate"], "Point"),
inMethod = op.inValueSelect("Method", ["Point", "Direction", "Collision", "Rotate","Vortex"], "Point"),
inInvArea = op.inBool("Invert Area", false),
inStrength = op.inFloat("Strength", 1),
inSize = op.inFloat("Size", 1),
Expand Down Expand Up @@ -115,6 +115,7 @@ function updateDefines()
velAreaSys.bgShader.toggleDefine("METHOD_DIR", inMethod.get() == "Direction");
velAreaSys.bgShader.toggleDefine("METHOD_COLLISION", inMethod.get() == "Collision");
velAreaSys.bgShader.toggleDefine("METHOD_ROTATE", inMethod.get() == "Rotate");
velAreaSys.bgShader.toggleDefine("METHOD_VORTEX", inMethod.get() == "Vortex");

velAreaSys.bgShader.toggleDefine("HAS_TEX_MUL", inTexMultiply.isLinked());
velAreaSys.bgShader.toggleDefine("INVERT_SHAPE", inInvArea.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ void main()



#ifdef METHOD_VORTEX
// if(length(direction)>0.0)
// col.xyz+=normalize(direction)*finalStrength3;

vec3 np= vec3( -(pos.xyz+areaPos).y, (pos.xyz+areaPos).x ,(pos.xyz+areaPos).z) / dot(pos.xyz,pos.xyz); // field around a vortex

col.xyz+=(pos.xyz-np)*strength;

#endif




#ifdef METHOD_POINT
col.xyz+=normalize(pos.xyz-areaPos)*finalStrength3;
#endif
Expand Down

0 comments on commit b5fe59e

Please sign in to comment.