Qt 3D的研究(六):Toon Shader
在上次的实验中,我们实现了Gooch Shader,并给出了通过调色板进行个性化的Gooch Shader设置。Toon Shader又称Cell Shader,是以离散的颜色来表示光照的强弱。很多动画片的渲染方式都是使用Toon Shader的。下面这样图就可以使用Toon Shader实现。
蒋彩阳原创文章,首发地址:http://blog.csdn.net/gamesdev/article/details/44084021。欢迎同行前来探讨。
下面是Toon Shader的代码:
// Toon.vert
#version 100
// Qt 3D默认提供的参数
attribute vec3 vertexPosition;
attribut