Fix artifacts due to light shape culling and use depth test to improve perf
This commit is contained in:
@@ -16,30 +16,15 @@
|
||||
class ReflectionsPass : public RendererPass<ReflectionsPass>
|
||||
{
|
||||
private:
|
||||
|
||||
PACK_STRUCT(struct Data {
|
||||
ShaderEnvProbeData PData;
|
||||
Matrix WVP;
|
||||
ShaderGBufferData GBuffer;
|
||||
});
|
||||
|
||||
AssetReference<Shader> _shader;
|
||||
GPUPipelineState* _psProbeNormal;
|
||||
GPUPipelineState* _psProbeInverted;
|
||||
GPUPipelineState* _psCombinePass;
|
||||
GPUPipelineState* _psProbe = nullptr;
|
||||
GPUPipelineState* _psProbeInside = nullptr;
|
||||
GPUPipelineState* _psCombinePass = nullptr;
|
||||
|
||||
AssetReference<Model> _sphereModel;
|
||||
AssetReference<Texture> _preIntegratedGF;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// </summary>
|
||||
ReflectionsPass();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Perform reflections pass rendering for the input task.
|
||||
/// </summary>
|
||||
@@ -48,7 +33,6 @@ public:
|
||||
void Render(RenderContext& renderContext, GPUTextureView* lightBuffer);
|
||||
|
||||
public:
|
||||
|
||||
// [RendererPass]
|
||||
String ToString() const override;
|
||||
bool Init() override;
|
||||
@@ -56,15 +40,14 @@ public:
|
||||
#if COMPILE_WITH_DEV_ENV
|
||||
void OnShaderReloading(Asset* obj)
|
||||
{
|
||||
_psProbeNormal->ReleaseGPU();
|
||||
_psProbeInverted->ReleaseGPU();
|
||||
_psProbe->ReleaseGPU();
|
||||
_psProbeInside->ReleaseGPU();
|
||||
_psCombinePass->ReleaseGPU();
|
||||
invalidateResources();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// [RendererPass]
|
||||
bool setupResources() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user