From 48a44f3cdd53a2bac7fe85168f61f8547b088a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Thu, 14 Nov 2024 21:58:44 -0500 Subject: [PATCH] [geom filter] Improve default script --- src/plugins/score-plugin-gfx/Gfx/GeometryFilter/Process.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/score-plugin-gfx/Gfx/GeometryFilter/Process.cpp b/src/plugins/score-plugin-gfx/Gfx/GeometryFilter/Process.cpp index 74ae18309d..549c0530bc 100644 --- a/src/plugins/score-plugin-gfx/Gfx/GeometryFilter/Process.cpp +++ b/src/plugins/score-plugin-gfx/Gfx/GeometryFilter/Process.cpp @@ -69,14 +69,16 @@ static const auto defaultGeometryFilter = QStringLiteral(R"_(/*{ { "NAME": "intensity", "TYPE": "float", - "DEFAULT": 1. + "DEFAULT": 1., + "MIN": 0., + "MAX": 1., } ] }*/ void process_vertex(inout vec3 position, inout vec3 normal, inout vec2 uv, inout vec3 tangent, inout vec4 color) { - position.xyz *= this_filter.intensity + 10. * sin(gl_VertexIndex); + position.xyz += this_filter.intensity + 10. * sin(TIME * 0.001 * gl_VertexIndex); } )_"); Process::ScriptChangeResult Model::setScript(const QString& f)