Parallax hamster

This commit is contained in:
xkamikoo 2021-02-25 01:02:36 +01:00
parent dcc9542440
commit 636a4bb003
4 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -36,7 +36,7 @@ vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir)
// depth of current layer
float currentLayerDepth = 0.0;
// the amount to shift the texture coordinates per layer (from vector P)
vec2 P = viewDir.xy / viewDir.z * 0.1;
vec2 P = viewDir.xy / viewDir.z * 0.0001;
vec2 deltaTexCoords = P / numLayers;
// get initial values

View File

@ -1043,7 +1043,7 @@ void initObjects()
glm::vec3(0, 2, 2), glm::vec3(1.5f, 1.0f, 1.0f), glm::vec3(0.3f), 0, false, true);
objects.push_back(moon);
Object crewmateObj = Object("Space Humster", crewmate, programTex, glm::vec3(1.0f),
Object crewmateObj = Object("Space Humster", crewmate, programParallax, glm::vec3(1.0f),
glm::vec3(-5, 0, 0), glm::vec3(1, 0, 1), glm::vec3(0.1), 0, true, false);
objects.push_back(crewmateObj);