BIN
Content/Engine/SkyboxMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/SkyboxMaterial.flax
(Stored with Git LFS)
Binary file not shown.
@@ -129,6 +129,7 @@ void Skybox::ApplySky(GPUContext* context, RenderContext& renderContext, const M
|
||||
material->SetParameterValue(TEXT("PanoramicTexture"), PanoramicTexture.Get(), false);
|
||||
material->SetParameterValue(TEXT("Color"), Color * Math::Exp2(Exposure), false);
|
||||
material->SetParameterValue(TEXT("IsPanoramic"), PanoramicTexture != nullptr, false);
|
||||
material->SetParameterValue(TEXT("RotationEuler"), _rotationEuler, false);
|
||||
material->Bind(bindParams);
|
||||
}
|
||||
}
|
||||
@@ -163,4 +164,5 @@ void Skybox::OnTransformChanged()
|
||||
|
||||
_box = BoundingBox(_transform.Translation);
|
||||
_sphere = BoundingSphere(_transform.Translation, 0.0f);
|
||||
_rotationEuler = GetOrientation().GetEuler() * DegreesToRadians;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ class FLAXENGINE_API Skybox : public Actor, public ISkyRenderer
|
||||
private:
|
||||
AssetReference<MaterialInstance> _proxyMaterial;
|
||||
int32 _sceneRenderingKey = -1;
|
||||
Float3 _rotationEuler;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user