0
WebGL
Can someone help me with coding shaders in WebGL? I can do it by looking at tutorials but have trouble understanding it and also rendering stuff without using templates
3 Answers
0
Why you want to deal webgl directly? There some libraries that makes thing much more eaiser. Give a try to threejs or libraries made on top of threejs. Threejs is also made on top webgl it is matter of layer of abstraction.
0
š®š³Vivekš®š³ I want to deal with WebGL directly because oftentimes three.js or p5.js lags for me (I have tried both and have even coded a 3D engine with Processing.js)
I have heard that pure WebGL runs smoother quicker and it helps you learn the most, too
0
I used WebGL a bit and could answer some specific questions about it.
If more examples might help you, you can see my codes at:
https://code.sololearn.com/W6e6xWN0T7Jv/#html
and
https://code.sololearn.com/WiH4n0rrvD1B/#html
Both examples extensively rely on custom shaders that I wrote almost from scratch.
I'm no WebGL expert but I don't think anyone needs to be. I still copy a few lines from working projects to start something new using WebGL. The examples above work despite me still having a weak understanding of the WebGL attributes and vertex shaders for example. Starting with a few lines of working WebGL code and iterating off of that keeps you moving and motivated.