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

[request] HTML5 example. #5656

Open
0wwafa opened this issue Nov 24, 2024 · 1 comment
Open

[request] HTML5 example. #5656

0wwafa opened this issue Nov 24, 2024 · 1 comment
Assignees

Comments

@0wwafa
Copy link

0wwafa commented Nov 24, 2024

It would be great to have a simple example on how to load and apply a SLANG shader (for example a CRT emulation) to a DIV/CANVAS in HTML5.

@aleino-nv
Copy link
Collaborator

Unfortunately, at the moment we don't have a stand-alone example that does only what you ask and nothing else.

The one example we have is https://github.com/shader-slang/slang-playground.

It is, however, conceptually simple:

  1. Take Slang shader input from user
  2. Compile it to WebGPU shading language (WGSL)
  3. Use that just as you would in a normal WebGPU application.

A bit more details on the implementation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants