From b261e86c6291d8ef1af150d2bafcf3e68bc4fa03 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 16 Feb 2016 20:37:04 -0500 Subject: [PATCH] Reintroduced lateral as a parameter in CRT drawing, to simulate a rounded raster. --- Outputs/CRT/CRT.cpp | 2 +- Outputs/CRT/CRTOpenGL.cpp | 2 +- Outputs/CRT/CRTOpenGL.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index fef92d957..0d042a48c 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -44,7 +44,7 @@ void CRT::set_new_timing(unsigned int cycles_per_line, unsigned int height_of_di // generate timing values implied by the given arbuments _sync_capacitor_charge_threshold = ((syncCapacityLineChargeThreshold * _cycles_per_line) * 50) >> 7; const unsigned int vertical_retrace_time = scanlinesVerticalRetraceTime * _cycles_per_line; - const float halfLineWidth = (float)_height_of_display * 2.0f; + const float halfLineWidth = (float)_height_of_display * 2.5f; // creat the two flywheels unsigned int horizontal_retrace_time = scanlinesVerticalRetraceTime * _cycles_per_line; diff --git a/Outputs/CRT/CRTOpenGL.cpp b/Outputs/CRT/CRTOpenGL.cpp index 23c308c66..abb31c638 100644 --- a/Outputs/CRT/CRTOpenGL.cpp +++ b/Outputs/CRT/CRTOpenGL.cpp @@ -311,7 +311,7 @@ char *CRT::get_fragment_shader() "void main(void)" "{" - "fragColour = vec4(rgb_sample(srcCoordinatesVarying).rgb, 10.0 * exp(-age * 2.0));" + "fragColour = vec4(rgb_sample(srcCoordinatesVarying).rgb, 10.0 * exp(-age * 2.0) * sin(lateralVarying));" "}" , _rgb_shader); } diff --git a/Outputs/CRT/CRTOpenGL.hpp b/Outputs/CRT/CRTOpenGL.hpp index bbf6f3df1..b3bfcd55f 100644 --- a/Outputs/CRT/CRTOpenGL.hpp +++ b/Outputs/CRT/CRTOpenGL.hpp @@ -22,6 +22,6 @@ const int CRTInputBufferBuilderHeight = 1024; const int CRTIntermediateBufferWidth = 2048; const int CRTIntermediateBufferHeight = 2048; -const int kCRTNumberOfFrames = 3; +const int kCRTNumberOfFrames = 4; #endif /* CRTOpenGL_h */