This commit is contained in:
barmal4 2022-01-19 18:52:33 +01:00
parent b2c9f0ad4a
commit 48e199296b
2 changed files with 5 additions and 3 deletions

View File

@ -30,5 +30,5 @@ void main()
float specular = pow(max(0,dot(R,V)),10);
float diffuse = max(0,dot(normal,lightDir));
gl_FragColor = vec4(mix(objectColor.rgb,objectColor.rgb*diffuse+vec3(1)*specular,0.9), 1.0) * (1.0f - depth) + vec4(depth * vec3(5.0f/255.0f, 35.0f/255.0f, 95.0f/255.0f), objectColor.a);
gl_FragColor = vec4(mix(objectColor.rgb,objectColor.rgb*diffuse+vec3(1)*specular,0.9), objectColor.a) * (1.0f - depth) + vec4(depth * vec3(5.0f/255.0f, 35.0f/255.0f, 95.0f/255.0f), objectColor.a);
}

View File

@ -201,10 +201,12 @@ void init()
loadModelToContext("models/sphere.obj", sphereContext);
sharkTexture = Core::LoadTexture("textures/Orca_Diffuse.jpg");
initBubbles();
for (int i = 0; i < 10; i++) {
/*initRenderables();
initPhysicsScene();*/
/*for (int i = 0; i < 10; i++) {
float r = (float)(rand()) / (float)(RAND_MAX/20.0);
planetsCoords.push_back(glm::ballRand(r));
}
}*/
}
void shutdown()