0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Adobe Substance 3D Painterのシェーダーについて (2)

Posted at

環境

  • Windows
  • Adobe Substance 3D Painter 10.1.2

レンダリングエンジンのパラメータにアクセスする方法

Texture

Sparse Virtual Texture (SVT)

Substance 3D PainterはSparse Virtual Texture (SVT)システムを使用してテクスチャを表示しています。そのため sampler2D の代わりに SamplerSparse を使用できるように構造体が定義されている lib-sparse.glsl をimportします。(sampler2Dを使用することも可能です)

import lib-sparse.glsl

Texture sampler

シェーダーにテクスチャを渡すためには特別なコメントタグがサンプラー定義の前に必要です。

//: param auto [TEXTURE_TAG]

TEXTURE_TAG はTexture setのチャンネルまたはメッシュマップに関連した値です。All Engine Params - Shader APITexture set channelsUser channelsMESH MAPS の項目に記載がある値を指定できます。

//: param auto channel_basecolor
uniform SamplerSparse basecolor_tex;

Rendering states

レンダリング設定も特別なコメントタグで指定します。

//: state [STATUS]

STATUS はバックフェースカリング、ブレンディング、アーティファクト発生時の対処などの指定です。All Rendering States Params - Shader API に具体的な記述方法の説明があります。

その他のパラメータ

その他のパラメータについても同様に コメントタグ //: を使用してアクセスできます。 (All Engine Params - Shader APIOther parameters の項目)

値の確認方法

エンジンのパラメータに関してはSubstance 3D Painter で直接値を確認することは出来ませんがRenderDocを経由して起動すれば確認できます。

Other parameters の値の確認例

公式ドキュメント

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?