2DKnights
Member
Hi I'm looking for a coder to create a CRT Shader. The shader should be applied to the default application surface as I want it to show over everything.
I really like the shaders used in Blazing Chrome and I would like to have something like those. The look I want for the shader is demonstrated below. Notice the shader can either be flat or have a slight barrel effect with a thin vignette around the edge. I wrote an existing CRT shader that just draws lines across the screen over 50% of a stretched pixel and it can be modified if need be. It's uncommented, but if you dont understand the fragment shader code this job probably isn't a good fit for you lol. Also if you want to start from scratch feel free to do so as well.
Completion of this shader can lead to more work, so serious inquiries only. Send me a private message if interested. Post questions to the topic.
(Curvature & Vignette)
(Flat)
(Detail 400x)
I really like the shaders used in Blazing Chrome and I would like to have something like those. The look I want for the shader is demonstrated below. Notice the shader can either be flat or have a slight barrel effect with a thin vignette around the edge. I wrote an existing CRT shader that just draws lines across the screen over 50% of a stretched pixel and it can be modified if need be. It's uncommented, but if you dont understand the fragment shader code this job probably isn't a good fit for you lol. Also if you want to start from scratch feel free to do so as well.
Completion of this shader can lead to more work, so serious inquiries only. Send me a private message if interested. Post questions to the topic.
Code:
// Barebones CRT fragment shader
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform float scale;
uniform float strength;
void main() {
vec4 CrtColor = vec4(1.0,1.0,1.0,1.0);
int edge_scale = int(scale / 2.0);
bool top_half = int(mod(gl_FragCoord.y,scale)) < edge_scale;
if (top_half) {
CrtColor.rgb = vec3(strength, strength, strength);
}//end if
gl_FragColor = CrtColor * v_vColour * texture2D( gm_BaseTexture, v_vTexcoord ) ;
}//end fragment shader
(Flat)
(Detail 400x)