Changes

Jump to navigation Jump to search

CRT-Royale

1,556 bytes added, 10:06, 21 October 2020
Interlacing
==System Requirements==
CRT-Royale is a large and complex shader, so it will need modern hardware to run correctly. Discreet Discrete Nvidia or AMD video cards made in the last few years are recommended. In particular, Intel iGPUs will struggle to run the shader and some may not even run in some cases. The author provided a preset for Intel users that compromises some functionality for compatibility. There's also various <code>user-settings.h</code> files in <code>crt-royale-settings-files</code><ref>[https://github.com/libretro/common-shaders/tree/master/crt/shaders/crt-royale/crt-royale-settings-files crt-royale-settings-files]</ref> that enable/disable options for different GPU profiles.
The display you use for CRT-Royale should have at least 1440p of resolution to give a decent level of detail for slot mask emulation, though 4K (2160p) or higher resolutions are recommended. 1080p displays can work for aperture grille emulation since less resolution is needed to render vertically aligned phosphors. This shader uses some features in RetroArch's Cg shader format that have has only been somewhat recently added since version 1.0.0.2, such as sRGB framebuffers and mipmapping, so you should at least be using RetroArch 1.2 for this shader.
==Customization==
CRT-Royale can be customized one of two ways: using the runtime shader parameters from inside [[RetroArch]] or editing the <code>user-settings.h</code> file. In order for the settings in <code>user-settings.h</code> that are marked with <code>_static</code> to take effect, runtime parameters must be disabled by commenting out <code>#define RUNTIME_SHADER_PARAMS_ENABLE</code> in <code>user-settings.h</code>. Doing this will make the runtime parameters non-functional so you will need to reload the shader to apply changes made in <code>user-settings.h</code>, but it will result in a performance boost since there is less need for expensive branching in the shader code when the settings are static.
There are some settings in <code>user-settings.h </code> that are static only and do not have a runtime parameter, and therefore do not require runtime parameters to be disabled to have an effect.
The settings listed below are taken from the runtime parameters with their default values.
levels_contrast = 1.000000
Gamma and contrast controls. CRT gamma is the output gamma of the shader, while LCD gamma is the input gamma, which should be 2.4 and 2.2 in most cases, respectively.
===Halation and Diffusion===
bloom_excess = 0.000000
These settings control the level of blooming in the shader. Higher <code>bloom_underestimate</code> will cause the bloom to be more intenseon phosphors that are fully lit, which raises the overall brightness of the image and counteracts the loss of brightness caused drawing a phosphor grid over the image. <code>bloom_excess</code> causes extra blurring of all colors to soften the bloom effect, which is disabled by default.
===Beam===
These settings determine the shape and size of the lit scanlines of the simulated CRT.
Min and max sigma settings affect the size of each scanline scan line relative to the brightness of the image. A large range of beam sigmas causes the scanlines to vary in width depending on brightness, while small ranges result in a less variable width of scanlines. Higher sigmas increase the size of the scanlinesscan lines, resulting in smaller gaps and more vertical blurring.
Min and max shape settings affect the Gaussian profile of the scanlines. Higher values for these make the scanline plateaus flatter and have steeper drop -offs. These effects are really only noticeable at higher screen resolutions.
<code>beam_horiz_filter</code> specifies how the beam is filtered horizontally. The options are 0.0 (Quilez, sharp and fast), 1.0 (Gaussian, configurable sharpness), and 2.0 (Lanczos2, sharp and higher quality). <code>beam_horiz_sigma</code> is used to set the level of blur when using Gaussian horizontal filtering.
convergence_offset_y_b = 0.000000
The convergence offsets settings specify how well the simulated CRT electron beams are aligned. The default values indicate perfect convergance convergence with no colors that are misaligned. However, real CRTs, particularly cheaper consumer models, very often did not have perfect converganceconvergence, so you can change the offsets to simulate that flaw if you want.
===Mask===
<code>mask_sample_mode_desired</code> specifies the sampling mode of the phosphor mask. The default of 0.0 is the highest quality and slowest method, while 1.0 is lower quality but faster. The 2.0 setting makes the mask tile without resizing, which results in a huge phosphor mask with the default mask textures, so it's intended more for mask textures for a screen of a fixed size.
<code>mask_triad_size_desired</code> specifies the size of each phosphor triad relative to the screen. Smaller triad size will make the simulated CRT like a high -resolution PC CRT or a Sony BVM with increased sharpness and less visible phosphors, while a larger triad size makes the simulated CRT into a low -resolution CRT like many consumer TVs with more blurring and less visible scanline gaps. It's recommended to keep this setting as a whole number, since fractional sizes seem to cause scaling artifacts sometimes.
If <code>mask_specify_num_triads</code> is set to 1.0, then the phosphor mask will be scaled to use the number of triads specified in <code>mask_num_triads_desired</code>. This is disabled by default.
 
Examples of each kind of phosphor style. :
<gallery widths=320 heights=240>
 
 
File:Aptureture girl.png|Aperture Grille
File:Slut mask.png|Slot Mask
File:Dope mask.png|Dot mask
 
</gallery>
===Anti-Aliasing===
These are the settings that control the geometry of the simulated CRT.
The geometry modes available are 0.0 (Flat), 1.0 ([[CRT-Geom]] style curvature), 2.0 (bulbous curvature), and 3.0 (cylindrical Trinitron curvature). View distance specifies how far the CRT is in the user's field of view. The tilt angle settings control which direction the screen is tilted. The aspect ratio of the simulated screen can also be configured. Overscan affects how much of the image is visible on the simulated CRT, since many consumer TVs did not display the full scan area.
Some people may find curvature to be distracting so leaving these settings at default will leave the CRT image perfectly flat.
interlace_1080i = 0.000000
These settings control how interlacing is handled by the shader. The "bff" setting refers to the order in which each scanline scan line field is displayed, where setting that to 1.0 would make it "bottom frame field first" as opposed to "top field first" like the default. The 1080i setting specifies whether interlacing is enabled if the input image is 1080 pixels tall, setting it to 1.0 makes it display 1080i instead of 1080p.
Interlacing detection can be turned off entirely by editing <code>interlace_detect</code> in <code>user-settings.h</code> to be <code>false</code>. This will make it display 480 pixel tall content as 480p instead of 480i, which will eliminate any flickering, but may result in combing artifacts if the game is interlaced natively. This setting is static only and is not a runtime parameter.
 
A recent version seems to have made this tunable at runtime. This was motivated by [https://amp.reddit.com/r/RetroArch/comments/ehw7te/stop_suffering_with_the_crtroyale_shader/ user feedback on SNES emulation], where the shader improperly detected interlacing on progressive video.
==Variants==
There are some different variants of the shader provided as different presets. Besides the default <code>crt-royale.cgp</code><ref>, there is a "fake bloom" preset that uses a much faster bloom method that is lower quality. There are also Intel variants of both the full and fake bloom versions of the shader that omit some features to allow the shader to run on Intel iGPUs. There are also presets with passes of Themaister's [[NTSC Filters|NTSC shader]] applied before the CRT-Royale passes, though this increases the requirements quite a bit. ==4K == CRT Royale works best at 2,880 × 2,160 (4K) resolution. That resolution is exactly 9 times 320x240, which was a common resolution for these consoles. <gallery widths=320 heights=240> File:Ff7 4k crt shader.png|Final Fantasy 7 (PlayStation)File:1446491029205-1-.png|Castlevania: Symphony of the Night (PlayStation)File:Retroarch-1102-0058354ertd.png|Castlevania: Symphony of the Night (PlayStation)File:Ff5 4k.png|Final Fantasy 5 (Super Famicom)File:Rtype 4k.png|R-Type Delta (PlayStation)File:Mr bones 4k.png|MediEvil (PlayStation)</gallery>
==Notes==
Anonymous user

Navigation menu