Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRT-Geom with thinner scanlines #114

Open
Faberman opened this issue Jul 15, 2017 · 3 comments
Open

CRT-Geom with thinner scanlines #114

Faberman opened this issue Jul 15, 2017 · 3 comments

Comments

@Faberman
Copy link

Faberman commented Jul 15, 2017

Is it possible to modify the current version of crt-geom.cg to get thinner scanlines as shown on Game Tech Wiki?

With CURVATURE = "0.0" and SHARPER = "2.0" I get regular scanlines like this. But the goal is this - a fine mesh which contributes to a nice blending without an excessive amount of blur.

I guess it's all about this line: <fragment filter="nearest" outscale_x="1" outscale_y="2">. Is it possible to set outscale_x and outscale_y attributes in Cg shader? @Themaister, any help here?

Here is the full quote from GTW:

To obtain thinner, 480p-esque scanlines, first tweak the shader to apply greater sharpness, but only apply it to the TextureSize. The code should look like this:
uniform vec2 rubyTextureSize;
vec2 TextureSize = vec2(2*rubyTextureSize.x, 2*rubyTextureSize.y);
Again, this is for both the vertex and fragment portions. Don't forget to seek out any other instances of rubyTextureSize, and replace them with simply TextureSize.

Now, go to the beginning of the fragment portion, and modify it as such:
<fragment filter="nearest" outscale_x="1" outscale_y="2"><![CDATA[
This will only yield satisfactory results at 4x integer scale. Anything else will likely cause problems. It might also be wise to disable the phosphor emulation, as leaving it on produces a "grid"-like effect, which may or may not be desirable.

@Faberman Faberman changed the title CRT-Geom thinner scanlines CRT-Geom with thinner scanlines Jul 15, 2017
@hizzlekizzle
Copy link
Collaborator

The way to do it is to add a first pass of the stock shader at 2x scale and then add crt-geom as a second pass. You'll want to disable the interlacing detection using the "CRTGeom Interlacing" option.

@Faberman
Copy link
Author

Faberman commented Jul 15, 2017

@hizzlekizzle, unfortunately, there are no scanlines at all with these settings.
Left - reference, right - current result: http://i.imgur.com/hSpOUZ3.png

@hizzlekizzle
Copy link
Collaborator

It's still showing scanlines for me but it's not looking like it's supposed to. I'll try to work on it some soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants