
[ad_1]
I exploit blender recreation engine and blender makes use of OpenGL for graphics. How can I draw traces round all 3D objects? Would this be a job for a filter? Mainly, I need my finish outcome to look drawn.
I discovered this:
uniform sampler2D bgl_RenderedTexture;
uniform sampler2D bgl_DepthTexture;
void predominant()
{
float depth = texture2D( bgl_DepthTexture, gl_TexCoord[0].xy).r;
float depth2 = texture2D( bgl_DepthTexture, gl_TexCoord[0].xy + vec2(0,0.002)).r;
float depth3 = texture2D( bgl_DepthTexture, gl_TexCoord[0].xy + vec2(0.002,0)).r;
float fac = abs(depth-depth2) + abs(depth-depth3);
float depth = 9050;
vec4 sub = vec4(fac*depth,fac*depth,fac*depth,0);
gl_FragColor = texture2D( bgl_RenderedTexture, gl_TexCoord[0].xy ) - sub;
}
#change float depth
right here and that appears to work, however I would like it to look extra sketched. So I would love some noise affect. Maybe it is known as sinus displacement? Is there a approach to try this?
I draw and I need the model to appear like this. Thanks.
Disclaimer: I do hang around on BSE and this isn’t a query they’re ready to reply or is it essentially on-topic for them, since it’s about OpenGL.
[ad_2]