Finalizing render

This commit is contained in:
vladislav.khorev committed 2018-10-30 02:03:42 +05:00
1 parent 3f567533bf
commit ac296727de
6 files changed
+71 -31

No files matched your search

+6 -6
View File
@@ -1,42 +1,42 @@
{
"ices": [
{
"position": [ -20, 0, -50 ],
"position": [ -20, 0.8, -50 ],
"scale": 1,
"angle": 0,
"type": 1,
"texture": 1
},
{
"position": [ 30, 0, 30 ],
"position": [ 30, 0.7, 30 ],
"scale": 0.3,
"angle": 0,
"type": 2,
"texture": 2
},
{
"position": [ -10, 0, 50 ],
"position": [ -10, 0.7, 50 ],
"scale": 0.1,
"angle": 0,
"type": 3,
"texture": 3
},
{
"position": [ 0, 0, 50 ],
"position": [ 0, 0.7, 50 ],
"scale": 0.1,
"angle": 0,
"type": 4,
"texture": 1
},
{
"position": [ 30, 0, 30 ],
"position": [ 30, 0.7, 30 ],
"scale": 0.2,
"angle": 0,
"type": 5,
"texture": 2
},
{
"position": [ 50, 0, -50 ],
"position": [ 50, 0.7, -50 ],
"scale": 2,
"angle": 0,
"type": 6,
+7
View File
@@ -5,6 +5,7 @@ uniform sampler2D NormalMap;
uniform vec3 LightDirection;
uniform float TimeOfDayCoef1;
uniform float TimeOfDayCoef2;
uniform float invCoef;
uniform vec3 TimeOfDayColor;
varying vec2 texCoord;
@@ -24,4 +25,10 @@ void main()
//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);
if (posVec.y < 0.0)
{
discard;
//gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ attribute vec3 Tangent;
attribute vec3 Binormal;
attribute vec2 vTexCoord;
uniform mat4 ModelViewMatrix;
uniform mat4 ProjectionMatrix;
uniform vec3 CamPos;
@@ -29,5 +30,5 @@ void main()
normVec = Normal;
posVec = vPosition;
posVec = vPosition.xyz;
}