Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Geemili

#1
Support / Shaders
June 25, 2012, 06:34:38 PM
Hi, this is my first time venturing into 3D and am trying to use shaders. Specifically, outlining and cel-shading. I have made the cel-shading following some tutorials, but cannot figure out the outlining.

I have found two ways of doing outlining, the first is editing the rendered image and applying a sobel filter or another of similar effect. When I tried doing this, I didn't get it to work, but it required me to use FrameBuffer.getPixels(), which seems to be slow. Also, my fault here, I don't understand the images format, at least, not enough to change into a 2d array of colors.

The second way is to first draw a wireframe version of the current object with its front faces culled and the rendering it regularly. This one is supposedly easier, but I don't know where to place the code.

Also, less important (In My Opinion) is how to get the lightVec variable to glsl. I saw it used in the shader example and put:
varying vec3 lightVec
into the .glsl, but it did not seem to work.

Thank for reading my post. I am sorry for any ignorance, but I feel impatient to get this done. Ask if you need code.