new skybox textures with correct loading order, fixed shader typo
This commit is contained in:
parent
300df40f98
commit
0a702e155d
@ -80,7 +80,7 @@ void main()
|
||||
//get normal from normal sampler
|
||||
vec3 samplerNormal = texture2D(normalSampler, vertexTexCoordOut).xyz;
|
||||
samplerNormal = 2 * samplerNormal - 1;//since sampler has values from [0, 1], but we want [-1, 1]
|
||||
normalizedVertexNormal = normalized(samplerNormal);// to avoid potential precision problems in sampler texture
|
||||
normalizedVertexNormal = normalize(samplerNormal);// to avoid potential precision problems in sampler texture
|
||||
|
||||
//tmp solution
|
||||
//normalizedVertexNormal = vec3(0, 0, 1);
|
||||
|
@ -311,13 +311,21 @@ void init_cubemap() {
|
||||
|
||||
int w, h;
|
||||
unsigned char* data;
|
||||
//std::vector<const char*> cubeSideTestureFiles = {
|
||||
// "./textures/skybox/space_rt.png",
|
||||
// "./textures/skybox/space_lt.png",
|
||||
// "./textures/skybox/space_up.png",
|
||||
// "./textures/skybox/space_dn.png",
|
||||
// "./textures/skybox/space_bk.png",
|
||||
// "./textures/skybox/space_ft.png",
|
||||
//};
|
||||
std::vector<const char*> cubeSideTestureFiles = {
|
||||
"./textures/skybox/space_rt.png",
|
||||
"./textures/skybox/space_lt.png",
|
||||
"./textures/skybox/space_up.png",
|
||||
"./textures/skybox/space_dn.png",
|
||||
"./textures/skybox/space_bk.png",
|
||||
"./textures/skybox/space_ft.png",
|
||||
"./textures/space_skybox1/right.png",
|
||||
"./textures/space_skybox1/left.png",
|
||||
"./textures/space_skybox1/top.png",
|
||||
"./textures/space_skybox1/bottom.png",
|
||||
"./textures/space_skybox1/front.png",
|
||||
"./textures/space_skybox1/back.png",
|
||||
};
|
||||
for (unsigned int i = 0; i < 6; i++)
|
||||
{
|
||||
@ -354,7 +362,7 @@ void init(GLFWwindow* window)
|
||||
texture::earth = Core::LoadTexture("./textures/earth.png");
|
||||
texture::clouds = Core::LoadTexture("./textures/clouds.jpg");
|
||||
//moon.png doesn't load correctly
|
||||
texture::moon = Core::LoadTexture("./textures/moon.png");
|
||||
texture::moon = Core::LoadTexture("./textures/moon.jpg");
|
||||
texture::ship = Core::LoadTexture("./textures/spaceship.jpg");
|
||||
texture::scratches = Core::LoadTexture("./textures/scratches.jpg");
|
||||
texture::rust = Core::LoadTexture("./textures/rust.jpg");
|
||||
|
Loading…
Reference in New Issue
Block a user