Gazebo | Ignition | Community
Ask Your Question

How to pass parameters to vertex shader at runtime

asked 2023-05-05 13:41:57 -0500

jrtg gravatar image

The ShaderParam plugin can be used to define shader parameters in the sdf file. However, except for the 'time' variable, these are all constant values.

What is the preferred way to set such variables during runtime?

E.g. for the deformable sphere example: let's say we want to change color of the sphere at runtime, based on user input. How could this be done?

Is there a way to do this on a per-model basis? E.g. if you'd spawn multiple of those spheres, change the color of a specific one.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-06-02 06:36:44 -0500

jrtg gravatar image

The answer is here.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2023-05-05 13:41:57 -0500

Seen: 98 times

Last updated: Jun 02 '23