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); }
private void FillInitialProperties() { _currentProperties = new MeshRenderLightingPropertiesConfiguration { SpecularColour = new Vector3(0.5f, 0.5f, 0.5f), Shininess = 16.0f, NumberOfActiveLights = 1 }; }
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; }
public void SetMeshRenderLightingProperties(ulong effect, MeshRenderLightingPropertiesConfiguration config, float transitionSeconds) { CacheRenderStageModelInVisitor(effect); _renderStageVisitor.CachedMeshRenderStageModel?.SetLightingProperties(ref config, transitionSeconds); }