-
-
Notifications
You must be signed in to change notification settings - Fork 362
[WIP] Shadertoy and shader plot types #4025
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
base: master
Are you sure you want to change the base?
Conversation
b5019b0 to
6a67420
Compare
Compile Times benchmarkNote, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running: using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(fig)
|
|
any plans to merge this on the near future. @asinghvi17 and I are exploring spherical volumetric shaders, and according to him this would make things easier 😄 . |
|
I tried cleaning it up to merge it, but somehow run again into a very frustrating OpenGL bug, where the screen just stays blank without any error and I have no idea where to look for the problem... |
|
Fixed the blank screen thing (caused by transparency = true which changes what the shader outputs are). Btw, my thoughts with adding a "glplot" type were more manual than this. I wanted something that would allow you to set all shader types and have arbitrary vertex inputs and uniforms. Conceptually something like glplot!(scene,
vertex_inputs...; # 1+ arrays mapping to buffers
shader = [vertex_shader, fragment_shader], # 1+ vertex shader, 1+ fragment shader (0+ other types?)
uniforms... # any number of uniforms as kwargs
)that just does some boilerplate and integration stuff in the background. E.g. include "fragment_output" and handle outputs, conversions to gl types (maybe difficult for 1d textures?), mesh conversion paths, add and handle a few core attributes (visible, ssao, fxaa, transparency). (That doesn't mean I want this pr to change. Just wanted to say I had something else in mind) |
Benchmark ResultsSHA: d370d83e3e13e15e93332bc9e66765ec781179e3 Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
GLMakie/src/drawing_primitives.jl
Outdated
| end | ||
| get!(uniforms, :ssao, Observable(false)) | ||
| get!(uniforms, :transparency, Observable(true)) | ||
| get!(uniforms, :transparency, Observable(false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol

adds:
shadertoy(rect2d, frag_shader)To run shadertoy shaders like this:


TODOs: