Skip to main content
Question

WebGPU API is not supported in the plugin

  • January 13, 2024
  • 3 replies
  • 510 views

Yi_Shen

The navigator.gpu is undefined when accessed in ui.html. Is this intentional? I tried running navigator.gpu.requestAdapter() in the developer console and it worked fine.

I’m trying to use WebGPU to accelerate the rendering in my plugin https://www.figma.com/community/plugin/1264600219316901594/

This topic has been closed for replies.

3 replies

y_toku
Figmate
  • Community Support
  • January 18, 2024

Hi there,

Thanks for the post! I’m asking internally, so I’ll get back to you if there is any information that I can share with you.

Thanks for your patience.

Toku


Reid_Draper
Figmate
  • Figmate
  • January 19, 2024

tl;dr If you navigate your plugin to a hosted iframe, this will work!

I don’t see this immediately documented in the WebGPU spec, but it looks like undefined navigator.gpu for null origin (window.location.origin) frames. I’ve tested with a hosted iframe, and everything works fine.

Let me know if this helps!


Yi_Shen
  • Author
  • January 20, 2024

Great! Thank you so much for the answer! Glad to see that there is a solution. I will embed a hosted iframe to run the WebGPU ray tracer.