gl_FrontColor = gl_Color;
light_amount = abs(dot(normalize(gl_NormalMatrix * gl_Normal), normalize(gl_LightSource[0].position.xyz)));
- light_amount *= 1 - (length(gl_Position.xyz - vec3(0,0,cameraDistance)) / 1.5 / cameraDistance);
+ light_amount *= 1.0 - (length(gl_Position.xyz - vec3(0.0,0.0,cameraDistance)) / 1.5 / cameraDistance);
light_amount += 0.2;
}
""","""
gl_FrontColor = gl_Color;
light_amount = abs(dot(normalize(gl_NormalMatrix * gl_Normal), normalize(gl_LightSource[0].position.xyz)));
- light_amount *= 1 - (length(gl_Position.xyz - vec3(0,0,cameraDistance)) / 1.5 / cameraDistance);
+ light_amount *= 1.0 - (length(gl_Position.xyz - vec3(0.0,0.0,cameraDistance)) / 1.5 / cameraDistance);
light_amount += 0.2;
}
""","""
for obj in self._objectList:
obj.setPosition(obj.getPosition() + offset)
+ def printOrder(self):
+ order = range(0, len(self._objectList))
+ return order
+
def _pushFree(self):
for a in self._objectList:
for b in self._objectList: