OROCHI
 
Loading...
Searching...
No Matches
GxSysRender Class Reference

描画システムクラス More...

#include <GxSysRender.h>

Inheritance diagram for GxSysRender:
Collaboration diagram for GxSysRender:

Classes

struct  GxAABB
 AABB構造体 More...
 
class  GxFillRectangle
 塗りつぶし矩形クラス More...
 
struct  GxShadowDataCascade
 カスケードシャドウ構造体 More...
 
struct  GxShadowDataView
 シャドウデータ構造体 More...
 

Public Member Functions

初期化
 GxSysRender (void)
 デフォルトコンストラクタ
 
 ~GxSysRender (void) override
 デストラクタ
 
b32 initialize (const GxClassBase *pInitialInformation) override
 初期化
 
void terminate (void) override
 終了処理
 
virtual void initializeShaderPackage (void)
 シェーダパッケージの初期化
 
- Public Member Functions inherited from GxSysRenderBase
 GxSysRenderBase (void)
 コンストラクタ
 
 ~GxSysRenderBase (void) override
 デストラクタ
 
b32 initialize (const GxClassBase *pInitialInformation) override
 初期化
 
void terminate (void) override
 終了処理
 
virtual b32 initializeThreadLocalStorage (u32 workerThreadIndex)
 スレッドローカルストレージ初期化関数
 
GX_FORCE_INLINE void setVirtualResolution (GxSize &size)
 仮想解像度の設定
 
GX_FORCE_INLINE const GxSizegetVirtualResolution (void) const
 仮想解像度の取得
 
GX_FORCE_INLINE const GxSizegetOutputResolution (void) const
 出力解像度の取得
 
GX_FORCE_INLINE const GxSizegetDefaultViewportResolution (void) const
 Viewportのデフォルト解像度の取得
 
GX_FORCE_INLINE const GxRectgetSafetyArea (void) const
 セーフティエリアの取得
 
GX_FORCE_INLINE const GxRectgetVirtualSafetyArea (void) const
 セーフティエリアの取得(仮想座標系)
 
GX_FORCE_INLINE void setClearColor (const GxColor &color)
 クリアカラーを設定
 
GX_FORCE_INLINE const GxColorgetClearColor (void) const
 クリアカラーを取得
 
GxViewportgetViewport (RENDER_VIEW index) const
 ビューポートの取得
 
GxViewportgetDisableViewport (void) const
 未使用のビューポートを取得
 
u32 getViewIndex (GxViewport *pViewport) const
 ビューインデックスの取得
 
u32 getEnableViewportNum (void)
 有効なビューポートの数を取得
 
constexpr GxRenderVertexBuffergetInstanceVertexBuffer (void)
 インスタンス用の頂点バッファの取得
 
GX_FORCE_INLINE b32 isFrustumCulling (void) const
 フラスタムカリング有効判定
 
GX_FORCE_INLINE void setFrustumCulling (b32 enable)
 フラスタムカリング有効設定
 
GX_FORCE_INLINE b32 isShadowCullingModeDefault (void) const
 シャドウ描画時のカリングにデフォルト設定か否か(trueの場合 デフォルト設定のカリング無効時;無効、有効時:フロントフェースカリング)
 
GX_FORCE_INLINE void setShadowCullingModeDefaul (b32 enable)
 シャドウ描画時のカリングにデフォルト設定を有効にするか否か(trueの場合 デフォルト設定のカリング無効時;無効、有効時:フロントフェースカリング)
 
RENDER_VIEW getViewportFromScreen (const GxPoint2 &screenPosition)
 スクリーン座標からビューポート番号を取得
 
void update (void) override
 更新
 
virtual void render (void)
 描画
 
const GxPoint2 transformWorldToScreen (const GxVector3 &worldPosition, const RENDER_VIEW viewport, const GxSize *pResolution=nullptr)
 ワールド座標→スクリーン座標(カメラzチェックなし)
 
b32 transformWorldToScreen (const GxVector3 &worldPosition, GxPoint2 &screenPosition, const RENDER_VIEW viewport)
 ワールド座標→スクリーン座標GxPoint2(カメラzチェックあり) (削除予定)
 
b32 transformWorldToScreen (const GxVector3 &worldPosition, GxVector3 &screenPosition, const RENDER_VIEW viewport)
 ワールド座標→スクリーン座標GxVector3(カメラzチェックあり)
 
const GxVector2 transformWorldToVirtual (const GxVector3 &worldPosition, const RENDER_VIEW viewport)
 ワールド座標→仮想座標(カメラzチェックなし)
 
b32 transformScreenToRay (const GxPoint2 &screenPosition, GxVector3 &rayStart, GxVector3 &rayEnd, const GxSize *pResolution=nullptr)
 スクリーン座標→ワールド座標でのレイ
 
b32 transformScreenToRay (const GxPoint2 &screenPosition, GxVector3 &rayStart, GxVector3 &rayEnd, const RENDER_VIEW viewport, const GxSize *pResolution=nullptr)
 スクリーン座標→ワールド座標でのレイ(指定ビューポート)
 
void copyTextureToBackbuffer (GxRenderTexture *pDst, GxRenderTexture *pSrc, b32 isRight)
 バックバッファにテクスチャをコピー
 
constexpr void setClearTexture (GxRenderTexture *pClearRenderTexture)
 画面クリア用テクスチャを設定
 
constexpr GxRenderTexturegetClearTexture (void)
 画面クリア用テクスチャのポインタを取得
 
- Public Member Functions inherited from GxSysBase
template<typename T >
T * getModule (void) const
 モジュールを取得
 
 GxSysBase (void)
 デフォルトコンストラクタ
 
 ~GxSysBase (void) override
 デストラクタ
 
b32 isLocked (void)
 クリティカルセクションのロック状態を確認する
 
void sleep (f32 time)
 スリープ(スクリプト用)
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 
- Public Member Functions inherited from SingletonBase< GxSysRenderBase >
 SingletonBase (void)
 コンストラクタ
 
 ~SingletonBase (void)
 デストラクタ
 

Protected Attributes

メンバ変数
GxRenderTexture_pTextureShadowBuffer
 シャドウバッファテクスチャ
 
GxRenderTexture_pTextureShadowBufferVRWide
 VR用シャドウバッファテクスチャ
 
GxRenderTexture_pEnvironmentMap
 環境マップテクスチャ
 
GxRenderTexture_pEnvironmentMapDepthStencil
 環境マップ深度テクスチャ
 
GxRenderTexture_pTextureOpacity
 不透明描画用テクスチャ
 
GxResShaderPackage_pMultiSampleShaderPackage
 マルチサンプルシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pMultiSampleShaderCode
 マルチサンプルシェーダーコード
 
GxResShaderPackage_pLightingShaderPackage
 ライティングシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pLightingShaderCode
 ライティングシェーダーコード
 
GxResShaderPackage_pLinearZShaderPackage
 リニアZシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pLinearZShaderCode
 リニアZシェーダーコード
 
GxResShaderPackage_pEffectZShaderPackage
 エフェクトZシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pEffectZShaderCode
 エフェクトZシェーダーコード
 
GxResShaderPackage_pSSSMShaderPackage
 SSSMシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pSSSMShaderCode
 SSSMシェーダーコード
 
GxResShaderPackage_pSSAOShaderPackage
 SSAOシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pSSAOShaderCode
 SSAOシェーダーコード
 
GxResShaderPackage_pSSRShaderPackage
 SSRシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pSSRShaderCode
 SSRシェーダーコード
 
GxResShaderPackage_pModelShaderPackage
 モデル用シェーダーパッケージ
 
GxResShaderVertex_pModelHighSpeedVertexShader
 モデルハイスピードレンダリング用頂点シェーダー
 
GxResShaderPixel_pModelHighSpeedPixelShader
 モデルハイスピードレンダリング用ピクセルシェーダー
 
GxResShaderPackage_pOpacityMapShaderPackage
 不透明マップシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pOpacityMapShaderCode
 不透明マップシェーダーコード
 
GxResShaderPackage_pSemiTransparenceCompositeShaderPackage
 半透明コンポジットシェーダーパッケージ
 
GxShaderPackage::GxShaderCode_pSemiTransparenceCompositeShaderCode
 半透明コンポジットシェーダーコード
 
GxResShaderCompute * _pResComputeShader
 ライトプローブ計算用シェーダ
 
GxResShaderPixel_pResPrimitivePixelShaderSemiTransparence
 プリミティブ半透明用ピクセルシェーダー
 
GxResShaderPixel_pResPrimitivePixelShaderTextureSemiTransparence
 プリミティブ半透明テクスチャ用ピクセルシェーダー
 
GxResShaderPixel_pResPrimitivePixelShaderHud
 プリミティブHUD用ピクセルシェーダー
 
GxResShaderPixel_pResPrimitivePixelShaderTextureHud
 プリミティブHUDテクスチャ用ピクセルシェーダー
 
GxRenderVertexDeclaration_pShadowMapFrustumClipVertexDeclaration
 シャドウマップフラスタムクリップ用頂点宣言
 
GxResShaderVertex_pResShadowMapFrustumClipVertexShader
 シャドウマップフラスタムクリップ用頂点シェーダー
 
GxResShaderPixel_pResShadowMapFrustumClipPixelShader
 シャドウマップフラスタムクリップ用ピクセルシェーダー
 
BRDF_TYPE _brdfType
 BRDFタイプ
 
GxUnitFog::GxParameter _fogParameter
 フォグパラメータ
 
GxUnitSsao::GxParameter _ssaoParameter
 SSAOパラメータ
 
GxUnitSsr::GxParameter _ssrParameter
 SSRパラメータ
 
b32 _tiledLighting
 タイルライティングフラグ
 
b32 _dummyLightEnable
 ダミーライトフラグ
 
b32 _enableSSAO
 SSAO有効フラグ
 
f32 _localOcclusionRadius
 ローカルオクルージョン半径
 
f32 _localFalloffRadius
 ローカル非表示半径閾値
 
f32 _globalOcclusionRadius
 グローバルオクルージョン半径
 
f32 _globalFallOffRadius
 グローバル非表示半径閾値
 
GxUnitLightShadow_pUnitLightShadow
 シャドウライトユニット
 
GxUnitLightShadow_pRegistedUnitLightShadows [DIRECTIONAL_SHADOW_LIGHT_COUNT_MAX]
 登録シャドウライトユニット
 
GxUnitLightBase_pUnitLightPointShadow [static_cast< s32 >(RENDER_VIEW::_3D_MAX)][POINT_SHADOW_LIGHT_COUNT_MAX]
 ポイントシャドウライトユニット
 
u32 _pointShadowLightCount [static_cast< s32 >(RENDER_VIEW::_3D_MAX)]
 ポイントシャドウライト数
 
GxUnitLightBase_pUnitLightPointList [static_cast< s32 >(RENDER_VIEW::_3D_MAX)][POINT_LIGHT_COUNT_MAX]
 ポイントライトユニットリスト
 
u32 _pointLightCount [static_cast< s32 >(RENDER_VIEW::_3D_MAX)]
 ポイントライト数
 
u32 _cascadeShadowSplit [static_cast< s32 >(RENDER_VIEW::_3D_MAX)]
 カスケードシャドウ分割数
 
u32 _renderCascadeShadowSplit [static_cast< s32 >(RENDER_VIEW::_3D_MAX)]
 描画カスケードシャドウ分割数
 
GxShadowDataView _shadowDataView [static_cast< s32 >(RENDER_VIEW::_3D_MAX)]
 シャドウデータ
 
b32 _useLiSPSM
 LiSPSM有効フラグ
 
b32 _useShadowMapFrustumClip
 シャドウマップフラスタムクリップ有効フラグ
 
b32 _useHardwarePcf
 ハードウェアPCF有効フラグ
 
GxSize _shadowBufferResolution
 シャドウバッファ解像度
 
b32 _useShadowMatrixOrtho
 シャドウ正射影行列有効フラグ
 
b32 _velocityMapEnable
 速度マップ有効フラグ
 
b32 _enableOpacityMap
 不透明マップ有効フラグ
 
f32 _staticEnvironmentMapBrightness [static_cast< s32 >(RENDER_VIEW::_3D_MAX)]
 環境マップの明るさ
 
b32 _maskEnable
 マスク有効フラグ
 
b32 _enableEnvironmentMap
 環境マップ起動
 
GxVector3 _environmentMapPosition
 環境マップ設定ポジション
 
f32 _environmentMapNear
 環境マップ最低描画距離
 
f32 _environmentMapFar
 環境マップ最高描画距離
 
f32 _environmentMapWaitCount
 動的環境マップの描画待ちカウント
 
f32 _environmentMapWaitFrame
 動的環境マップの描画待ち時間 単位[フレーム]
 
GxResModel::LOD _wholeLodMode
 全体LODモード
 
b32 _lodEnable
 LODが有効か
 
s32 _pointShadowSamplingType
 ポイントシャドウのサンプリングタイプ
 
GX_HANDLE _handleNormalMapSampler
 法線マップサンプラ
 
GX_HANDLE _handleDepthMapSampler
 深度マップサンプラ
 
GX_HANDLE _handleDiffuseMapSampler
 拡散光マップサンプラ
 
GX_HANDLE _handleSpecularMapSampler
 反射光マップサンプラ
 
GX_HANDLE _handleMetallicRoughnessMapSampler
 メタリックラフネスサンプラ
 
GX_HANDLE _handleShadowMapSampler
 シャドウマップサンプラ
 
GX_HANDLE _handleShadowBufferSampler
 シャドウバッファサンプラ
 
GX_HANDLE _handleLinearZMapSampler
 リニアZマップサンプラ
 
GX_HANDLE _handleEnvironmentSampler
 環境サンプラ
 
GX_HANDLE _handleRenderTargetSampler
 レンダーターゲットサンプラ
 
GX_HANDLE _handleSemiTransparenceSampler
 半透明サンプラ
 
GX_HANDLE _handleOpacityMapSampler
 不透明マップサンプラ
 
GX_HANDLE _handleSSAOBufferSampler
 SSAOバッファサンプラ
 
GX_HANDLE _handleLightProbeMapSamplers [static_cast< u32 >(GxSysLight::LIGHT_PROBE_TEXTURE::MAX)]
 ライトプローブマップサンプラ
 
GX_HANDLE _handleLightProbeMapSampler
 ライトプローブマップサンプラ
 
GX_HANDLE _handleLightProbe [GxSysLight::SPHERICAL_HARMONICS_DIMENSION_MAX][3]
 ライトプローブ
 
GX_HANDLE _handleLightProbeParameter
 ライトプローブパラメータ
 
GX_HANDLE _handleLightProbeCount
 ライトプローブ数
 
GX_HANDLE _handleLightProbePosition
 ライトプローブの座標
 
GX_HANDLE _handleLightProbeExtent
 ライトプローブの拡縮
 
GX_HANDLE _handleLightProbeSampler
 ライトプローブサンプラ
 
GX_HANDLE _handleProjectionMapSampler [2]
 プロジェクションマップサンプラ
 
GX_HANDLE _handleRenderTargetSamplerMS
 レンダーターゲットマルチサンプラ
 
GX_HANDLE _handleColorSpaceAdjustment
 カラースペース調整ハンドル
 
GX_HANDLE _handleProjectionMatrix2D
 2Dプロジェクション行列ハンドル
 
GX_HANDLE _handleProjectionMatrix
 プロジェクション行列ハンドル
 
GX_HANDLE _handleInversProjectionMatrix
 プロジェクション逆行列ハンドル
 
GX_HANDLE _handleShadowMatrix
 シャドウ行列ハンドル
 
GX_HANDLE _handleShadowFar
 シャドウFarハンドル
 
GX_HANDLE _handleShadowLerp
 シャドウ補間ハンドル
 
GX_HANDLE _handleShadowBufferSize
 シャドウバッファサイズハンドル
 
GX_HANDLE _handleShadowLightColor
 シャドウライト色ハンドル
 
GX_HANDLE _handleShadowLightAmbientColor
 シャドウライト環境色ハンドル
 
GX_HANDLE _handleShadowLightDirection
 シャドウライト方向ハンドル
 
GX_HANDLE _handleFishEyeParameter
 魚眼パラメータハンドル
 
GX_HANDLE _handlePointShadowMatrix
 ポイントシャドウ行列ハンドル
 
GX_HANDLE _handlePointShadowLightColor
 ポイントシャドウライト色ハンドル
 
GX_HANDLE _handlePointShadowLightPosition
 ポイントシャドウライト座標ハンドル
 
GX_HANDLE _handlePointShadowLightParam
 ポイントシャドウライトパラメータハンドル
 
GX_HANDLE _handlePointShadowLightOrientation
 ポイントシャドウライト回転ハンドル
 
GX_HANDLE _handlePointShadowLightSpot
 ポイントシャドウライトスポットハンドル
 
GX_HANDLE _handlePointLightColor
 ポイントライト色ハンドル
 
GX_HANDLE _handlePointLightPosition
 ポイントライト座標ハンドル
 
GX_HANDLE _handlePointLightParam
 ポイントライトパラメータハンドル
 
GX_HANDLE _handlePointLightOrientation
 ポイントライト回転ハンドル
 
GX_HANDLE _handlePointLightSpot
 ポイントライトスポットハンドル
 
GX_HANDLE _handlePointShadowSamplingType
 ポイントシャドウサンプリングタイプハンドル
 
GX_HANDLE _handleCameraParam
 カメラパラメータハンドル
 
GX_HANDLE _handleSSAOInverseView
 SSAO逆ビューハンドル
 
GX_HANDLE _handleSSAOInverseProjection
 SSAO逆プロジェクションハンドル
 
GX_HANDLE _handleSSAOInverseViewProjection
 SSAO逆ビュープロジェクションハンドル
 
GX_HANDLE _handleSSAOParam
 SSAOパラメータ1ハンドル
 
GX_HANDLE _handleSSAOParam2
 SSAOパラメータ2ハンドル
 
GX_HANDLE _handleSSAOParam3
 SSAOパラメータ3ハンドル
 
GX_HANDLE _handleSSAOParam4
 SSAOパラメータ4ハンドル
 
GX_HANDLE _handleSSAOParam5
 SSAOパラメータ5ハンドル
 
GX_HANDLE _handleSSAOBufferSamplerState
 SSAOバッファサンプラステートハンドル
 
GX_HANDLE _handleSSRParameter
 SSRパラメータハンドル
 
GX_HANDLE _handleProjectionMapMatrix
 プロジェクションマップ行列ハンドル
 
GX_HANDLE _handleProjectionMapUVOffset
 プロジェクションマップUVオフセットハンドル
 
GX_HANDLE _handleProjectionMapParam
 プロジェクションマップパラメータハンドル
 
GX_HANDLE _handleCascadeShadowMapFunctions
 カスケードシャドウマップ関数ハンドル
 
GX_HANDLE _handlePointShadowMapFunctions
 ポイントシャドウマップ関数ハンドル
 
GX_HANDLE _handleProjectionMapFunctions
 プロジェクションマップ関数ハンドル
 
GX_HANDLE _handleBRDF
 BRDFハンドル
 
GX_HANDLE _handleScreenParameter
 スクリーンパラメータハンドル
 
GX_HANDLE _handleAlphaTest
 アルファテストハンドル
 
GX_HANDLE _handleAlphaTestParameter
 アルファテストパラメータハンドル
 
GX_HANDLE _handleApplyFog
 フォグ適用ハンドル
 
GX_HANDLE _handleApplyFogColor
 フォグ色適用ハンドル
 
GX_HANDLE _handleApplyFogMaterial
 フォグマテリアル適用ハンドル
 
GX_HANDLE _handleFogParameter
 フォグパラメータハンドル
 
GX_HANDLE _handleFogParameter2
 フォグパラメータ2ハンドル
 
GX_HANDLE _handleFogColor
 フォグ色ハンドル
 
GX_HANDLE _handleStaticEnvironmentMapBrightness
 環境マップ明るさハンドル
 
GX_HANDLE _handleDevelopRender
 開発用描画ハンドル
 
GX_HANDLE _handleDitherEnable
 ディザー有効ハンドル
 
GX_HANDLE _handlePrimitiveOutputGamma
 プリミティブガンマ出力ハンドル
 
GX_HANDLE _handleLightingEnable
 ライティング有効ハンドル
 
GX_HANDLE _handleShadowEnable
 シャドウ有効ハンドル
 
GX_HANDLE _handleMultiSampleCompositeScale
 マルチサンプルコンポジット拡縮ハンドル
 
GxFillRectangle _fillRectangle
 塗りつぶし矩形
 
GxRenderTexture_pWhiteTexture
 白レンダーテクスチャ
 
b32 _isShaderPackageReady
 シェーダーパッケージ準備完了フラグ
 

定義

enum class  BRDF_TYPE { BLINN_PHONG , PHYSICAL_BASED , MAX }
 ライティング計算定義 More...
 
enum class  SHADOW_MATRIX_TYPE { PSM , ORTHO , LISPSM }
 シャドウ行列タイプ More...
 
class GxUnitLightShadow
 
class GxUnitLightPointShadow
 
class GxUnitModel
 
static constexpr u32 CASCADE_SHADOW_SPLIT_MAX = GxMath::VALUE_4
 最大カスケードシャドウ分割数
 
static constexpr u32 DIRECTIONAL_SHADOW_LIGHT_COUNT_MAX = static_cast<s32>(RENDER_VIEW::_3D_MAX)
 ディレクショナルライト最大数
 
static constexpr u32 POINT_SHADOW_LIGHT_COUNT_MAX = GxMath::VALUE_1
 ポイントシャドウライト最大数
 
static constexpr u32 POINT_LIGHT_COUNT_MAX = GxMath::VALUE_16
 ポイントライト最大数
 
static constexpr u32 SHADOW_BUFFER_SIZE = GxMath::VALUE_4K
 シャドウバッファサイズ
 

操作

void update (void) override
 更新
 
void renderUnit (void) override
 ユニットの描画
 
virtual void updateShadowSplit (void)
 シャドウカスケード分割の更新
 
virtual void updateShadowMatrix (void)
 シャドウ行列の更新
 
virtual void updateShadowMatrixOrtho (RENDER_VIEW view, const GxVector3 &sunVector, GxShadowDataView *pShadowDataView, f32 yMax, f32 yMin)
 シャドウ行列の更新
 
virtual void updateShadowMatrixStable (RENDER_VIEW view, const GxVector3 &sunVector, GxShadowDataView *pShadowDataView, f32 yMax, f32 yMin)
 シャドウ行列の更新
 
virtual void updateShadowMatrixLisPSM (RENDER_VIEW view, const GxVector3 &sunVector, GxShadowDataView *pShadowDataView, f32 yMax, f32 yMin)
 シャドウ行列の更新
 
virtual void pickupLight (void)
 ライトのピックアップ
 
GxMatrixAffine getPointShadowMatrix (const GxUnitLightBase *pPointShadowLight, b32 lookBehind)
 ポイントシャドウ行列を取得
 
GxVector4 getPointShadowFishEyeParameter (const GxUnitLightBase *pPointShadowLight, b32 useOffset)
 ポイントシャドウ用魚眼パラメータを取得
 
void createCameraFrustumCorner (const GxMatrixAffine &inverseViewMatrix, f32 nearZ, f32 farZ, f32 fov, f32 aspect, GxVector3 *pDst, u32 dstCount)
 カメラの視推台の八隅を求める
 
u32 scissoringFrustum (const GxVector3 *pSrc, GxVector3 *pDst, u32 dstCount, f32 yMax, f32 yMin)
 視推台をYmax/minで切る
 
void createMatirxToFit (GxMatrixAffine &outMatrix, const GxAABB &aabb)
 フラスタムのフィットする変換行列を作成
 
void extendToWorldMaxMin (GxAABB &aabb, const GxMatrixAffine &lightViewMatrix, f32 yMax, f32 yMin)
 AABBをYmax/minに収めるまで延ばす
 
void extendToWorldMaxMin (GxAABB &aabb, const GxMatrix44 &lightViewProjectionMatrix, f32 yMax, f32 yMin)
 AABBをYmax/minに収めるまで延ばす
 
b32 createRealTimeEnvironmentMap (void)
 動的環境マップ作成
 
b32 environmentMapDrawCountDown (void)
 環境マップウェイトカウント
 
b32 createOpacityMap (void)
 不透明マップ作成
 
void updateOpacityMap (GxViewport *pViewport)
 不透明マップ更新
 
s32 primitiveCustomShaderCallback (void *pSource, void *pArgument)
 プリミティブ用カスタムシェーダコールバック
 
void updateShadowLight (RENDER_VIEW view)
 シャドウライトを更新
 
GX_FORCE_INLINE b32 isShaderPackageReady (void) const
 シェーダパッケージの準備がOKかを取得
 
GX_FORCE_INLINE void setShaderPackageReady (b32 isReady)
 シェーダパッケージの準備がOKかを設定
 
b32 renderInitialize (void)
 描画初期化
 
void setRenderMaterial (GxRenderMaterial *pMaterial)
 マテリアル設定
 

アクセサ

constexpr GxUnitLightShadowgetShadowLight (void) const
 シャドウライトを取得
 
constexpr GxUnitLightShadowgetRegistedShadowLightAtView (RENDER_VIEW view) const
 指定したビューに登録されているシャドウライトを取得
 
constexpr GxUnitLightBasegetPointShadowLight (RENDER_VIEW view, u32 index=0) const
 ポイントシャドウライトを取得
 
constexpr u32 getPointShadowLightCount (RENDER_VIEW view) const
 ポイントシャドウライトの個数を取得
 
GX_FORCE_INLINE void setShadowMapResolution (const GxSize &resolution)
 シャドウマップの解像度を設定
 
GX_FORCE_INLINE GxSize getShadowMapResolution (void) const
 シャドウマップの解像度を取得
 
constexpr void setCascadeShadowSplitCount (RENDER_VIEW view, u32 count)
 カスケードシャドウの分割数を設定(最大数)
 
constexpr u32 getCascadeShadowSplitCount (RENDER_VIEW view) const
 カスケードシャドウの分割数を取得(最大数)
 
constexpr u32 getRendrCascadeShadowSplitCount (RENDER_VIEW view) const
 カスケードシャドウの分割数を取得(描画に使われている数)
 
GX_FORCE_INLINE const GxVector3getShadowRenderLightDirection (RENDER_VIEW view) const
 描画用のシャドウライトの方向を取得
 
GX_FORCE_INLINE const GxMatrix44getShadowRenderMatrix (RENDER_VIEW view, u32 cascadeLevel) const
 シャドウ行列を取得
 
constexpr f32 getShadowNearZ (RENDER_VIEW view, u32 cascadeLevel) const
 シャドウNearを取得
 
constexpr f32 getShadowFarZ (RENDER_VIEW view, u32 cascadeLevel) const
 シャドウFarを取得
 
GX_FORCE_INLINE const GxShapeBoxgetShadowCullingBox (RENDER_VIEW view, u32 cascadeLevel) const
 シャドウパスのカリングボックスを取得
 
GX_FORCE_INLINE const GxMatrix44getShadowSampleMatrix (RENDER_VIEW view, u32 cascadeLevel) const
 シャドウサンプリング行列を取得
 
constexpr f32 getShadowFarDepth (RENDER_VIEW view, u32 cascadeLevel) const
 シャドウFar深度を取得
 
GX_FORCE_INLINE const GxVector4getShadowSampleLerpParameter (RENDER_VIEW view) const
 シャドウサンプリングの線形補間用パラメータを取得
 
GxRect getShadowBufferViewportRect (u32 index, RENDER_VIEW view) const
 カスケードシャドウマップのビューポート矩形を取得
 
GxRenderTexturegetShadowBuffer (RENDER_VIEW view=RENDER_VIEW::_0) const
 カスケードシャドウマップを取得
 
constexpr GxRenderTexturegetEnvironmentMap (void) const
 動的環境マップを取得
 
constexpr GxRenderTexturegetOpacityMap (void) const
 不透明マップを取得
 
SHADOW_MATRIX_TYPE getShadowMatrixType (void)
 シャドウマトリクスの生成方式を取得
 
void setShadowMatrixType (SHADOW_MATRIX_TYPE type)
 シャドウマトリクスの生成方式を設定
 
constexpr BRDF_TYPE getBrdfType (void) const
 BRDFタイプを取得
 
constexpr void setBrdfType (BRDF_TYPE type)
 BRDFタイプを設定
 
GX_FORCE_INLINE const GxUnitFog::GxParametergetFogParameter (void) const
 フォグのパラメータを取得
 
GX_FORCE_INLINE void setFogParameter (const GxUnitFog::GxParameter &parameter)
 フォグのパラメータを設定
 
GX_FORCE_INLINE const GxUnitSsao::GxParametergetSsaoParameter (void) const
 SSAOのパラメータを取得
 
GX_FORCE_INLINE void setSsaoParameter (const GxUnitSsao::GxParameter &parameter)
 SSAOパラメータを設定
 
GX_FORCE_INLINE const GxUnitSsr::GxParametergetSsrParameter (void) const
 SSRのパラメータを取得
 
GX_FORCE_INLINE void setSsrParameter (const GxUnitSsr::GxParameter &parameter)
 SSRパラメータを設定
 
GX_FORCE_INLINE b32 isDummyLightEnable (void) const
 ダミーライト有効/無効を判定
 
GX_FORCE_INLINE void setDummyLightEnable (b32 enable)
 ダミーライト有効/無効を設定
 
GX_FORCE_INLINE b32 isUseLiSPSM (void) const
 LiSPSM使用/不使用を判定
 
GX_FORCE_INLINE void setUseLiSPSM (b32 use)
 LiSPSM使用/不使用を設定
 
GX_FORCE_INLINE b32 isUseHardwarePcf (void) const
 ハードウェアPCF使用/不使用を判定
 
GX_FORCE_INLINE void setUseHardwarePcf (b32 use)
 ハードウェアPCF使用/不使用を設定
 
GX_FORCE_INLINE b32 isVelocityMapEnable (void) const
 速度マップ有効/無効を判定
 
GX_FORCE_INLINE void setVelocityMapEnable (b32 enable)
 速度マップ有効/無効を設定
 
GX_FORCE_INLINE b32 isOpacityMapEnable (void) const
 不透明マップ有効/無効を判定
 
GX_FORCE_INLINE void setOpacityMapEnable (b32 enable)
 不透明マップ有効/無効を設定
 
GX_FORCE_INLINE b32 isEnvironmentMapEnable (void) const
 動的環境マップ有効/無効を判定
 
GX_FORCE_INLINE void setEnvironmentMapEnable (b32 enable)
 動的環境マップ有効/無効を設定
 
GX_FORCE_INLINE const GxVector3getEnvironmentMapPosition (void) const
 環境マップの取得ポジションを取得
 
GX_FORCE_INLINE void setEnvironmentMapPosition (const GxVector3 &position)
 環境マップの取得ポジションを設定
 
constexpr f32 getEnvironmentMapNear (void) const
 環境マップの取得ポジションを取得
 
constexpr void setEnvironmentMapNear (f32 nearZ)
 環境マップの取得ポジションを設定
 
constexpr f32 getEnvironmentMapFar (void) const
 環境マップの取得ポジションを取得
 
constexpr void setEnvironmentMapFar (f32 farZ)
 環境マップの取得ポジションを設定
 
constexpr void setStaticEnvironmentMapBrightness (f32 brightness, RENDER_VIEW view=RENDER_VIEW::_0)
 静的環境マップの明るさを設定
 
constexpr f32 getStaticEnvironmentMapBrightness (RENDER_VIEW view=RENDER_VIEW::_0) const
 静的環境マップの明るさを取得
 
GX_FORCE_INLINE b32 isMaskEnable (void) const
 マスク有効判定
 
GX_FORCE_INLINE void setMaskEnable (b32 enable)
 マスク有効設定
 
constexpr GxResModel::LOD getWholeLodMode (void) const
 全体LODモードを取得
 
GX_FORCE_INLINE b32 isLodEnable (void) const
 LOD有効判定
 
constexpr s32 getPointShadowSamplingType (void) const
 ポイントシャドウのサンプリングタイプを取得
 
constexpr void setPointShadowSamplingType (s32 type)
 ポイントシャドウのサンプリングタイプを設定
 
GX_FORCE_INLINE GxResShaderPackagegetModelShaderPackage (void) override
 モデル用シェーダパッケージを取得
 
GX_FORCE_INLINE GX_HANDLE getModelMaterialFunctionsHandleByName (GX_CSTR name) const
 モデルマテリアルの関数ハンドルを名前から取得
 
GX_FORCE_INLINE GX_HANDLE getModelMaterialFunctionsHandleByVirtualName (GX_CSTR name) const
 モデルマテリアルの関数ハンドルを仮想名から取得
 
GX_FORCE_INLINE GX_HANDLE getModelMaterialParameterHandleByName (GX_CSTR name) const
 モデルマテリアルのパラメータハンドルを名前から取得
 
GX_FORCE_INLINE GX_HANDLE getModelMaterialParameterHandleByVirtualName (GX_CSTR name) const
 モデルマテリアルのパラメータハンドルを仮想名から取得
 
GX_FORCE_INLINE GxFillRectanglegetFillRectangle (void)
 塗りつぶし矩形を取得
 
constexpr GxRenderTexturegetWhiteTexture (void) const
 Get white filled 1x1px texture.
 
GxUnitLightShadowsetShadowLight (GxUnitLightShadow *pLight)
 シャドウライトを設定
 
void registShadowLight (GxUnitLightShadow *pLight)
 シャドウライトの登録
 
void unregistShadowLight (GxUnitLightShadow *pLight)
 シャドウライトの登録解除
 

Additional Inherited Members

- Static Public Member Functions inherited from GxSysRenderBase
static void getPositionFromVirtual (const GxVector2 &virtualPosition, GxPoint2 &outputPosition, const GxSize *pOutputResolution)
 virtualResolution→指定Resolutionに座標変換
 
static void getPositionToVirtual (const GxPoint2 &inputPosition, GxVector2 &virtualPosition, const GxSize *pInputResolution)
 指定Resolution→virtualResolutionに座標変換
 
static void getPositionVirtualToOutput (const GxVector2 &virtualPosition, GxPoint2 &outputPosition)
 virtualResolution→OutputResolutionに座標変換
 
static void getPositionOutputToVirtual (const GxPoint2 &outputPosition, GxVector2 &virtualPosition)
 OutputResolution→virtualResolutionに座標変換
 
static void getRectFromVirtual (const GxRectF &baseRect, GxRect &dstRect, const GxSize *pOutputResolution)
 virtualResolution→指定Resolutionに矩形変換
 
static void getRectToVirtual (const GxRect &baseRect, GxRectF &dstRect, const GxSize *pInputResolution)
 指定Resolution→virtualResolutionに矩形変換
 
static void getRectVirtualToOutput (const GxRectF &baseRect, GxRect &dstRect)
 virtualResolution→OutputResolutionに矩形変換
 
static void getRectOutputToVirtual (const GxRect &baseRect, GxRectF &dstRect)
 OutputResolution→virtualResolutionに矩形変換
 
static GxPoint2 getPositionViewPortToOutput (const GxPoint2 &viewportPosition, const RENDER_VIEW viewportNo)
 各ビューポートでの2D座標系→OutputResolutionに変換
 
static GxPoint2 getPositionOutputToViewPort (const GxPoint2 &outputResolution, const RENDER_VIEW viewportNo)
 OutputResolution→各ビューポートでの2D座標系に変換
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Static Public Member Functions inherited from SingletonBase< GxSysRenderBase >
static GX_FORCE_INLINE GxSysRenderBasegetSingleton (void)
 参照を取得
 
static constexpr GxSysRenderBasegetSingletonPointer (void)
 ポインタを取得
 
- Static Public Attributes inherited from GxSysRenderBase
static constexpr u32 LIGHTING_TILE_WIDTH = GxMath::VALUE_128
 ライティングのタイル幅
 
static constexpr u32 LIGHTING_TILE_HEIGHT = GxMath::VALUE_64
 ライティングのタイル高さ
 
- Protected Types inherited from GxSysBase
enum class  LOCK_TYPE { SEQUENTIAL_THREAD_SAFE , THREAD_SAFE }
 ロックタイプ More...
 
- Protected Member Functions inherited from GxSysRenderBase
void drawClearTexture (GxViewport *pViewport)
 画面クリア用テクスチャを描画
 
void copyViewport (void)
 ビューポートをコピー
 
virtual GxRenderTexturegetViewportRenderTarget (RENDER_VIEW viewport)
 指定ビューポートのレンダーターゲットを取得
 
GX_FORCE_INLINE GxRenderContextgetRenderContext (u32 workerThreadIndex)
 指定スレッドのコンテキストを取得
 
- Protected Member Functions inherited from GxSysBase
void terminateGxModules (void)
 GXモジュールの終了処理
 
void lock (LOCK_TYPE type=LOCK_TYPE::THREAD_SAFE)
 クリティカルセクションに入る
 
void unlock (LOCK_TYPE type=LOCK_TYPE::THREAD_SAFE)
 クリティカルセクションを出る
 
template<typename T >
T * addModule (void)
 モジュールを作成
 
template<typename T >
void removeModule (void)
 モジュールを削除
 

Detailed Description

描画システムクラス

Member Enumeration Documentation

◆ BRDF_TYPE

enum class GxSysRender::BRDF_TYPE
strong

ライティング計算定義

Enumerator
BLINN_PHONG 

Blinn-Phong.

PHYSICAL_BASED 

物理ベース

MAX 

定義数

◆ SHADOW_MATRIX_TYPE

enum class GxSysRender::SHADOW_MATRIX_TYPE
strongprotected

シャドウ行列タイプ

Enumerator
ORTHO 

PSM.

LISPSM 

Ortho.

LiSPSM

Member Function Documentation

◆ createCameraFrustumCorner()

void GxSysRender::createCameraFrustumCorner ( const GxMatrixAffine & inverseViewMatrix,
f32 nearZ,
f32 farZ,
f32 fov,
f32 aspect,
GxVector3 * pDst,
u32 dstCount )
protected

カメラの視推台の八隅を求める

Parameters
inverseViewMatrix[in] 逆ビュー行列
nearZ[in] 近クリップ
farZ[in] 遠クリップ
fov[in] 画角
aspect[in] アスペクト比
pDst[out] 出力データ
dstCount[in] 出力データ数
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMatirxToFit()

void GxSysRender::createMatirxToFit ( GxMatrixAffine & outMatrix,
const GxAABB & aabb )
protected

フラスタムのフィットする変換行列を作成

Parameters
outMatrix[out] 変換行列
aabb[in] AABB
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createOpacityMap()

b32 GxSysRender::createOpacityMap ( void )
protected

不透明マップ作成

Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createRealTimeEnvironmentMap()

b32 GxSysRender::createRealTimeEnvironmentMap ( void )
protected

動的環境マップ作成

Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ environmentMapDrawCountDown()

b32 GxSysRender::environmentMapDrawCountDown ( void )
protected

環境マップウェイトカウント

Returns
描画完了ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extendToWorldMaxMin() [1/2]

void GxSysRender::extendToWorldMaxMin ( GxAABB & aabb,
const GxMatrix44 & lightViewProjectionMatrix,
f32 yMax,
f32 yMin )
protected

AABBをYmax/minに収めるまで延ばす

Parameters
aabb[in] AABB
lightViewProjectionMatrix[in] ライトビュー射影行列
yMax[in] Y軸の最大値
yMin[in] Y軸の最小値
Here is the call graph for this function:

◆ extendToWorldMaxMin() [2/2]

void GxSysRender::extendToWorldMaxMin ( GxAABB & aabb,
const GxMatrixAffine & lightViewMatrix,
f32 yMax,
f32 yMin )
protected

AABBをYmax/minに収めるまで延ばす

Parameters
aabb[in] AABB
lightViewMatrix[in] ライトビュー行列
yMax[in] Y軸の最大値
yMin[in] Y軸の最小値
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getModelShaderPackage()

GX_FORCE_INLINE GxResShaderPackage * GxSysRender::getModelShaderPackage ( void )
inlineoverridevirtual

モデル用シェーダパッケージを取得

Reimplemented from GxSysRenderBase.

Here is the caller graph for this function:

◆ getPointShadowFishEyeParameter()

GxVector4 GxSysRender::getPointShadowFishEyeParameter ( const GxUnitLightBase * pPointShadowLight,
b32 useOffset )
protected

ポイントシャドウ用魚眼パラメータを取得

Parameters
pPointShadowLight[in] ポイントシャドウライト
useOffset[in] シャドウオフセット値を使用する
Returns
魚眼パラメータ
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPointShadowMatrix()

GxMatrixAffine GxSysRender::getPointShadowMatrix ( const GxUnitLightBase * pPointShadowLight,
b32 lookBehind )
protected

ポイントシャドウ行列を取得

Parameters
pPointShadowLight[in] ポイントシャドウライト
lookBehind[in] ライトの向きと逆向きの行列を作る
Returns
ポイントシャドウ行列
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getShadowBuffer()

GxRenderTexture * GxSysRender::getShadowBuffer ( RENDER_VIEW view = RENDER_VIEW::_0) const

カスケードシャドウマップを取得

Parameters
view[in] ビュー
Returns
シャドウマップ
Here is the caller graph for this function:

◆ getShadowBufferViewportRect()

GxRect GxSysRender::getShadowBufferViewportRect ( u32 index,
RENDER_VIEW view ) const

カスケードシャドウマップのビューポート矩形を取得

Parameters
index[in] インデックス
view[in] ビュー
Returns
ビューポート矩形
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getShadowMatrixType()

GxSysRender::SHADOW_MATRIX_TYPE GxSysRender::getShadowMatrixType ( void )

シャドウマトリクスの生成方式を取得

Returns
生成方式

◆ initialize()

b32 GxSysRender::initialize ( const GxClassBase * pInitialInformation)
overridevirtual

初期化

Parameters
pInitialInformation[in] 初期化情報
Returns
成功ならtrue

Reimplemented from GxSysBase.

Here is the call graph for this function:

◆ primitiveCustomShaderCallback()

s32 GxSysRender::primitiveCustomShaderCallback ( void * pSource,
void * pArgument )
protected

プリミティブ用カスタムシェーダコールバック

Parameters
pSource[in] 呼び出し元
pArgument[in] 引数
Returns
常に1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ registShadowLight()

void GxSysRender::registShadowLight ( GxUnitLightShadow * pLight)
protected

シャドウライトの登録

Parameters
pLight[in] シャドウライト
Here is the caller graph for this function:

◆ renderInitialize()

b32 GxSysRender::renderInitialize ( void )
protected

描画初期化

Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderUnit()

void GxSysRender::renderUnit ( void )
overrideprotectedvirtual

ユニットの描画

GX_USE_MULTISAMPLE && !_PS4 && !_PS5

Reimplemented from GxSysRenderBase.

◆ scissoringFrustum()

u32 GxSysRender::scissoringFrustum ( const GxVector3 * pSrc,
GxVector3 * pDst,
u32 dstCount,
f32 yMax,
f32 yMin )
protected

視推台をYmax/minで切る

Parameters
pSrc[in] 入力データ
pDst[out] 出力データ
dstCount[in] 出力データ数
yMax[in] Y軸の最大値
yMin[in] Y軸の最小値
Returns
作成した頂点数
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRenderMaterial()

void GxSysRender::setRenderMaterial ( GxRenderMaterial * pMaterial)
protected

マテリアル設定

Parameters
pMaterial[in] マテリアル
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShadowLight()

GxUnitLightShadow * GxSysRender::setShadowLight ( GxUnitLightShadow * pLight)
protected

シャドウライトを設定

Parameters
pLight[in] シャドウライト
Here is the caller graph for this function:

◆ setShadowMatrixType()

void GxSysRender::setShadowMatrixType ( SHADOW_MATRIX_TYPE matrixType)

シャドウマトリクスの生成方式を設定

Parameters
matrixType[in] 生成方式

PSM

Ortho

LiSPSM

◆ terminate()

void GxSysRender::terminate ( void )
overridevirtual

終了処理

Reimplemented from GxSysBase.

◆ unregistShadowLight()

void GxSysRender::unregistShadowLight ( GxUnitLightShadow * pLight)
protected

シャドウライトの登録解除

Parameters
pLight[in] シャドウライト
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void GxSysRender::update ( void )
overridevirtual

更新

Reimplemented from GxSysBase.

Here is the call graph for this function:

◆ updateOpacityMap()

void GxSysRender::updateOpacityMap ( GxViewport * pViewport)
protected

不透明マップ更新

Parameters
pViewport[in] ビューポート
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShadowLight()

void GxSysRender::updateShadowLight ( RENDER_VIEW view)
protected

シャドウライトを更新

Parameters
view[in] ビュー
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShadowMatrixLisPSM()

void GxSysRender::updateShadowMatrixLisPSM ( RENDER_VIEW view,
const GxVector3 & sunVector,
GxShadowDataView * pShadowDataView,
f32 yMax,
f32 yMin )
protectedvirtual

シャドウ行列の更新

Parameters
view[in] ビュー
sunVector[in] 太陽ベクトル
pShadowDataView[in] シャドウデータ
yMax[in] Y軸の最大値
yMin[in] Y軸の最小値
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShadowMatrixOrtho()

void GxSysRender::updateShadowMatrixOrtho ( RENDER_VIEW view,
const GxVector3 & sunVector,
GxShadowDataView * pShadowDataView,
f32 yMax,
f32 yMin )
protectedvirtual

シャドウ行列の更新

Parameters
view[in] ビュー
sunVector[in] 太陽ベクトル
pShadowDataView[in] シャドウデータ
yMax[in] Y軸の最大値
yMin[in] Y軸の最小値
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShadowMatrixStable()

void GxSysRender::updateShadowMatrixStable ( RENDER_VIEW view,
const GxVector3 & sunVector,
GxShadowDataView * pShadowDataView,
f32 yMax,
f32 yMin )
protectedvirtual

シャドウ行列の更新

Parameters
view[in] ビュー
sunVector[in] 太陽ベクトル
pShadowDataView[in] シャドウデータ
yMax[in] Y軸の最大値
yMin[in] Y軸の最小値
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: