Crt-geom-flat.cg - the myth, the legend

Dear emulation-enthusiasts,

for a long time now have I been tinkering around with emulators and shaders, trying to achieve an enjoyable solution for playing mainly SNES games on my PC. Reproducing scanlines and such is very important when trying to do this, I am sure everyone here knows that.

On my quest for the perfect shader I have tried a lot of shaders from a lot of different packs. Whatever emulation-wiki I researched said the same thing: The best and most popular crt-shader is crt-geom-flat.cg But there is a problem with this shader: It is simply nowhere to be found! It’s contained in no shader-pack I have come across, it is nowhere on Github and all the download links on the wikis are dead.

All I can find is the regular crt-geom.cg but I do not like the curvature. I tried modding it according to the crt-geom entry in the Gametech-Wiki but that article seems horribly out of date since none of the cited lines are where they supposed to be and trying to comment out anything related to curvature results in the shader not working anymore.

Can anyone please tell me how to flatten the current crt-geom.cg or post a download link for a ready to go one?

The Gametech-Wiki page even mentions three (!) versions of crt-geom.cg: The standard one, a sharpness one and a halation one. It would be very nice to have all those three in a flat version. I hope someone can help me with this. This shader is the only one I want and need. Out of all the shaders I have tried this is clearly the best, the only one that emulates stuff like the flickering display on the title screen of Super Metroid, but the curvature of the regular version simply doesn’t do it for me.

Best regards

All of the crt-geom variants–including the flat and sharpness variants–were just slight modifications of the original crt-geom shader by cgwg. When we added support for runtime parameters, we merged a bunch of redundant crt-geom variants into a single shader with cgwg’s defaults as the shader’s defaults (the halation version is significantly different and remains separate). You can still modify the original shader at runtime to look however you want using the parameters, and the parameter system also makes it easy to hardcode new defaults.

If you open the crt-geom.cg file in a text editor (I recommend notepad++; it’s free and open-source) you can modify the default shader values in those first few lines that start with #pragma parameter by changing the first number after the name (the numbers denote: default value, minimum value, maximum value and “step”).

So, to make it flat, go to line 4, “CRTGeom Curvature Toggle” and change the default value from 1.0 to 0.0. You’ll probably want to also change the “CRTGeom Corner Size” default from 0.03 to 0.001 at the same time.

Thank you for your help, after alredy helping me out with a similar issue on the higan forums!

I tried modding the shader file. Making the corners sharp worked perfectly but I cannot get rid of the curvature. My line 4 now looks like this:

#pragma parameter CURVATURE “CRTGeom Curvature Toggle” 0.0 0.0 1.0 1.0

But the image is still curved. Is there anything else I have to modify?

No, that should do it. What happens if you play with that value in the shader parameters menu? Does it flatten it out like it should?

You mean this line?

#define CURVATURE 1.0

If I modify it the shader stops working and gives me a black screen.

Try this one.

(add with Shader passes = 1 click on Shader 0 to select)

I haven’t really read the whole thread, but the following thread links to a mirror of the mythical and legendary (hehe) file: https://libretro.com/forums/showthread.php?t=2768 (http://kopasite.net/up/0/crt-geom-flat.cgp)

Many thanks twipley.

Search around the net for this file for various days.

Thank u so much!!