Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin to add shaders to a visual #657

Closed
chapulina opened this issue Feb 27, 2021 · 1 comment
Closed

Add plugin to add shaders to a visual #657

chapulina opened this issue Feb 27, 2021 · 1 comment
Labels
enhancement New feature or request help wanted We accept pull requests! rendering Involves Ignition Rendering

Comments

@chapulina
Copy link
Contributor

Ignition Rendering provides API to set vertex and fragment shaders to visuals, see the custom shaders tutorial. It would be convenient if users could set shaders from their SDF files.

Desired behavior

The user can load a plugin attached to a visual (needs #265) that loads a shader. For example:

<visual name="vis">
  <plugin ...>
    <fragment>/path/to/file</fragment>
    <vertex>/path/to/file</vertex>
  </plugin>
</visual>

Alternatives considered

We could make this part of the SDF spec and populate components so the plugin gets the shader paths.

Implementation suggestion

This tutorial on accessing the rendering API from ign-gazebo plugins should help. We may need to create 2 plugins, one for the backend and one for the frontend.

Additional context

The ocean model would be a good example to load using this plugin.

@chapulina chapulina added enhancement New feature or request help wanted We accept pull requests! rendering Involves Ignition Rendering labels Feb 27, 2021
@chapulina
Copy link
Contributor Author

ShaderParam plugin added in #1275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted We accept pull requests! rendering Involves Ignition Rendering
Projects
None yet
Development

No branches or pull requests

1 participant