More lighting changes
This commit is contained in:
@@ -4,8 +4,8 @@ using namespace Seele;
|
||||
|
||||
DirectionalLightActor::DirectionalLightActor(PScene scene) : Actor(scene) { attachComponent<Component::DirectionalLight>(); }
|
||||
|
||||
DirectionalLightActor::DirectionalLightActor(PScene scene, Vector color, Vector direction) : Actor(scene) {
|
||||
attachComponent<Component::DirectionalLight>(Vector4(color, 0), Vector4(direction, 0));
|
||||
DirectionalLightActor::DirectionalLightActor(PScene scene, Vector color, float intensity, Vector direction) : Actor(scene) {
|
||||
attachComponent<Component::DirectionalLight>(Vector4(color, intensity), Vector4(direction, 0));
|
||||
}
|
||||
|
||||
DirectionalLightActor::~DirectionalLightActor() {}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Seele {
|
||||
class DirectionalLightActor : public Actor {
|
||||
public:
|
||||
DirectionalLightActor(PScene scene);
|
||||
DirectionalLightActor(PScene scene, Vector color, Vector direction);
|
||||
DirectionalLightActor(PScene scene, Vector color, float intensity, Vector direction);
|
||||
virtual ~DirectionalLightActor();
|
||||
Component::DirectionalLight& getDirectionalLightComponent();
|
||||
const Component::DirectionalLight& getDirectionalLightComponent() const;
|
||||
|
||||
@@ -4,8 +4,8 @@ using namespace Seele;
|
||||
|
||||
PointLightActor::PointLightActor(PScene scene) : Actor(scene) { attachComponent<Component::PointLight>(); }
|
||||
|
||||
PointLightActor::PointLightActor(PScene scene, Vector position, Vector color, float attenuation) : Actor(scene) {
|
||||
attachComponent<Component::PointLight>(Vector4(position, 1), Vector4(color, attenuation));
|
||||
PointLightActor::PointLightActor(PScene scene, Vector position, float intensity, Vector color, float attenuation) : Actor(scene) {
|
||||
attachComponent<Component::PointLight>(Vector4(position, intensity), Vector4(color, attenuation));
|
||||
}
|
||||
|
||||
PointLightActor::~PointLightActor() {}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Seele {
|
||||
class PointLightActor : public Actor {
|
||||
public:
|
||||
PointLightActor(PScene scene);
|
||||
PointLightActor(PScene scene, Vector position, Vector color, float attenuation);
|
||||
PointLightActor(PScene scene, Vector position, float intensity, Vector color, float attenuation);
|
||||
virtual ~PointLightActor();
|
||||
Component::PointLight& getPointLightComponent();
|
||||
const Component::PointLight& getPointLightComponent() const;
|
||||
|
||||
@@ -34,7 +34,7 @@ class Asset {
|
||||
std::string name;
|
||||
std::string assetId;
|
||||
Status status;
|
||||
uint64 byteSize;
|
||||
uint64 byteSize = 0;
|
||||
};
|
||||
DEFINE_REF(Asset)
|
||||
} // namespace Seele
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Seele {
|
||||
namespace Component {
|
||||
struct DirectionalLight {
|
||||
Vector4 color;
|
||||
Vector4 colorIntensity;
|
||||
Vector4 direction;
|
||||
};
|
||||
} // namespace Component
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Seele {
|
||||
namespace Component {
|
||||
struct PointLight {
|
||||
// give the lights a radius so that they are not actual points
|
||||
Vector4 positionWSRadius;
|
||||
Vector4 positionWS;
|
||||
Vector4 colorRange;
|
||||
};
|
||||
} // namespace Component
|
||||
|
||||
Reference in New Issue
Block a user