OROCHI
 
Loading...
Searching...
No Matches
GxUnitSsao.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_SHADER_NAMESPACE_BEGIN()
13
14//===========================================================================
16//===========================================================================
17class GxUnitSsao : public GxUnitBase
18{
19 //-----------------------------------------------------------
21 //-----------------------------------------------------------
23public:
24 GX_RTTI_CLASS_NAME_ICON(GxUnitSsao, GxUnitBase, "SSAO", GxRtti::ICON_TYPE::MATERIAL)
25 // ClassBaseReference継承クラス用禁止宣言
27
28
29 struct GxParameter : public GxStructBase
30 {
31 //-------------------------------------------------------------
33 //-------------------------------------------------------------
35
36 GX_RTTI_STRUCT(GxParameter);
37
39 //-----------------------------------------------------------
41 //-----------------------------------------------------------
43
46 : _enable(false)
47 , _scaleFactor(800)
48 , _maxStepSize(20)
49 , _numSampleDirect(5)
50 , _numSampleStep(4)
51 , _occlusionBias(0.3f)
52 , _strength(2)
53 , _maxLength(6)
54 , _limitDistance(1000)
55 {}
56
58 //-------------------------------------------------------------
60 //-------------------------------------------------------------
62
72 f32 _nearZ;
73 f32 _farZ;
76
78 };
79
81 //-----------------------------------------------------------
83 //-----------------------------------------------------------
85public:
87 GxUnitSsao(void);
88
90 void cleanup(void) override;
91
93 //-----------------------------------------------------------
95 //-----------------------------------------------------------
97protected:
99 void forceAsyncUpdate(void) override;
100
102 //-----------------------------------------------------------
104 //-----------------------------------------------------------
106public:
108 GX_FORCE_INLINE const GxParameter& getParameter(void) const { return _parameter; }
110 GX_FORCE_INLINE void setParameter(const GxParameter& parameter) { _parameter = parameter; }
111
113 //-----------------------------------------------------------
115 //-----------------------------------------------------------
117private:
118 GxParameter _parameter;
119
121};
122
123GX_SHADER_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MATERIAL
マテリアル
ユニット基礎クラス
Definition GxUnitBase.h:45
SSAOクラス
Definition GxUnitSsao.h:18
GX_FORCE_INLINE const GxParameter & getParameter(void) const
パラメータを取得
Definition GxUnitSsao.h:108
GX_FORCE_INLINE void setParameter(const GxParameter &parameter)
パラメータを設定
Definition GxUnitSsao.h:110
Definition GxBase.h:24
SSAOパラメータ
Definition GxUnitSsao.h:30
f32 _nearZ
SSAOのnear.
Definition GxUnitSsao.h:72
f32 _maxLength
オクルージョンを計算する中心点とサンプル点の最大距離
Definition GxUnitSsao.h:70
u32 _numSampleDirect
サンプリング方向の数
Definition GxUnitSsao.h:66
f32 _occlusionBias
角度バイアス(0.0~1.0)
Definition GxUnitSsao.h:68
f32 _strength
オクルージョンの濃さのスケーリング値
Definition GxUnitSsao.h:69
f32 _farFade
SSAOのfarのフェード幅
Definition GxUnitSsao.h:75
f32 _scaleFactor
サンプリング半径のスケール値(100.0~2000.0あたり)
Definition GxUnitSsao.h:64
f32 _farZ
SSAOのfar.
Definition GxUnitSsao.h:73
GxParameter(void)
デフォルトコンストラクタ
Definition GxUnitSsao.h:45
f32 _maxStepSize
サンプリング半径のマックス値(5.0~100.0あたり)
Definition GxUnitSsao.h:65
f32 _nearFade
SSAOのnearのフェード幅
Definition GxUnitSsao.h:74
f32 _limitDistance
SSAOを適用する最大距離
Definition GxUnitSsao.h:71
b32 _enable
有効/無効
Definition GxUnitSsao.h:63
u32 _numSampleStep
一方向あたりのサンプリング数
Definition GxUnitSsao.h:67
32bitブーリアン
Definition GxDefine.h:173