3
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 5 years have passed since last update.

ARKitAdvent Calendar 2018

Day 14

ARKitでカラーフィルター

Last updated at Posted at 2018-12-14

ARKitでカメラにフィルターをかけてみましょう。

GIFイメージ-FF5A801DAB1A-1.gif

やり方

以下のようなLUT画像と呼ばれる画像を使って、

sepia.jpg

scnCameraのcolorGradingにセットすると実現できます。

sceneView.pointOfView?.camera?.colorGrading.contents = #imageLiteral(resourceName: "sepia")

もとに戻すには

sceneView.pointOfView?.camera?.colorGrading.contents = nil

画像を変えていろいろなフィルターをやってみよう

与える画像を変えることでいろいろなフィルターを表現することができます!

sepia.jpg lut2.png lut1.png lut3.png
GIFイメージ-FF5A801DAB1A-1.gif GIFイメージ-999C1C03C661-1.gif GIFイメージ-BE9EE74F7633-1.gif GIFイメージ-2E126300361B-1.gif

サンプルコード

参考文献

3
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
3
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?