| 21 | static const uint32 LumMapSize = 1024; |
| 22 | |
| 23 | void PostProcessor::Initialize(ID3D11Device* device) |
| 24 | { |
| 25 | PostProcessorBase::Initialize(device); |
| 26 | |
| 27 | constantBuffer.Initialize(device); |
| 28 | |
| 29 | // Load the shaders |
| 30 | toneMap = CompilePSFromFile(device, L"PostProcessing.hlsl", "ToneMap"); |
| 31 | scale = CompilePSFromFile(device, L"PostProcessing.hlsl", "Scale"); |
| 32 | blurH = CompilePSFromFile(device, L"PostProcessing.hlsl", "BlurH"); |
| 33 | blurV = CompilePSFromFile(device, L"PostProcessing.hlsl", "BlurV"); |
| 34 | bloom = CompilePSFromFile(device, L"PostProcessing.hlsl", "Bloom"); |
| 35 | sharpen = CompilePSFromFile(device, L"PostProcessing.hlsl", "Sharpen"); |
| 36 | |
| 37 | reduceLuminanceInitial = CompileCSFromFile(device, L"LuminanceReduction.hlsl", |
| 38 | "LuminanceReductionInitialCS", "cs_5_0"); |
| 39 | reduceLuminance = CompileCSFromFile(device, L"LuminanceReduction.hlsl", "LuminanceReductionCS"); |
| 40 | |
| 41 | CompileOptions opts; |
| 42 | opts.Add("FinalPass_", 1); |
| 43 | reduceLuminanceFinal = CompileCSFromFile(device, L"LuminanceReduction.hlsl", "LuminanceReductionCS", |
| 44 | "cs_5_0", opts); |
| 45 | } |
| 46 | |
| 47 | void PostProcessor::AfterReset(uint32 width, uint32 height) |
| 48 | { |
no test coverage detected