First blood
This commit is contained in:
1 parent
172a38114f
commit
3f3c1735d6
65 files changed
+2853
No files matched your search
@@ -0,0 +1,26 @@
|
||||
precision lowp float;
|
||||
|
||||
uniform sampler2D Texture;
|
||||
uniform sampler2D NormalMap;
|
||||
uniform vec3 LightDirection;
|
||||
uniform float TimeOfDayCoef1;
|
||||
uniform float TimeOfDayCoef2;
|
||||
uniform vec3 TimeOfDayColor;
|
||||
varying vec2 texCoord;
|
||||
|
||||
varying vec3 camVec;
|
||||
varying vec3 normVec;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
vec3 nvec = normalize(normVec);
|
||||
|
||||
float cosf = max(0.0, dot(nvec, -LightDirection));
|
||||
|
||||
//gl_FragColor = vec4((texture2D(Texture, texCoord).rgb * (cosf * 0.75 + 0.25)), 1.0); //day
|
||||
//gl_FragColor = vec4((texture2D(Texture, texCoord).rgb * (cosf * 0.5 + 0.25)), 1.0); //twilight
|
||||
//gl_FragColor = vec4(((texture2D(Texture, texCoord).rgb + vec3(0.0, 0.1, 0.2)) * (0.4)), 1.0);
|
||||
|
||||
gl_FragColor = vec4(((texture2D(Texture, texCoord).rgb + TimeOfDayColor) * (cosf * TimeOfDayCoef1 + TimeOfDayCoef2)), 1.0);
|
||||
}
|
||||
Reference in new issue
Block a user