Hello, it’s been a week, Otorakobo here.
This time I’d like to introduce the outline shader I use for my characters.
I’m still in the prototype stage, though.

When you implement outline shading or cell shading, you get a cartoon-like expression, but the downside of that is that it makes the character look flat.

To solve this problem, I tried my best to add depth by gradating the outline.

Referring to the depth buffer, the areas close to the distance will emit light, and the areas far from the distance will suppress light.
We used such an expression.

In the far distance, it looks like ↓.

In the prototype version, some of the light emission is lost, but the mechanism is like this.
The next task is to make the outline of the color change depending on the distance so that it looks beautiful.
See you soon!

【Irisy Aqua】キャラクタシェーダ

どうも一週間ぶりです。Otorakoboです。
今回はキャラクタに使っているアウトラインシェーダの紹介です。
と、言ってもまだ試作段階なんですけどね笑

アウトラインやセルシェーディングを実装した際に、アニメっぽい表現にはなるんですが、それの弊害でのっぺりとした平面な見た目になってしまう欠点があります。

それを解決すべく、アウトラインをグラデーションさせて奥行を付けようとがんばったのが↓になります。
{Image:Shader}

深度バッファを参照して、距離が近い所は発光し、距離が遠いところは発光が抑えられる。
そんな表現にしました。

遠距離では↓のような感じ
{Image:Shader Far}

試作版では発光が消えてしまっているところもありますが、メカニズムはこんな感じです。
この距離に応じて色味が変化するアウトラインをちゃんと奇麗に見えるように作り込んでいくのが今後の課題です。
それでは!