Init
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
uniform lowp vec4 diffuseColor;
|
||||
|
||||
varying lowp vec4 lighting;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = diffuseColor * lighting;
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
uniform sampler2D diffuseTexture;
|
||||
uniform sampler2D normalTexture;
|
||||
varying highp vec2 texcoord0;
|
||||
varying highp vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp vec2 uv = vec2(texcoord0.x, 1.0-texcoord0.y);
|
||||
highp float tcos = color.z;
|
||||
highp float tsin = color.w;
|
||||
|
||||
uv -= 0.5;
|
||||
highp vec2 tempuv;
|
||||
tempuv.x = uv.x*tcos - uv.y*tsin;
|
||||
tempuv.y = uv.x*tsin + uv.y*tcos;
|
||||
uv = tempuv;
|
||||
uv += 0.5;
|
||||
|
||||
uv = clamp(uv, 0.0, 1.0);
|
||||
uv *= 0.5;
|
||||
uv += color.xy;
|
||||
|
||||
if (texture2D(normalTexture, uv.xy).a <= 0.5)
|
||||
discard;
|
||||
gl_FragColor.rgb = texture2D(diffuseTexture, uv.xy).rgb;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
uniform sampler2D diffuseTexture;
|
||||
uniform highp vec4 diffuseColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = diffuseColor * texture2D(diffuseTexture, gl_PointCoord);
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
varying lowp vec4 color;
|
||||
varying lowp vec2 texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = color;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
uniform sampler2D diffuseTexture;
|
||||
|
||||
varying highp vec2 texcoord0;
|
||||
varying lowp vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(diffuseTexture, texcoord0.xy);
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
uniform sampler2D diffuseTexture;
|
||||
|
||||
varying lowp vec2 texcoord0;
|
||||
varying lowp vec4 lighting;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(diffuseTexture, texcoord0.xy) * lighting;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
uniform sampler2D diffuseTexture0;
|
||||
uniform sampler2D diffuseTexture1;
|
||||
|
||||
varying lowp vec2 texcoord0;
|
||||
varying lowp vec4 lighting;
|
||||
varying lowp vec4 normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
// selects texture depending on world normal steepness of height map
|
||||
lowp float tex0weight = max(0.0, min(1.0, (normal.y - 0.5) * 3.0));
|
||||
gl_FragColor = (texture2D(diffuseTexture0, texcoord0.xy) * tex0weight + texture2D(diffuseTexture1, texcoord0.xy) * (1.0 - tex0weight)) * lighting;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
|
||||
uniform sampler2D diffuseTexture;
|
||||
uniform sampler2D normalTexture;
|
||||
|
||||
varying highp vec2 texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
lowp vec4 diffuseTextureColor = texture2D(diffuseTexture, texcoord0.xy);
|
||||
lowp vec4 normalTextureColor = texture2D(normalTexture, texcoord0.xy);
|
||||
|
||||
gl_FragColor = clamp(normalTextureColor.z, 0.2, 1.0) * diffuseTextureColor;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
uniform sampler2D diffuseTexture;
|
||||
|
||||
varying lowp vec2 texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(diffuseTexture, texcoord0.xy);
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
uniform lowp vec4 diffuseColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = diffuseColor;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
uniform sampler2D diffuseTexture;
|
||||
varying lowp vec2 texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(diffuseTexture, texcoord0.xy);
|
||||
}
|
||||
Reference in New Issue
Block a user