MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Init

Method Init

Source/Engine/Renderer/VolumetricFogPass.cpp:95–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95bool VolumetricFogPass::Init()
96{
97 const auto& limits = GPUDevice::Instance->Limits;
98 _isSupported = limits.HasGeometryShaders && limits.HasVolumeTextureRendering && limits.HasCompute && limits.HasInstancing;
99
100 // Create pipeline states
101 _psInjectLight.CreatePipelineStates();
102
103 // Load assets
104 _shader = Content::LoadAsyncInternal<Shader>(TEXT("Shaders/VolumetricFog"));
105 if (_shader == nullptr)
106 {
107 return true;
108 }
109#if COMPILE_WITH_DEV_ENV
110 _shader.Get()->OnReloading.Bind<VolumetricFogPass, &VolumetricFogPass::OnShaderReloading>(this);
111#endif
112
113 return false;
114}
115
116bool VolumetricFogPass::setupResources()
117{

Callers 1

InitCircleBufferMethod · 0.45

Calls 15

ReleaseFunction · 0.85
ClampFunction · 0.85
Float3Class · 0.85
DivideAndRoundUpFunction · 0.85
GetGridSliceParametersFunction · 0.85
Float2Class · 0.85
Float4Class · 0.85
CreatePipelineStatesMethod · 0.80
UseVolumetricFogMethod · 0.80
GetWidthMethod · 0.80
Size3Method · 0.80
MaxFunction · 0.50

Tested by

no test coverage detected