public ColorF GetBaseColor(int keyIndex) { ColorF result; float time; using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.BaseColor)) { time = param.GetKeyTime(keyIndex); result.a = 0; param.GetValue(time, out result.r, 0); param.GetValue(time, out result.g, 1); param.GetValue(time, out result.b, 2); } return(result); }
private void SafetyGetValue(PostProcessParamBase param, float time, ref float value, int index) { try { param.GetValue(time, out value, index); } catch (AccessViolationException e) { ErrorOccuredEvent?.Invoke(e.Message); } }
public float GetBlur(int keyIndex) { float result; float time; using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.Blur)) { time = param.GetKeyTime(keyIndex); param.GetValue(time, out result, 0); } return(result); }
public ColorMappingParams GetColorMapping(int keyIndex) { ColorMappingParams result; float time; using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.ColorMappingInfluence)) { time = param.GetKeyTime(keyIndex); param.GetValue(time, out result.Influence, 0); } result.Texture = animator.PPInfo.ColorMappingGradient1; return(result); }
public Vector2F GetDuality(int keyIndex) { Vector2F result; float time; using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.DualityH)) { time = param.GetKeyTime(keyIndex); param.GetValue(time, out result.x, 0); } using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.DualityV)) { param.GetValue(time, out result.y, 0); } return(result); }
public NoiseParams GetNoise(int keyIndex) { NoiseParams result; float time; using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.NoiseIntensity)) { time = param.GetKeyTime(keyIndex); param.GetValue(time, out result.Intensity, 0); } using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.NoiseGrain)) { param.GetValue(time, out result.Grain, 0); } using (PostProcessParamBase param = animator.GetParam(PostProcessParamType.NoiseFps)) { param.GetValue(time, out result.FPS, 0); } return(result); }