Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 648 vs 650 for /trunk/Source Code/Environment/Sky/Sky.cpp

Diff revisions: vs.
  @@ -83,19 +83,22 @@
83 83 assert(_skyShader && _skyShaderPrePass);
84 84 _skyShader->Uniform("texSky", ShaderProgram::TextureUsage::UNIT0);
85 85 _skyShader->Uniform("enable_sun", true);
86 - _boundingBox.first.set(vec3<F32>(-_farPlane / 2), vec3<F32>(_farPlane / 2));
87 - _boundingBox.second = true;
86 + _boundingBox.set(vec3<F32>(-_farPlane / 2), vec3<F32>(_farPlane / 2));
88 87 Console::printfn(Locale::get(_ID("CREATE_SKY_RES_OK")));
89 88 return Resource::load();
90 89 }
91 90
92 91 void Sky::postLoad(SceneGraphNode& sgn) {
92 + static const U32 normalMask = to_const_uint(SGNComponent::ComponentType::PHYSICS) |
93 + to_const_uint(SGNComponent::ComponentType::BOUNDS) |
94 + to_const_uint(SGNComponent::ComponentType::RENDERING);
95 +
93 96 if (_sky == nullptr) {
94 97 load();
95 98 }
96 99
97 100 _sky->renderState().setDrawState(false);
98 - sgn.addNode(*_sky)->get<PhysicsComponent>()->physicsGroup(
101 + sgn.addNode(*_sky, normalMask)->get<PhysicsComponent>()->physicsGroup(
99 102 PhysicsComponent::PhysicsGroup::NODE_COLLIDE_IGNORE);
100 103
101 104 RenderingComponent* renderable = sgn.get<RenderingComponent>();