Less yellow light
This commit is contained in:
parent
49e814d1bc
commit
ce7f4f66c5
6
index.js
6
index.js
@ -23,7 +23,7 @@ void main() {
|
||||
lowp vec3 normal = mat3(modelview) * aNormal;
|
||||
lowp vec3 lightDirection = - normalize(mat3(uView) * vec3(1.0, -0.3, -0.8));
|
||||
lowp float diffuseAmount = max(dot(lightDirection, normal), 0.0);
|
||||
lowp vec3 ambiant = vec3(0.7, 0.7, 0.2);
|
||||
lowp vec3 ambiant = 0.4 * vec3(1.0, 1.0, 0.9);
|
||||
vLighting = ambiant + vec3(1.0, 1.0, 1.0) * diffuseAmount;
|
||||
|
||||
vTextureCoord = aTextureCoord;
|
||||
@ -48,7 +48,7 @@ void main() {
|
||||
`;
|
||||
|
||||
/** Draw.
|
||||
*
|
||||
*
|
||||
* @param {WebGLRenderingContext} gl
|
||||
*/
|
||||
function draw(gl, params, objects) {
|
||||
@ -230,7 +230,7 @@ function makeChunk(x, y) {
|
||||
const height = Math.floor(64 + 64 * terrain[i * 16 + j]);
|
||||
// everything above is air
|
||||
// that block is grass
|
||||
// everything below is dirt
|
||||
// everything below is dirt
|
||||
const offset = i * (16 * 256) + j * 256;
|
||||
const stoneHeight = Math.min(62, height);
|
||||
chunk.set(Array(stoneHeight).fill(BlockType.STONE), offset);
|
||||
|
Loading…
Reference in New Issue
Block a user