public Resize ( DeviceContextHolder holder, int width, int height ) : void | ||
holder | DeviceContextHolder | |
width | int | |
height | int | |
Résultat | void |
public void OnInitialize(DeviceContextHolder holder) { _effect = holder.GetEffect<EffectPpHdr>(); _blurHelper = holder.GetHelper<BlurHelper>(); _textures = Enumerable.Range(0, DownsamplerAdaptationCycles) .Select(x => TargetResourceTexture.Create(Format.R16G16B16A16_Float)) .ToArray(); _averateColor = Enumerable.Range(0, 2).Select(x => { var t = TargetResourceTexture.Create(Format.R16G16B16A16_Float); t.Resize(holder, 1, 1); return t; }).ToArray(); _newAverageColor = TargetResourceTexture.Create(Format.R16G16B16A16_Float); _newAverageColor.Resize(holder, 1, 1); _bloomTexture = TargetResourceTexture.Create(Format.R16G16B16A16_Float); _tempTexture = TargetResourceTexture.Create(Format.R16G16B16A16_Float); }
private void PrepareOutlineBuffer() { if (_outlineBuffer != null) return; _outlineBuffer = TargetResourceTexture.Create(Format.R8G8B8A8_UNorm, SampleDescription); _outlineDepthBuffer = TargetResourceDepthTexture.Create(); if (!InitiallyResized) return; _outlineBuffer.Resize(DeviceContextHolder, Width, Height); _outlineDepthBuffer.Resize(DeviceContextHolder, Width, Height); }