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

template and guide to writing first shaders #77

Open
cyberboy666 opened this issue Oct 19, 2018 · 4 comments
Open

template and guide to writing first shaders #77

cyberboy666 opened this issue Oct 19, 2018 · 4 comments
Milestone

Comments

@cyberboy666
Copy link
Owner

this is partially already documented in conjur repo , but might be a bit highlevel for someone interested in writing their first shader, it should include:

  • how to set up a shader deving environment (using glslviewer etc)
  • template shader explaining the basics , lines to uncomment and see the changes etc
  • basic concepts for creating simple gen-shaders
  • template shader for texture input (colour and position) with basic concepts for creating simple pro-shaders
  • maybe how to dev on ur mac/windows machine ?
@cyberboy666 cyberboy666 added this to the recur v2 milestone Oct 19, 2018
@sebiik
Copy link
Contributor

sebiik commented May 6, 2019

I'm curious where you'd want to set up the shader deving environment. Add an option in recur to start glslviewer mode on the pi so you could connect a USB keyboard and develop from there?

@cyberboy666
Copy link
Owner Author

@sebiik , yeah - i was thinking basically some instructions on how to edit a shader on the pi, (probably dont need a option to start glslviewer from within recur at first although that would be cool!),
something like:

  • plug in a usb-keybboard
  • press . to exit recur
  • open termit from start-menu, type glslViewer ~/Shaders/my_new_shader.frag -l
  • open my_new_shader.frag in gedit and try changing these values ...
  • do this to load in a image-texture to be processed , try changing these values ...

do you have any ideas on how to ease the entry for people customising there own video-effects etc ?

@averagehat
Copy link

If using ssh #110 works well;

One thing about just using glslViewer is that you have to supply something for the (midi) param values or else a lot of the shaders won't really work.

By being connected to the pi, I can use my own editing environment on a different machine (and even use glslViewer there as a single-shader preview, though there is still the param values problem) and get good live feedback for learning, especially helpful with the 2-input shaders which I don't even know how to create with glslViewer or anything else.

I will make a special effort to document my learning and if it works out I can put together some documentation about editing environment, ssh setup, glsl, whatever.

There is already a bit of documentation and templating here:
https://github.com/langolierz/r_e_c_u_r/blob/9935f1a98bf308b1563e54ca8551ac16854bda9e/Shaders/2-input/mix_lumaKey.frag

@konsumer
Copy link

konsumer commented Sep 12, 2024

On this angle, I added these (discussed in #152 )

  • glsl_sandbox - basically just some knobs for native glslviewer.
  • recurweb a web-based editor, that has support for video and inputs. (visit here)

While working on these I also:

  • expanded, normalized & cleaned-up shader collection
  • created a simple template that uses standard uniforms and u_x* instead of fparams (which follows glslviewer and others)

Feel free to use these here (let me know, and I will make a PR for shaders.)

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

4 participants