Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
RayG
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location:
Posted: 28th Oct 2014 07:09
Hello, I was wondering if it was possible to make a shader that can dither the screen in darkbasic? I found 2 shaders, one for unity and one for opengl, but these don't work in Dasrkbasic... Or at least I don't know how to do make them work. Anyway, if anyone can that would be great as I think the effect looks interesting and more people than me would find it usefull. Thanks!

Here are two example
http://wiki.unity3d.com/index.php/Dithering_Shader

http://stackoverflow.com/questions/8032006/glsl-gif-dither-effect-optimization

Thanks again.
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 28th Oct 2014 16:24
I don't quite get what the shader is supposed to do, but you can generally apply fullscreen shaders in DBP using the image kit plugin. It's relatively easy, you simply draw your scene to a render target (and not directly to the screen) and then apply the shader effect to that render target by pasting it with "ik paste image myScene, 0, 0, myEffect". The Effect is an .fx file, I believe image kit comes with a bunch of examples that show how to write those shaders. You could more or less copy what the shader posted in the stack overflow post does, just have to change the structure to fit the required format.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Oct 2014 18:37 Edited at: 28th Oct 2014 18:38
Hi there. I have use a piece of code to make some filters in my painting program. We could add 2D box , circle ,Ellipse and so on. We could use it even in real time, but is too slow .Here is part of the code.








I'm not a grumpy grandpa
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Oct 2014 20:21
If you upload the shader I can convert it.

I like offending people. People who get offended should be offended. -- Linus Torvalds

Login to post a reply

Server time is: 2026-07-17 14:18:04
Your offset time is: 2026-07-17 14:18:04