Console shows error or warning
The effects seem to work, though some of them are subtle (like BleachBypassPass) so I'm not sure if they're being affected by the warning messages I'm getting:
[warning] ofShader: GL_FRAGMENT_SHADER, offending line 1 : 1 uniform float opacity; uniform sampler2D tDiffuse; void main() { vec2 vUv = gl_TexCoord[0].st; vec4 base = texture2D( tDiffuse, vUv ); vec3 lumCoeff = vec3( 0.25, 0.65, 0.1 ); float lum = dot( lumCoeff, base.rgb ); vec3 blend = vec3( lum ); float L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) ); vec3 result1 = 2.0 * base.rgb * blend; vec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb ); vec3 newColor = mix( result1, result2, L ); float A2 = opacity * base.a; vec3 mixRGB = A2 * newColor.rgb; mixRGB += ( ( 1.0 - A2 ) * base.rgb ); gl_FragColor = vec4( mixRGB, base.a ); }
Using Visual Studio 2019 on Windows 10. Tried replacing ofSetupOpenGL(1024,768,OF_WINDOW); with
ofGLWindowSettings settings;
settings.setGLVersion(3, 2);
ofCreateWindow(settings);
because I was told to do this in other tutorial videos when using shaders, but this turns the warning into an error and nothing is displayed.