Beispiel #1
0
 public override void Save(IAetherWriter writer)
 {
     base.Save(writer);
     writer.WriteFloat("InnerAngle", InnerAngle);
     writer.WriteFloat("OuterAngle", OuterAngle);
     writer.WriteVector3("Direction", Direction);
 }
Beispiel #2
0
 public virtual void Save(IAetherWriter writer)
 {
     writer.WriteVector3("Position", Position);
     writer.WriteVector3("LightSourceColor", LightSourceColor);
     writer.WriteFloat("Intensity", Intensity);
     writer.WriteFloat("MaximumRadius", MaximumRadius);
 }
Beispiel #3
0
 public virtual void Save(IAetherWriter writer)
 {
     writer.WriteVector3("Position", _position);
     writer.WriteVector3("LookAt", _lookAt);
     writer.WriteVector3("Up", _up);
     writer.WriteFloat("NearPlane", _nearPlane);
     writer.WriteFloat("FarPlane", _farPlane);
 }
Beispiel #4
0
 private void SaveRasterizerState(IAetherWriter writer, RasterizerState rasterizerState)
 {
     writer.WriteString("Name", rasterizerState.Name);
     writer.WriteInt64("CullMode", (int)rasterizerState.CullMode);
     writer.WriteFloat("DepthBias", rasterizerState.DepthBias);
     writer.WriteInt64("FillMode", (int)rasterizerState.FillMode);
     writer.WriteBoolean("MultiSampleAntiAlias", rasterizerState.MultiSampleAntiAlias);
     writer.WriteBoolean("ScissorTestEnable", rasterizerState.ScissorTestEnable);
     writer.WriteFloat("SlopeScaleDepthBias", rasterizerState.SlopeScaleDepthBias);
 }
Beispiel #5
0
 public override void Save(IAetherWriter writer)
 {
     base.Save(writer);
     writer.WriteVector3("DiffuseColor", DiffuseColor);
     writer.WriteVector3("AmbientLightColor", AmbientLightColor);
     writer.WriteVector3("EmissiveColor", EmissiveColor);
     WriteDirectionalLight(writer, "DirectionalLight0", DirectionalLight0);
     WriteDirectionalLight(writer, "DirectionalLight1", DirectionalLight1);
     WriteDirectionalLight(writer, "DirectionalLight2", DirectionalLight2);
     writer.WriteFloat("Alpha", Alpha);
     writer.WriteFloat("EnvironmentMapAmount", EnvironmentMapAmount);
     writer.WriteVector3("EnvironmentMapSpecular", EnvironmentMapSpecular);
     writer.WriteFloat("FresnelFactor", FresnelFactor);
 }
Beispiel #6
0
        private void SaveSamplerStates(IAetherWriter writer, SamplerState[] samplerStates)
        {
            int samplerStateCount = samplerStates.Length;

            for (int i = 0; i < samplerStateCount; i++)
            {
                if (samplerStates[i] == null)
                {
                    samplerStateCount = i;
                    break;
                }
            }
            writer.WriteInt32("SamplerStateCount", samplerStateCount);
            for (int i = 0; i < samplerStateCount; i++)
            {
                SamplerState samplerState = samplerStates[i];
                writer.WriteString("Name", samplerState.Name);
                writer.WriteInt64("AddressU", (int)samplerState.AddressU);
                writer.WriteInt64("AddressV", (int)samplerState.AddressV);
                writer.WriteInt64("AddressW", (int)samplerState.AddressW);
                writer.WriteInt64("Filter", (int)samplerState.Filter);
                writer.WriteInt64("MaxAnisotropy", samplerState.MaxAnisotropy);
                writer.WriteInt64("MaxMipLevel", samplerState.MaxMipLevel);
                writer.WriteFloat("MipMapLevelOfDetailBias", samplerState.MipMapLevelOfDetailBias);
            }
        }
Beispiel #7
0
 public override void Save(IAetherWriter writer)
 {
     base.Save(writer);
     writer.WriteVector3("DiffuseColor", DiffuseColor);
     writer.WriteFloat("Alpha", Alpha);
     writer.WriteInt64("ReferenceAlpha", ReferenceAlpha);
     writer.WriteBoolean("VertexColorEnabled", VertexColorEnabled);
 }
Beispiel #8
0
 public override void Save(IAetherWriter writer)
 {
     base.Save(writer);
     writer.WriteVector3("DiffuseColor", DiffuseColor);
     writer.WriteVector3("AmbientLightColor", AmbientLightColor);
     writer.WriteVector3("EmissiveColor", EmissiveColor);
     WriteDirectionalLight(writer, "DirectionalLight0", DirectionalLight0);
     WriteDirectionalLight(writer, "DirectionalLight1", DirectionalLight1);
     WriteDirectionalLight(writer, "DirectionalLight2", DirectionalLight2);
     writer.WriteFloat("Alpha", Alpha);
     writer.WriteInt64("LightingEnabled", WeightsPerVertex);
 }
Beispiel #9
0
 public override void Save(IAetherWriter writer)
 {
     base.Save(writer);
     writer.WriteVector3("DiffuseColor", DiffuseColor);
     writer.WriteVector3("AmbientLightColor", AmbientLightColor);
     writer.WriteVector3("EmissiveColor", EmissiveColor);
     WriteDirectionalLight(writer, "DirectionalLight0", DirectionalLight0);
     WriteDirectionalLight(writer, "DirectionalLight1", DirectionalLight1);
     WriteDirectionalLight(writer, "DirectionalLight2", DirectionalLight2);
     writer.WriteFloat("Alpha", Alpha);
     writer.WriteBoolean("TextureEnabled", TextureEnabled);
     writer.WriteBoolean("VertexColorEnabled", VertexColorEnabled);
     writer.WriteBoolean("LightingEnabled", LightingEnabled);
 }
Beispiel #10
0
 public override void Save(IAetherWriter writer)
 {
     base.Save(writer);
     writer.WriteFloat("FieldOfView", _fieldOfView);
 }