Skip to main content
Question

WebGPU API is not supported in the plugin


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
  • 2490 replies
  • 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
  • 2 replies
  • 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
  • 2 replies
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings