Today I tried to test my game on my friends computer but we ran into a few errors.
his gfx card : gtx 650 ti boost
my shader...
uniform sampler2D texture;
uniform float distanceToMaxNoise = 1000.0;
uniform float startNoiseDistance = 5000.0;
uniform vec2 position = vec2(0,0);
uniform float random = 1.0;
highp float randFloat(vec2 co)
{
highp float a = 12.9898;
highp float b = 78.233;
highp float c = 43758.5453;
highp float dt= dot(co.xy ,vec2(a,b));
highp float sn= mod(dt,3.14);
return fract(sin(sn) * c);
}
void main()
{
vec2 texCoord = gl_TexCoord[0].xy;
vec2 randomVec = vec2(random);
vec2 texCoordRandom = texCoord + randomVec;
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
highp float randomNoise = randFloat(texCoordRandom);
highp float randomLine = randFloat(texCoord.yy + randomVec);
float distance = clamp(length(position) - startNoiseDistance, 0.0, distanceToMaxNoise);
float noise = clamp(distance / distanceToMaxNoise, 0.0, 1.0);
pixel = mix(pixel, vec4(randomNoise, randomNoise, randomNoise, 1.0), noise);
if(randomLine < 0.02)
{
pixel = mix(pixel, vec4(0.0, 0.0, 0.0, 1.0), noise);
}
gl_FragColor = pixel;
}
from what i can tell #version 120 is from 2006 so does that mean his GFX card is outdated? If this happens on his computer i think its likely that other computers will experience the same problem. Is there something I can do that will automatically address the problem by prompting the user to update their drivers or something?