public NiMaterialProperty()
 {
     this.ambientColor = new Color3(0.0f, 0.0f, 0.0f);
     this.diffuseColor = new Color3(0.0f, 0.0f, 0.0f);
     this.specularColor = new Color3(0.0f, 0.0f, 0.0f);
     this.emissiveColor = new Color3(0.0f, 0.0f, 0.0f);
     this.glossiness = 1f;
     this.alpha = 1f;
     this.emitMulti = 1f;
 }
 public override void Read(NiHeader header, BinaryReader reader)
 {
     base.Read(header, reader);
     if (!((header.GetVersion() == 335675399U) && (header.GetUserVersion() >= 11) && (header.GetUserVersion2() > 21)))
     {
         this.ambientColor = Utils.ReadColor3(reader);
         this.diffuseColor = Utils.ReadColor3(reader);
     }
     this.specularColor = Utils.ReadColor3(reader);
     this.emissiveColor = Utils.ReadColor3(reader);
     this.glossiness = reader.ReadSingle();
     this.alpha = reader.ReadSingle();
     if ((header.GetVersion() == 335675399U) && (header.GetUserVersion() >= 11) && (header.GetUserVersion2() > 21))
     {
         this.emitMulti = reader.ReadSingle();
     }
 }
 public BSLightingShaderProperty()
 {
     this.shaderType = 0U;
     this.shaderFlags1 = 2185233152U;
     this.shaderFlags2 = 32801U;
     this.uvOffset = new UVCoord(0.0f, 0.0f);
     this.uvScale = new UVCoord(1f, 1f);
     this.textureSet = -1;
     this.emissiveColor = new Color3(0.0f, 0.0f, 0.0f);
     this.emissiveMultiplier = 1f;
     this.textureClampMode = 3U;
     this.alpha = 1f;
     this.unknownFloat2 = 0.0f;
     this.glossiness = 80f;
     this.specularColor = new Color3(1f, 1f, 1f);
     this.specularStrength = 1f;
     this.lightingEffect1 = 0.3f;
     this.lightingEffect2 = 2f;
 }
Exemplo n.º 4
0
 public static void WriteColor3(BinaryWriter writer, Color3 value)
 {
     writer.Write(value[0]);
     writer.Write(value[1]);
     writer.Write(value[2]);
 }
 public void SetSpecularColor(Color3 value)
 {
     this.specularColor = value;
 }
 public void SetEmissiveColor(Color3 value)
 {
     this.emissiveColor = value;
 }
 public override void Read(NiHeader header, BinaryReader reader)
 {
     this.shaderType = reader.ReadUInt32();
     base.Read(header, reader);
     this.shaderFlags1 = reader.ReadUInt32();
     this.shaderFlags2 = reader.ReadUInt32();
     this.uvOffset = Utils.ReadUVCoord(reader);
     this.uvScale = Utils.ReadUVCoord(reader);
     this.textureSet = reader.ReadInt32();
     this.emissiveColor = Utils.ReadColor3(reader);
     this.emissiveMultiplier = reader.ReadSingle();
     this.textureClampMode = reader.ReadUInt32();
     this.alpha = reader.ReadSingle();
     this.unknownFloat2 = reader.ReadSingle();
     this.glossiness = reader.ReadSingle();
     this.specularColor = Utils.ReadColor3(reader);
     this.specularStrength = reader.ReadSingle();
     this.lightingEffect1 = reader.ReadSingle();
     this.lightingEffect2 = reader.ReadSingle();
     if ((int)this.shaderType == 1)
         this.environmentMapScale = reader.ReadSingle();
     else if ((int)this.shaderType == 5)
         this.skinTintColor = Utils.ReadColor3(reader);
     else if ((int)this.shaderType == 6)
         this.hairTintColor = Utils.ReadColor3(reader);
     else if ((int)this.shaderType == 7)
     {
         this.maxPasses = reader.ReadSingle();
         this.scale = reader.ReadSingle();
     }
     else if ((int)this.shaderType == 11)
     {
         this.parallaxInnerLayerThickness = reader.ReadSingle();
         this.parallaxRefractionScale = reader.ReadSingle();
         this.parallaxInnerLayerTextureScale = Utils.ReadUVCoord(reader);
         this.parallaxEnvmapStrength = reader.ReadSingle();
     }
     else if ((int)this.shaderType == 14)
     {
         this.sparkleParameters = Utils.ReadVector4(reader);
     }
     else
     {
         if ((int)this.shaderType != 16)
             return;
         this.eyeCubemapScale = reader.ReadSingle();
         this.leftEyeReflectionCenter = Utils.ReadVector3(reader);
         this.rightEyeReflectionCenter = Utils.ReadVector3(reader);
     }
 }
 public static void WriteColor3(BinaryWriter writer, Color3 value)
 {
     writer.Write(value[0]);
     writer.Write(value[1]);
     writer.Write(value[2]);
 }