So I have a low poly scene. I created a simple texture in gimp using a flat color + rgb noise. Super easy to do. In game it looks great, exactly how I wanted.
Is it smarter to just use a noise shader for the materials (over top of the diffuse color) instead? Would that be faster or slower than texturing everything (no spec or normal)?
I looked around online but I can’t figure out how to set up a noise shader for a material. Is it worth it in terms of performance? If it is, how could I achieve simple rgb noise in .glsl?
Here is the greyscale shader I use (faded in in-game for a certain effect):
{
vec3 rgb = texture2D(sDiffMap, vScreenPos).rgb;
float intensity = GetIntensity(rgb)*(1-cGreyness.x);
vec3 rgb2 = rgb*cGreyness;
gl_FragColor = vec4(vec3(rgb2+intensity),1);
}
For rgb noise, I suppose it would be something similar? Taking a function of gaussian or perlin and passing that output to the fragcolor? Anyone ever do something similar? Also, how can I tell a specific material to use a specific shader?
Of course, if it’s better to just use textures I’ll do that, but it’d be nice to know how to do this with shaders. Could be useful for things like paper effects.