-
Notifications
You must be signed in to change notification settings - Fork 0
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
Provide aliases for patchES300 #10
Comments
One could as why do we even have to bother and why pex-context is not auto-upgrading it for us? |
Another option build a online tool when we can upgrade our code by copy paste and stop using parser. What do you think @dmnsgn |
I think The current solution (as of Jan 2024) is:
That works beautifully in pex-renderer v4 alpha and has the following pros:
And cons:
That's for current status. We reached the conclusion that –now that Safari caught up– WebGL 2 has enough worldwide support so we should entirely drop WebGL1. In a soonish future that means:
PS: I still don't see any obvious GLSL -> WGSL bridge without DSL extracting shader variables and providing different body like I did in dgel: |
Ok. I missed that defines SOTA. It kind of brings back the question of Shift from framework to library #9 as those defines are in final shaders that could be in pex-renderer instead of here. Re. glsl/wgsl we could got further into thi.ng/umbrella and copy ThreeJS approach with DSL in JS/TS. https://github.com/thi-ng/umbrella/tree/develop/packages/shader-ast. There is no WGSL front end yet, only glsl. const sinc = (x: FloatTerm, k: FloatTerm) =>
div(sin(mul(x,k)), mul(x, k)); Not sure how does it feel to write whole PBR shader in this though... Seems like 6 months project. |
Another approach for WGSL, without DSL, that is gaining traction is WESL (for imports, conditional, etc.). |
Current approach is verbose and error prone
The alternative approach is much more readable
Downsides:
But for comparision i don't think this is better
Maybe it should be the parser that is typed?
to
then you could switch language by switching import (in my dreams..)
The text was updated successfully, but these errors were encountered: