Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProcessDevice()

void ReLogic.Peripherals.RGB.ChromaPipeline.ProcessDevice ( RgbDevice device,
IEnumerable< ShaderOperation > shaders,
float time )
inlineprivate

Definition at line 28 of file ChromaPipeline.cs.

29 {
30 Fragment fragment = device.Rasterize();
31 if (shaders != null)
32 {
33 foreach (ShaderOperation shader in shaders)
34 {
35 shader.Process(device, fragment, time);
36 device.Render(fragment, shader.BlendState);
37 }
38 }
39 if (_hotkeys != null && device is RgbKeyboard rgbKeyboard)
40 {
41 rgbKeyboard.Render(_hotkeys.Where((RgbKey key) => key.IsVisible));
42 }
43 if (this.PostProcessingEvents != null)
44 {
45 fragment.Clear();
46 this.PostProcessingEvents(device, fragment, time);
47 device.Render(fragment, new ShaderBlendState(BlendMode.PerPixelOpacity));
48 }
49 }

References ReLogic.Peripherals.RGB.ChromaPipeline._hotkeys, ReLogic.Peripherals.RGB.ShaderOperation.BlendState, System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), ReLogic.Peripherals.RGB.ChromaPipeline.PostProcessingEvents, ReLogic.Peripherals.RGB.ShaderOperation.Process(), ReLogic.Peripherals.RGB.RgbDevice.Rasterize(), and ReLogic.Peripherals.RGB.RgbDevice.Render().

Referenced by ReLogic.Peripherals.RGB.ChromaPipeline.Process().