Next Generation Emulation banner

1021 - 1031 of 1031 Posts

·
Registered
Joined
·
2 Posts
Making it work perfectly would indeed be very hard. At least it's confirmed that ePSXe itself is not the main issue. I have tried Retroarch a bit, but it still doesn't jibe with me. Maybe it will with some more time.

I'll probably mess some more with the values in the .slf file and see if I can make it work better somehow.
 

·
Not a Registered User
Joined
·
1,303 Posts
this may be irrelevant but, will epsxe GPU core ever be updated? or is it gonna remain the same version forever.
Sadly that's very unlikely after all GPUcore is just perfect :) kidding aside ePSXe devs tend to be very inactive nad there is more focus on the android version, plus other than some optimizations there;s not much that can be done with GPUcore seeing as it is a CPU based render, maybe implement 8x and 16x internal resolution which would destroy just about any CPU for little to no gain with PS1 graphics.
As some people say you can polish a turd only so much, but still it's gonna be a turd.
 

·
Registered
Joined
·
2 Posts
I'm very late to this discussion, but maybe one of you is still around.

I'm using the Advanced Cartoon Shader on my modded FF7 PC version and launching the game with 7th Heaven, I absolutely love what it does to the colors because it basically shifts the scheme from traditional FF7 to something more like Advent Children where saturation was very low across the board, are there values that I can change within the .slf to better convert these? The black lines are very lacking by comparison to emulating the original but they are there none the less but I don't know what to tweak to get them to thicken, I'm rather new to the language. The other problem I'm running into is that the shader format of the PC version uses 4 files (.post/main.frag/main.vert/yuv.frag) the last file being used by the mods instead of the slf/slv the emulator does, and it won't launch most shaders to begin with, I have tried most of the ones I could find.

The other question I had was how to blend the advanced cartoon shader with the simple bloom shader that was provided with the launcher? bloom2.post
Code:
uniform sampler2D tex;
uniform float width;
uniform float height;

void main()
{
   vec4 sum = vec4(0);
   vec2 texcoord = vec2(gl_TexCoord[0]);
   int j;
   int i;

   for( i= -4 ;i < 4; i++)
   {
        for (j = -3; j < 3; j++)
        {
            sum += texture2D(tex, texcoord + vec2(j, i)*0.004) * 0.25;
        }
   }
       if (texture2D(tex, texcoord).r < 0.3)
    {
       gl_FragColor = sum*sum*0.012 + texture2D(tex, texcoord);
    }
    else
    {
        if (texture2D(tex, texcoord).r < 0.5)
        {
            gl_FragColor = sum*sum*0.009 + texture2D(tex, texcoord);
        }
        else
        {
            gl_FragColor = sum*sum*0.0075 + texture2D(tex, texcoord);
        }
    }
}
AdvCartoon
Code:
const float bb = 0.5; // effects black border sensitivity


uniform sampler2D OGL2Texture;

void main()
{
    vec3 c00 = texture2D(OGL2Texture, gl_TexCoord[5].xy).xyz;
    vec3 c10 = texture2D(OGL2Texture, gl_TexCoord[1].xy).xyz;
    vec3 c20 = texture2D(OGL2Texture, gl_TexCoord[2].zw).xyz;
    vec3 c01 = texture2D(OGL2Texture, gl_TexCoord[3].xy).xyz;
    vec3 c11 = texture2D(OGL2Texture, gl_TexCoord[0].xy).xyz;
    vec3 c21 = texture2D(OGL2Texture, gl_TexCoord[4].xy).xyz;
    vec3 c02 = texture2D(OGL2Texture, gl_TexCoord[1].zw).xyz;
    vec3 c12 = texture2D(OGL2Texture, gl_TexCoord[2].xy).xyz;
    vec3 c22 = texture2D(OGL2Texture, gl_TexCoord[6].xy).xyz;
    vec3 dt = vec3(1.0,1.0,1.0);

    float d1=dot(abs(c00-c22),dt);
    float d2=dot(abs(c20-c02),dt);
    float hl=dot(abs(c01-c21),dt);
    float vl=dot(abs(c10-c12),dt);
    float d = bb*(d1+d2+hl+vl)/(dot(c11,dt)+0.15);

    float lc = 4.0*length(c11);
    float f = fract(lc); f*=f;
    lc = 0.25*(floor(lc) + f*f)+0.05;
    c11 = 4.0*normalize(c11);
    vec3 frct = fract(c11); frct*=frct;
    c11 = floor(c11)+ 0.05*dt + frct*frct;
    gl_FragColor.xyz = 0.25*lc*(1.1-d*sqrt(d))*c11;
}
You guys are awesome, I have been reading everything I can in these forums for a couple days now and I figured I would just ask.
 

·
Registered
Joined
·
64 Posts
Can you help me with shader?

I made shader based on Natural (Look how I changed graphics in PS1 ^_^ ) it makes picture natural and allow you control black/white points (levels), noise, saturation and blur offset



Its optimized for very high, but how can make this universal? I know that there is ogl2size vaiable, but i dont know how to use it

Also it need at least pete's filtering enable to fix, you can see that on word, how to include simple filtering to shader?





Shader code

slv
Code:
uniform vec4 OGL2Param;
#define soffset 0.00031


void main()
{
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

    gl_TexCoord[0]=gl_MultiTexCoord0.xyxy+vec4(-0.5,-0.5,-1.5,-1.5) * (OGL2Param.xyxy+soffset);
    gl_TexCoord[1]=gl_MultiTexCoord0.xyxy+vec4( 0.5,-0.5, 1.5,-1.5) * (OGL2Param.xyxy+soffset);
    gl_TexCoord[2]=gl_MultiTexCoord0.xyxy+vec4(-0.5, 0.5,-1.5, 1.5) * (OGL2Param.xyxy+soffset);
    gl_TexCoord[3]=gl_MultiTexCoord0.xyxy+vec4( 0.5, 0.5, 1.5, 1.5) * (OGL2Param.xyxy+soffset);
}
slf
Code:
//patched by Danila Zabiaka - white black noise
#define white 200.0
#define black 20.0
#define noise 7.0
#define offset -25.0
#define satoffset 5.0 //5 as start point. sat=satoffset-5.0, 6 means 1.1


float pseudoNoise(vec2 co)
{
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453)*fract(sin(dot(co.xy ,vec2(12.9898,78.233)*2.0)) * 43758.5453); //pseudo random number generator
}

vec3 czm_saturation(vec3 rgb, float adjustment)
{
    // Algorithm from Chapter 16 of OpenGL Shading Language
    const vec3 W = vec3(0.2125, 0.7154, 0.0721);
    vec3 intensity = vec3(dot(rgb, W));
    return mix(intensity, rgb, adjustment);
}

uniform sampler2D OGL2Texture;

const vec3 RGBtoY = vec3(0.299, 0.587, 0.114);
const vec3 RGBtoI = vec3(0.596,-0.275,-0.321);
const vec3 RGBtoQ = vec3(0.212,-0.523, 0.311);
const vec3 YIQtoR = vec3(1.0, 0.95568806036115671171, 0.61985809445637075388);
const vec3 YIQtoG = vec3(1.0,-0.27158179694405859326,-0.64687381613840131330);
const vec3 YIQtoB = vec3(1.0,-1.10817732668266195230, 1.70506455991918171490);

void main()
{
    vec3 c0, c1;

    c0 = (texture2D(OGL2Texture,gl_TexCoord[0].xy).rgb +
         (texture2D(OGL2Texture,gl_TexCoord[0].zy).rgb) * 0.25 +
         (texture2D(OGL2Texture,gl_TexCoord[0].xw).rgb) * 0.25 +
         texture2D(OGL2Texture,gl_TexCoord[1].xy).rgb +
         (texture2D(OGL2Texture,gl_TexCoord[1].zy).rgb) * 0.25 +
         (texture2D(OGL2Texture,gl_TexCoord[1].xw).rgb) * 0.25 +
         texture2D(OGL2Texture,gl_TexCoord[2].xy).rgb +
         (texture2D(OGL2Texture,gl_TexCoord[2].zy).rgb) * 0.25 +
         (texture2D(OGL2Texture,gl_TexCoord[2].xw).rgb) * 0.25 +
         texture2D(OGL2Texture,gl_TexCoord[3].xy).rgb +
         (texture2D(OGL2Texture,gl_TexCoord[3].zy).rgb) * 0.25 +
         (texture2D(OGL2Texture,gl_TexCoord[3].xw).rgb) * 0.25 ) / 6.0;

    c1 = vec3(pow(dot(c0, RGBtoY), 1.2), dot(c0, RGBtoI) * 1.2, dot(c0, RGBtoQ) * 1.2);

    gl_FragColor = vec4(dot(c1, YIQtoR), dot(c1, YIQtoG), dot(c1, YIQtoB), 0.0);
    gl_FragColor.xyz = czm_saturation(gl_FragColor.xyz, 1.0+(satoffset-5.0)/10.0);
    
    gl_FragColor = gl_FragColor *white/255.0+black/255.0-gl_FragColor*black/255.0+(pseudoNoise(gl_TexCoord[1].xy)+offset/100.0)*noise/100.0;
}
 
1021 - 1031 of 1031 Posts
Top