Parallax hamster
This commit is contained in:
parent
dcc9542440
commit
636a4bb003
BIN
models/arm.blend
BIN
models/arm.blend
Binary file not shown.
BIN
models/arm.fbx
BIN
models/arm.fbx
Binary file not shown.
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user