More lighting changes

This commit is contained in:
Dynamitos
2025-03-13 08:23:00 +01:00
parent 80f86ca95c
commit 51d759639e
11 changed files with 18 additions and 20 deletions
+2 -2
View File
@@ -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() {}
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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() {}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -34,7 +34,7 @@ class Asset {
std::string name;
std::string assetId;
Status status;
uint64 byteSize;
uint64 byteSize = 0;
};
DEFINE_REF(Asset)
} // namespace Seele
+1 -1
View File
@@ -3,7 +3,7 @@
namespace Seele {
namespace Component {
struct DirectionalLight {
Vector4 color;
Vector4 colorIntensity;
Vector4 direction;
};
} // namespace Component
+1 -1
View File
@@ -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