15 lines
314 B
GLSL
15 lines
314 B
GLSL
// simple gradient map
|
|
|
|
vec3 GradientMap( in float gray )
|
|
{
|
|
vec2 pos = vec2(gray/2.+.25,0.);
|
|
return textureLod(gradtex,pos,0.).rgb;
|
|
}
|
|
|
|
void SetupMaterial( inout Material mat )
|
|
{
|
|
vec4 base = getTexel(vTexCoord.st);
|
|
base.rgb = GradientMap(base.x);
|
|
mat.Base = base;
|
|
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
|
}
|