Python/GLSL cell-shading script
Hello,
This .blend contains a outliner script that I wrote inspired by BsDev's blend on BlendSwap but I tried to improve it.
This python script use a Filter 2D actuator to active a GLSL shader that is wrote on a string. The python part include parameters on the string. Parametrers are tickness and intencity of the line. Tickness is calculate with the current window size because the GLSL function used take percent of the current window size as argument.
EDIT 10 feb 2014 : New cleaner outline method. Now the outline is of the given color when the pixel color difference is greater than a given value. It remove transparency and darkening of faces and edges.
EDIT 26 apr 2014 : I've removed the substitue function to use the % operator that is built-in and I've discoverd recently.
Comments
Magnificent job mate, my aim is to enable that while an object is selected, more like a separator and i would like to know if there is any way to change the outline color.
I read your code and i think that it will always lead in a black color. Can you give me any type of advice? Thanks alot
Greg
Hello,
First thanks, you inspire me and i updated the file.
For the selection i thinks it's impossible to outline a single obetc because it's a pixel shader so you can't diferentiates objects.
For the color see the new file, i add a color parameter with the new method. You were right, the old method doesn't allow you to change color.
You are both fast and genious mate, thanks a lot, will study the new version :D
I have no experience in vertex shader nor in opengl so i can't even think on the modification myself :D