I'm currently researching a way to produce non-photorealistic rendering in webgl. The best looking algorithm I've found so far for edge detection was implemented with OpenGL's geometry shader, here. Specifically GL_TRIANGLES_ADJACENCY.
I was wondering if there was an equivalent in WebGL or even how would I go about porting this code over to Javascript.
Geometry shaders is not available in WebGL.
However there is plenty of ways to do edge detection. E.g. you can use image space based algorithms, such as
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.9731&rep=rep1&type=pdf
Or take a look in "Real-time Rendering - 3rd edition" (book). In this book there is a lot of examples of NPR, of which most will run fine on WebGL.
http://www.realtimerendering.com/
Weird little snafu. I'm using jQuery's .css() method to change the size of text (long story; no, I can't use media queries) using a variable and I need to add em to it. I'm not sure what the syntax is ...
Weird little snafu. I'm using jQuery's .css() method to change the size of text (long story; no, I can't use media queries) using a variable and I need to add em to it. I'm not sure what the syntax is ...
I'm following a tutorial on importing and displaying images on an HTML5 canvas. Everything works fine, until I try to change the image itself. For example, I'll have a yellow circle as my image, and ...
I'm following a tutorial on importing and displaying images on an HTML5 canvas. Everything works fine, until I try to change the image itself. For example, I'll have a yellow circle as my image, and ...
This is an odd problem. I have a client object that I am building up using Crockford-esque public/private members: var client = function() { var that, remote_data, other_data; // add public ...
This is an odd problem. I have a client object that I am building up using Crockford-esque public/private members: var client = function() { var that, remote_data, other_data; // add public ...
In a very simple jQuery modal, I close the modal by clicking on CLOSE as $('#close').click(function(e) { e.preventDefault(); $('#overlay, #alertModalOuter').fadeOut(400, function() { $(this)....
In a very simple jQuery modal, I close the modal by clicking on CLOSE as $('#close').click(function(e) { e.preventDefault(); $('#overlay, #alertModalOuter').fadeOut(400, function() { $(this)....