7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

HSVで行う簡易水彩

Last updated at Posted at 2022-07-17

環境

Unity2021.2.18f1

概要

ポストエフェクトで水彩っぽい表現です。
HSV変換し、適当にいい感じのパラメータに調整し、RGBに戻します。
階調化も行っています。

元は以下で、こはくちゃん達のモデルをStandardシェーダに変えています。

コード

ここに全コード載せています。

以下のようなかんじで彩度と明度を調整しています。

float3 hsv = rgb2hsv(col.rgb);
hsv.y = saturate(hsv.y + (1.0 - (gray * _SaturateScale)));
hsv.z = clamp(gray, _ValueMin, 1.0);
col.rgb = hsv2rgb(hsv);

参考

7
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?