GLSL Viewport

    I want to write a shader for the Unity game engine for custom NPR rendering as seen here. 

https://www.youtube.com/watch?v=yhGjCzxJV3E

One thing I saw was essential was being able to edit the model as it would appear in game. I know Blender doesn’t support Shaderlab, but I see that it supports GLSL, so I figure I will maintain two versions of the shader. A shaderlab and GLSL version.

I googled around, but I can’t exactly find information on rendering objects in the viewport with my own GLSL shaders. How does one go about doing this? Is there a tutorial or something similar on it?

Hi, you could use the blender game engine or upbge and those tutorials: https://en.wikibooks.org/wiki/GLSL_Programming/Blender
Sorry, I didn’t watched the video and I don’t know if it answers exactly your question… for example, here is a simple shader for diffuse: http://www.pasteall.org/blend/42851 . You just have to press P in the 3D view to launch the game engine.

Blender’s viewport uses GLSL, but you can’t just drop your own in without diving into the C/C++ source of Blender as a whole. You can do a bit more with the Game Engine viewport, but don’t expect miracles, especially if you’re using newer OpenGL features in your shader.