-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Implement AbstractPatterns
for WGLMakie
#2432
Implement AbstractPatterns
for WGLMakie
#2432
Conversation
It took me a while to get this to work, also because I am new to JavaScript, WebGL and all that. To get the repeating working I copied whatever I have one question to help me understand |
Looks like the CI itself and/or tests are broken. Running |
Thanks Simon for updating the pipeline. |
No, the shader outputs gets set in WebGL 2.0 via render targets... BufferAttributes are for the array inputs of the vertex shader. I know, you're asking about WebGL, but I'm actually a bit fuzzy about how threejs + webgl does it exactly, so I'll explain the basics with OpenGL, which looks like this (and should be somewhat similar in pure WebGL 2.0): // Declaration of output in fragment shader
layout(location=0) out vec4 fragment_color;
layout(location=1) out uvec2 fragment_groupid; And the index corresponds to the render target in this call: https://github.com/MakieOrg/Makie.jl/blob/master/GLMakie/src/rendering.jl#L73 Which gets setup here: https://github.com/MakieOrg/Makie.jl/blob/master/GLMakie/src/glwindow.jl#L88 For THREEJS/WebGL it's a bit different, but if I remember correctly, threejs rewrites shaders a bit to e.g. abstract away the difference between WebGL 1.0/2.0, so I think I had to look up to which variable one needs to write the color output of the fragment shader stage, which threejs then replaces in WebGL 1.0 with |
Going to merge this, thanks for getting this to work! :) |
Description
Closes #2294
MWE
Type of change
Delete options that do not apply:
Checklist