Exemplo n.º 1
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);
 }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
0
 private void WriteDirectionalLight(IAetherWriter writer, string name, DirectionalLightData directionalLight)
 {
     writer.WriteVector3(name + "DiffuseColor", directionalLight.DiffuseColor);
     writer.WriteVector3(name + "SpecularColor", directionalLight.SpecularColor);
     writer.WriteVector3(name + "Direction", directionalLight.Direction);
     writer.WriteBoolean(name + "Enabled", directionalLight.Enabled);
 }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
0
 private void SaveDepthStencilState(IAetherWriter writer, DepthStencilState depthStencilState)
 {
     writer.WriteString("Name", depthStencilState.Name);
     writer.WriteInt64("CounterClockwiseStencilDepthBufferFail", (int)depthStencilState.CounterClockwiseStencilDepthBufferFail);
     writer.WriteInt64("CounterClockwiseStencilFail", (int)depthStencilState.CounterClockwiseStencilFail);
     writer.WriteInt64("CounterClockwiseStencilFunction", (int)depthStencilState.CounterClockwiseStencilFunction);
     writer.WriteInt64("CounterClockwiseStencilPass", (int)depthStencilState.CounterClockwiseStencilPass);
     writer.WriteBoolean("DepthBufferEnable", depthStencilState.DepthBufferEnable);
     writer.WriteInt64("DepthBufferFunction", (int)depthStencilState.DepthBufferFunction);
     writer.WriteBoolean("DepthBufferWriteEnable", depthStencilState.DepthBufferWriteEnable);
     writer.WriteInt64("ReferenceStencil", depthStencilState.ReferenceStencil);
     writer.WriteInt64("StencilDepthBufferFail", (int)depthStencilState.StencilDepthBufferFail);
     writer.WriteBoolean("StencilEnable", depthStencilState.StencilEnable);
     writer.WriteInt64("StencilFail", (int)depthStencilState.StencilFail);
     writer.WriteInt64("StencilFunction", (int)depthStencilState.StencilFunction);
     writer.WriteInt64("StencilMask", depthStencilState.StencilMask);
     writer.WriteInt64("StencilPass", (int)depthStencilState.StencilPass);
     writer.WriteInt64("StencilWriteMask", depthStencilState.StencilWriteMask);
     writer.WriteBoolean("TwoSidedStencilMode", depthStencilState.TwoSidedStencilMode);
 }