Merge remote-tracking branch 'origin/master' into 1.11
# Conflicts: # Content/Editor/DebugMaterials/DDGIDebugProbes.flax # Source/Editor/Windows/OutputLogWindow.cs # Source/Engine/Level/Actor.cpp
This commit is contained in:
@@ -63,7 +63,8 @@ protected:
|
||||
{
|
||||
const float dst2 = (float)Vector3::DistanceSquared(viewPosition, position);
|
||||
const float dst = Math::Sqrt(dst2);
|
||||
brightness *= Math::Remap(dst, 0.9f * ViewDistance, ViewDistance, 1.0f, 0.0f);
|
||||
if (dst < ViewDistance && dst > ViewDistance * 0.9f)
|
||||
brightness *= Math::Remap(dst, 0.9f * ViewDistance, ViewDistance, 1.0f, 0.0f);
|
||||
return dst < ViewDistance;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -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