13GX_CORE_NAMESPACE_BEGIN()
17#if !defined(ENABLE_LINEAR_Z)
18#define ENABLE_LINEAR_Z 0
22#define USE_MULTISAMPLE_VIEWPORT
26#define USE_TEMPORARY_RENDER_TARGET 1
28#define USE_TEMPORARY_RENDER_TARGET 0
55#if defined(GX_USE_FP16MAP)
66#if defined(_PS4) || defined(_PS5)
67 , _useHtileOnShadowBuffer(
true)
68 , _useHtileOnDepthStencil(
true)
70 , _useHtileOnDepthStencilNeo(
true)
100#if defined(_PS4) || defined(_PS5)
101 b32 _useHtileOnShadowBuffer;
102 b32 _useHtileOnDepthStencil;
104 b32 _useHtileOnDepthStencilNeo;
193 GX_FORCE_INLINE
b32 isEnableBakeLightProbe(
void) {
return _enableBakeLightProbe; }
195 GX_FORCE_INLINE
void setEnableBakeLightProbe(
b32 enableBakeLightProbe) { _enableBakeLightProbe = enableBakeLightProbe; }
202#if GX_ENABLE_OCCLUSION_CULLING
204 GX_FORCE_INLINE
b32 isOcclusionCulling(
void)
const {
return _isOcclusionCulling; }
206 GX_FORCE_INLINE
void setOcclusionCulling(
b32 enable) { _isOcclusionCulling = enable; }
210 GX_FORCE_INLINE
b32 isCullingLock(
void)
const {
return _cullingLock; }
212 GX_FORCE_INLINE
void setCullingLock(
b32 enable) { _cullingLock = enable; }
220#if defined(_PS4) || defined(_PS5)
222 GX_FORCE_INLINE
b32 isUseHtileOnDepthStencil(
void)
const {
return _useHtileOnDepthStencil; }
225 GX_FORCE_INLINE
b32 isUseHtileOnDepthStencilNeo(
void)
const {
return _useHtileOnDepthStencilNeo; }
227#if GX_ENABLE_HTILE_STENCIL_MASK
229 GX_FORCE_INLINE
b32 isHtileStencilMaskEnable(
void)
const {
return _htileStencilMaskEnable; }
231 GX_FORCE_INLINE
void setHtileStencilMaskEnable(
b32 enable) { _htileStencilMaskEnable = enable; }
233 GX_FORCE_INLINE
void setHtileStencilMaskParams(u32 viewIndex, f32 outAngle, f32 inAngle, f32 topAngle, f32 bottomAngle, f32 cutOff, f32 cutOut)
235 _htileStencilMaskParams[viewIndex][0] = outAngle;
236 _htileStencilMaskParams[viewIndex][1] = inAngle;
237 _htileStencilMaskParams[viewIndex][2] = topAngle;
238 _htileStencilMaskParams[viewIndex][3] = bottomAngle;
239 _htileStencilMaskParams[viewIndex][4] = cutOff;
240 _htileStencilMaskParams[viewIndex][5] = cutOut;
243 GX_FORCE_INLINE
const f32* getHtileStencilMaskParams(u32 viewIndex)
const {
return _htileStencilMaskParams[viewIndex]; }
257 void update(
void)
override;
259 virtual void render(
void);
306 s32 enablePrimIdMapCallback(
void* pSource,
void* pArgument);
308 s32 disablePrimIdMapCallback(
void* pSource,
void* pArgument);
311 s32 enableNeoRenderModeGradientAdjustCallback(
void* pSource,
void* pArgument);
313 s32 disableNeoRenderModeGradientAdjustCallback(
void* pSource,
void* pArgument);
315 s32 enableNeoRenderModeAaSampleLocationCallback(
void* pSource,
void* pArgument);
317 s32 disableNeoRenderModeAaSampleLocationCallback(
void* pSource,
void* pArgument);
319 s32 enableNeoRenderModeAaSettingCallback(
void* pSource,
void* pArgument);
321 s32 disableNeoRenderModeAaSettingCallback(
void* pSource,
void* pArgument);
324 s32 setRenderTargetsForPrimIdGeometryCallback(
void* pSource,
void* pArgument);
346 void resolveViewportByNeoRenderMode(
void);
349 s32 resolveNeoRenderModeCallback(
void* pSource,
void* pArgument);
353 virtual GxRenderTexture* getViewportRenderTarget(RENDER_VIEW viewport);
364 GxSize _virtualResolution;
365 GxRect _virtualSafetyArea;
366 GxSize _defaultViewportResolution;
383 b32 _enableBakeLightProbe;
386 b32 _isFrustumCulling;
387#if GX_ENABLE_OCCLUSION_CULLING
388 b32 _isOcclusionCulling;
393 b32 _shadowCullingModeDefault;
395#if defined(_PS4) || defined(_PS5)
396 b32 _useHtileOnDepthStencil;
398 b32 _useHtileOnDepthStencilNeo;
400#if GX_ENABLE_HTILE_STENCIL_MASK
401 b32 _htileStencilMaskEnable;
449 virtual void update(
void);
526#if USE_TEMPORARY_RENDER_TARGET
528 constexpr GxRenderTexture* getTemporaryMap(
void)
const {
return _pTexTemporary; }
531 constexpr GxRenderTexture* getVelocityMap(void) const { return _pTexVelocity; }
541 constexpr GxRenderTexture* getLinearZMap(
void)
const {
return _pTexLinearZ; }
544 constexpr GxRenderTexture* getEffectZMap(void) const { return _pTexEffectZ; }
548#if defined(USE_MULTISAMPLE_VIEWPORT)
569 constexpr void setIndex(u32 index){ _viewportIndex = index; }
571 constexpr u32
getIndex(
void){
return _viewportIndex; }
573#if defined(_PS4) || defined(_PS5)
578 constexpr GxRenderTexture* getPrimIdMap(
void)
const {
return _pTexPrimId; }
581 constexpr GxRenderTexture* getAfterResolveRenderTarget(
void)
const {
return _pTexAfterResolveRenderTarget; }
584 constexpr GxRenderTexture* getDepthStencilNeo(
void)
const {
return _pDepthStencilNeo; }
587 void notifyNeoRenderModeChanged(
void);
598 b32 _isRenderDisplay;
619 GxSize _lightProbeMapResolution;
620 u32 _lightProbeResolution[
static_cast<u32
>(
AXIS::MAX)];
622#if USE_TEMPORARY_RENDER_TARGET
627 GxSize _velocityMapResolution;
635#if defined(USE_MULTISAMPLE_VIEWPORT)
640#if defined(_PS4) || defined(_PS5)
673GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
u32 GX_HANDLE
ハンドル
Definition GxDefine.h:214
RENDER_VIEW
描画優先度(ビュー)
Definition GxRender.h:442
RENDER_ANTI_ALIASING
アンチエイリアシング
Definition GxRender.h:382
RENDER_FORMAT
フォーマット
Definition GxRender.h:269
@ R8G8B8A8
R8G8B8A8(B8G8R8A8でもこれを使う。RGBAの並びは抽象化されているので無視してもいい。)
@ R16G16B16A16F
R16G16B16A16F.
RENDER_PASS
描画優先度(パス)
Definition GxRender.h:515
RENDER_SUB_VIEW
描画優先度(サブビュー)
Definition GxRender.h:485
オブジェクト基底クラス
Definition GxBase.h:88
JSON解析用ノード
Definition GxJson.h:108
static constexpr u32 VALUE_128
128
Definition GxMath.h:126
static constexpr u32 VALUE_64
64
Definition GxMath.h:125
描画コマンドの並列発行を管理します。
Definition GxRenderContext.h:28
GX_FORCE_INLINE const GxSize & getOutputResolution(void) const
出力解像度の取得
Definition GxRenderDevice.h:1017
GX_FORCE_INLINE const GxRect & getSafetyArea(void) const
セーフティエリアの取得
Definition GxRenderDevice.h:1023
インデックスバッファを管理する
Definition GxRenderIndexBuffer.h:20
テクスチャクラス
Definition GxRenderTexture.h:19
頂点バッファを管理する
Definition GxRenderVertexBuffer.h:20
頂点シェーダに渡す頂点の宣言を管理する
Definition GxRenderVertexDeclaration.h:22
シェーダパッケージリソースクラス
Definition GxResShaderPackage.h:19
システム基底クラス
Definition GxSysBase.h:18
ビューポートクラス
Definition GxSysRenderBase.h:414
constexpr GxRenderTexture * getSSAOHorizontalBlurredMap(void) const
SSAO水平ブラーマップを取得
Definition GxSysRenderBase.h:507
constexpr GxRenderTexture * getMultiSample(void) const
マルチサンプル
Definition GxSysRenderBase.h:550
GX_FORCE_INLINE void setRenderDisplay(b32 enable)
画面に描画するか設定
Definition GxSysRenderBase.h:468
constexpr GxUnitCameraBase * getCamera(void) const
カメラを取得
Definition GxSysRenderBase.h:474
GX_FORCE_INLINE const GxSize & getResolution(void) const
解像度取得
Definition GxSysRenderBase.h:478
constexpr GxRenderVertexBuffer * getLightingVertexBuffer(void) const
ライト用頂点バッファの取得
Definition GxSysRenderBase.h:558
const GxSize & getVelocityMapResolution(void) const
速度マップの解像度取得
Definition GxSysRenderBase.h:535
GxViewport(void)
デフォルトコンストラクタ
Definition GxSysRenderBase.cpp:1248
constexpr GxRenderIndexBuffer * getLightingIndexBuffer(void) const
ライト用インデックスバッファの取得
Definition GxSysRenderBase.h:560
GX_FORCE_INLINE void setEnable(b32 enable)
有効か否かの設定
Definition GxSysRenderBase.h:464
constexpr GxRenderTexture * getDiffuseMap(void) const
ディフューズマップを取得
Definition GxSysRenderBase.h:511
constexpr GxRenderTexture * getFogColorMap(void) const
フォグ色マップを取得
Definition GxSysRenderBase.h:515
constexpr GxRenderTexture * getMetallicRoughnessMap(void) const
メタリック/ラフネスマップを取得
Definition GxSysRenderBase.h:525
constexpr void setCamera(GxUnitCameraBase *pCamera)
カメラを設定
Definition GxSysRenderBase.h:476
void setVelocityMapResolution(const GxSize &resolution)
速度マップの解像度設定
Definition GxSysRenderBase.h:537
GX_FORCE_INLINE void setFormat(RENDER_FORMAT format)
フォーマット設定
Definition GxSysRenderBase.h:484
GX_FORCE_INLINE void setRegion(const GxRect ®ion)
領域設定
Definition GxSysRenderBase.h:492
constexpr GxRenderTexture * getRenderTarget(void) const
レンダーターゲットを取得
Definition GxSysRenderBase.h:497
constexpr RENDER_ANTI_ALIASING getAntiAliasing(void) const
アンチエイリアシング取得
Definition GxSysRenderBase.h:486
virtual GX_FORCE_INLINE b32 initialize(void)
初期化関数
Definition GxSysRenderBase.h:438
constexpr GxRenderTexture * getNormalMap(void) const
ノーマルマップを取得
Definition GxSysRenderBase.h:509
void setResolution(const GxSize &resolution)
解像度設定
Definition GxSysRenderBase.cpp:1380
void setLightProbeMapResolution(const GxSize &resolution)
ライトプローブマップの解像度設定
Definition GxSysRenderBase.cpp:2018
constexpr GxRenderTexture * getVelocityDepthStencilMap(void) const
速度深度マップを取得
Definition GxSysRenderBase.h:533
constexpr GxRenderTexture * getDepthStencil(void) const
深度ステンシルを取得
Definition GxSysRenderBase.h:501
GX_FORCE_INLINE void setOffScreen(b32 enable)
オフスクリーンにするか設定
Definition GxSysRenderBase.h:472
constexpr u32 getIndex(void)
indexを取得
Definition GxSysRenderBase.h:571
constexpr GxRenderTexture * getLightProbeMap(void) const
ライトプローブマップを取得
Definition GxSysRenderBase.h:517
constexpr GxRenderTexture * getLightProbe(u32 shIndex, u32 colorIndex) const
ライトプローブを取得
Definition GxSysRenderBase.h:523
constexpr GxRenderVertexDeclaration * getLightingVertexDeclaration(void) const
ライト用頂点宣言の取得
Definition GxSysRenderBase.h:556
GX_FORCE_INLINE b32 getEnable(void) const
有効か否かの取得
Definition GxSysRenderBase.h:462
constexpr GxRenderTexture * getSSAOMap(void) const
SSAOマップを取得
Definition GxSysRenderBase.h:505
GX_FORCE_INLINE b32 isRenderDisplay(void) const
画面に描画するか判定
Definition GxSysRenderBase.h:466
GX_FORCE_INLINE void setSize(const GxSize &size)
領域サイズ設定
Definition GxSysRenderBase.h:494
constexpr GxRenderTexture * getMultiSampleDepthStencil(void) const
マルチサンプル深度マップ
Definition GxSysRenderBase.h:552
b32 isRenderReady(void)
描画準備が出来ているかの取得。解像度更新中などの場合 false を返す。
Definition GxSysRenderBase.cpp:1409
constexpr GxRenderTexture * getShadowMap(void) const
シャドウマップを取得
Definition GxSysRenderBase.h:503
virtual void terminate(void)
終了処理
Definition GxSysRenderBase.cpp:1314
GX_FORCE_INLINE const GxRect & getRegion(void) const
領域取得
Definition GxSysRenderBase.h:490
virtual void update(void)
更新処理
Definition GxSysRenderBase.cpp:1367
void clearRenderTarget(RENDER_SUB_VIEW subView, RENDER_PASS pass, u32 subPriority=0)
画面クリア処理
constexpr RENDER_FORMAT getFormat(void) const
フォーマット取得
Definition GxSysRenderBase.h:482
GX_FORCE_INLINE void setAntiAliasing(RENDER_ANTI_ALIASING antiAliasing)
アンチエイリアシング設定
Definition GxSysRenderBase.h:488
void setRenderTarget(GxRenderTexture *pTexture)
レンダーターゲットを設定
Definition GxSysRenderBase.cpp:1395
constexpr GxRenderTexture * getSpecularMap(void) const
スペキュラマップを取得
Definition GxSysRenderBase.h:513
void setLightProbeResolution(u32 x, u32 y, u32 z)
ライトプローブの解像度設定
Definition GxSysRenderBase.cpp:2033
constexpr void setIndex(u32 index)
indexを設定
Definition GxSysRenderBase.h:569
constexpr GxRenderTexture * getSemiTransparenceMap(void) const
半透明マップを取得
Definition GxSysRenderBase.h:546
GX_FORCE_INLINE b32 isOffScreen(void) const
オフスクリーンにするか判定
Definition GxSysRenderBase.h:470
b32 updateRenderTarget(void)
レンダーターゲットの更新
Definition GxSysRenderBase.cpp:1463
描画システムクラス
Definition GxSysRenderBase.h:115
static void getPositionOutputToVirtual(const GxPoint2 &outputPosition, GxVector2 &virtualPosition)
OutputResolution→virtualResolutionに座標変換
Definition GxSysRenderBase.cpp:1062
static void getRectToVirtual(const GxRect &baseRect, GxRectF &dstRect, const GxSize *pInputResolution)
指定Resolution→virtualResolutionに矩形変換
Definition GxSysRenderBase.cpp:1092
virtual void renderUnit(void)
ユニットの描画
Definition GxSysRenderBase.cpp:419
GxViewport * getViewport(RENDER_VIEW index) const
ビューポートの取得
Definition GxSysRenderBase.h:177
static void getRectOutputToVirtual(const GxRect &baseRect, GxRectF &dstRect)
OutputResolution→virtualResolutionに矩形変換
Definition GxSysRenderBase.cpp:1120
GX_FORCE_INLINE void setVirtualResolution(GxSize &size)
仮想解像度の設定
Definition GxSysRenderBase.h:158
~GxSysRenderBase(void) override
デストラクタ
Definition GxSysRenderBase.h:142
constexpr GxRenderTexture * getClearTexture(void)
画面クリア用テクスチャのポインタを取得
Definition GxSysRenderBase.h:331
GX_FORCE_INLINE void setFrustumCulling(b32 enable)
フラスタムカリング有効設定
Definition GxSysRenderBase.h:201
GX_FORCE_INLINE const GxSize & getVirtualResolution(void) const
仮想解像度の取得
Definition GxSysRenderBase.h:160
void copyViewport(void)
ビューポートをコピー
Definition GxSysRenderBase.cpp:476
static void getPositionVirtualToOutput(const GxVector2 &virtualPosition, GxPoint2 &outputPosition)
virtualResolution→OutputResolutionに座標変換
Definition GxSysRenderBase.cpp:1052
b32 transformScreenToRay(const GxPoint2 &screenPosition, GxVector3 &rayStart, GxVector3 &rayEnd, const GxSize *pResolution=nullptr)
スクリーン座標→ワールド座標でのレイ
Definition GxSysRenderBase.cpp:954
GX_FORCE_INLINE void setClearColor(const GxColor &color)
クリアカラーを設定
Definition GxSysRenderBase.h:172
void terminate(void) override
終了処理
Definition GxSysRenderBase.cpp:147
u32 getViewIndex(GxViewport *pViewport) const
ビューインデックスの取得
Definition GxSysRenderBase.cpp:764
b32 initialize(const GxClassBase *pInitialInformation) override
初期化
Definition GxSysRenderBase.cpp:170
GX_FORCE_INLINE const GxSize & getDefaultViewportResolution(void) const
Viewportのデフォルト解像度の取得
Definition GxSysRenderBase.h:164
static constexpr u32 LIGHTING_TILE_WIDTH
ライティングのタイル幅
Definition GxSysRenderBase.h:129
u32 getEnableViewportNum(void)
有効なビューポートの数を取得
Definition GxSysRenderBase.cpp:729
const GxPoint2 transformWorldToScreen(const GxVector3 &worldPosition, const RENDER_VIEW viewport, const GxSize *pResolution=nullptr)
ワールド座標→スクリーン座標(カメラzチェックなし)
Definition GxSysRenderBase.cpp:802
GX_FORCE_INLINE const GxColor & getClearColor(void) const
クリアカラーを取得
Definition GxSysRenderBase.h:174
constexpr void setClearTexture(GxRenderTexture *pClearRenderTexture)
画面クリア用テクスチャを設定
Definition GxSysRenderBase.h:329
void drawClearTexture(GxViewport *pViewport)
画面クリア用テクスチャを描画
Definition GxSysRenderBase.cpp:1186
GX_FORCE_INLINE void setShadowCullingModeDefaul(b32 enable)
シャドウ描画時のカリングにデフォルト設定を有効にするか否か(trueの場合 デフォルト設定のカリング無効時;無効、有効時:フロントフェースカリング)
Definition GxSysRenderBase.h:218
GxViewport * getDisableViewport(void) const
未使用のビューポートを取得
Definition GxSysRenderBase.cpp:747
static void getRectVirtualToOutput(const GxRectF &baseRect, GxRect &dstRect)
virtualResolution→OutputResolutionに矩形変換
Definition GxSysRenderBase.cpp:1110
GX_FORCE_INLINE b32 isShadowCullingModeDefault(void) const
シャドウ描画時のカリングにデフォルト設定か否か(trueの場合 デフォルト設定のカリング無効時;無効、有効時:フロントフェースカリング)
Definition GxSysRenderBase.h:216
GX_FORCE_INLINE GxRenderContext * getRenderContext(u32 workerThreadIndex)
指定スレッドのコンテキストを取得
Definition GxSysRenderBase.h:356
static void getPositionFromVirtual(const GxVector2 &virtualPosition, GxPoint2 &outputPosition, const GxSize *pOutputResolution)
virtualResolution→指定Resolutionに座標変換
Definition GxSysRenderBase.cpp:1027
static void getPositionToVirtual(const GxPoint2 &inputPosition, GxVector2 &virtualPosition, const GxSize *pInputResolution)
指定Resolution→virtualResolutionに座標変換
Definition GxSysRenderBase.cpp:1040
void copyTextureToBackbuffer(GxRenderTexture *pDst, GxRenderTexture *pSrc, b32 isRight)
バックバッファにテクスチャをコピー
Definition GxSysRenderBase.cpp:620
static GxPoint2 getPositionViewPortToOutput(const GxPoint2 &viewportPosition, const RENDER_VIEW viewportNo)
各ビューポートでの2D座標系→OutputResolutionに変換
Definition GxSysRenderBase.cpp:1131
virtual GX_FORCE_INLINE GxResShaderPackage * getModelShaderPackage(void)
モデル用シェーダパッケージを取得(仮)
Definition GxSysRenderBase.h:189
GX_FORCE_INLINE const GxSize & getOutputResolution(void) const
出力解像度の取得
Definition GxSysRenderBase.h:162
constexpr GxRenderVertexBuffer * getInstanceVertexBuffer(void)
インスタンス用の頂点バッファの取得
Definition GxSysRenderBase.h:186
virtual b32 initializeThreadLocalStorage(u32 workerThreadIndex)
スレッドローカルストレージ初期化関数
Definition GxSysRenderBase.cpp:347
virtual void render(void)
描画
Definition GxSysRenderBase.cpp:377
GX_FORCE_INLINE const GxRect & getSafetyArea(void) const
セーフティエリアの取得
Definition GxSysRenderBase.h:167
static GxPoint2 getPositionOutputToViewPort(const GxPoint2 &outputResolution, const RENDER_VIEW viewportNo)
OutputResolution→各ビューポートでの2D座標系に変換
Definition GxSysRenderBase.cpp:1159
GX_FORCE_INLINE b32 isFrustumCulling(void) const
フラスタムカリング有効判定
Definition GxSysRenderBase.h:199
GX_FORCE_INLINE const GxRect & getVirtualSafetyArea(void) const
セーフティエリアの取得(仮想座標系)
Definition GxSysRenderBase.h:169
RENDER_VIEW getViewportFromScreen(const GxPoint2 &screenPosition)
スクリーン座標からビューポート番号を取得
Definition GxSysRenderBase.cpp:774
GxSysRenderBase(void)
コンストラクタ
Definition GxSysRenderBase.cpp:97
void update(void) override
更新
Definition GxSysRenderBase.cpp:363
const GxVector2 transformWorldToVirtual(const GxVector3 &worldPosition, const RENDER_VIEW viewport)
ワールド座標→仮想座標(カメラzチェックなし)
Definition GxSysRenderBase.cpp:912
static constexpr u32 LIGHTING_TILE_HEIGHT
ライティングのタイル高さ
Definition GxSysRenderBase.h:131
static void getRectFromVirtual(const GxRectF &baseRect, GxRect &dstRect, const GxSize *pOutputResolution)
virtualResolution→指定Resolutionに矩形変換
Definition GxSysRenderBase.cpp:1073
カメラ基礎クラス
Definition GxUnitCameraBase.h:20
シングルトン基礎クラス
Definition GxSingleton.h:19
static constexpr GxSysRenderBase * getSingletonPointer(void)
Definition GxSingleton.h:59
2次元浮動小数点数クラス
Definition GxStruct.h:22
3次元浮動小数点数クラス
Definition GxStruct.h:91
座標
Definition GxStruct.h:867
実数矩形
Definition GxStruct.h:1100
矩形
Definition GxStruct.h:951
s32 _bottom
底辺
Definition GxStruct.h:1091
static const GxRect ZERO
(0, 0, 0, 0)
Definition GxStruct.h:964
s32 _top
上辺
Definition GxStruct.h:1089
s32 _left
左辺
Definition GxStruct.h:1088
s32 _right
右辺
Definition GxStruct.h:1090
シェーダコード
Definition GxShaderPackage.h:52
サイズ
Definition GxStruct.h:730
static const GxSize ZERO
0
Definition GxStruct.h:743
s32 _width
幅
Definition GxStruct.h:857
s32 _height
高さ
Definition GxStruct.h:858
頂点構造体
Definition GxSysRenderBase.h:665
GxFloat3 _position
座標
Definition GxSysRenderBase.h:666
GxFloat2 _texCoord
テクスチャ座標
Definition GxSysRenderBase.h:667
2次元ベクトル
Definition GxVector.h:34
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173