| 93 | } |
| 94 | |
| 95 | bool 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 | |
| 116 | bool VolumetricFogPass::setupResources() |
| 117 | { |
no test coverage detected