Exemplo n.º 1
0
        public void SetMeshRenderLightingProperties(IMeshRenderStage effect, MeshRenderLightingPropertiesConfiguration config, float transitionSeconds)
        {
            if (effect == null)
            {
                throw new Yak2DException("Unable to set mesh effect as stage passed is null");
            }

            SetMeshRenderLightingProperties(effect.Id, config, transitionSeconds);
        }
Exemplo n.º 2
0
 private void FillInitialProperties()
 {
     _currentProperties = new MeshRenderLightingPropertiesConfiguration
     {
         SpecularColour       = new Vector3(0.5f, 0.5f, 0.5f),
         Shininess            = 16.0f,
         NumberOfActiveLights = 1
     };
 }
Exemplo n.º 3
0
        public void SetLightingProperties(ref MeshRenderLightingPropertiesConfiguration config, float transitionSeconds)
        {
            transitionSeconds = Utility.Clamper.Clamp(transitionSeconds, 0.0f, float.MaxValue);

            if (transitionSeconds == 0.0f)
            {
                _currentProperties         = config;
                _isTransitioningProperties = false;
                UpdatePropertiesBuffer();
                return;
            }

            _previousProperties              = _currentProperties;
            _targetProperties                = config;
            _transitionTotalTimeProperties   = transitionSeconds;
            _transitionCurrentTimeProperties = 0.0f;
            _isTransitioningProperties       = true;
        }
Exemplo n.º 4
0
 public void SetMeshRenderLightingProperties(ulong effect, MeshRenderLightingPropertiesConfiguration config, float transitionSeconds)
 {
     CacheRenderStageModelInVisitor(effect);
     _renderStageVisitor.CachedMeshRenderStageModel?.SetLightingProperties(ref config, transitionSeconds);
 }