| 394 | } |
| 395 | |
| 396 | void MeshRenderer::OnResize(uint32 width, uint32 height) |
| 397 | { |
| 398 | depthReductionTargets.clear(); |
| 399 | |
| 400 | uint32 w = width; |
| 401 | uint32 h = height; |
| 402 | |
| 403 | while(w > 1 || h > 1) |
| 404 | { |
| 405 | w = DispatchSize(ReductionTGSize, w); |
| 406 | h = DispatchSize(ReductionTGSize, h); |
| 407 | |
| 408 | RenderTarget2D rt; |
| 409 | rt.Initialize(device, w, h, DXGI_FORMAT_R16G16_UNORM, 1, 1, 0, false, true); |
| 410 | depthReductionTargets.push_back(rt); |
| 411 | } |
| 412 | |
| 413 | meshPSConstants.Data.RTSize.x = float(width); |
| 414 | meshPSConstants.Data.RTSize.y = float(height); |
| 415 | |
| 416 | areaLightConstants.Data.RTSize = meshPSConstants.Data.RTSize; |
| 417 | } |
| 418 | |
| 419 | void MeshRenderer::ReduceDepth(ID3D11DeviceContext* context, DepthStencilBuffer& depthTarget, |
| 420 | const Camera& camera) |
no test coverage detected