public TexDesc(BinaryReader reader) { Source = new NiRef <NiSourceTexture>(reader); ClampMode = (TexClampMode)reader.ReadUInt32(); FilterMode = (TexFilterMode)reader.ReadUInt32(); UVSetIndex = reader.ReadUInt32(); PS2L = reader.ReadInt16(); PS2K = reader.ReadInt16(); }
public TexDesc(NiFile niFile) { source = new Ref <NiSourceTexture>(niFile); clampMode = (TexClampMode)niFile.Reader.ReadInt32(); filterMode = (TexFilterMode)niFile.Reader.ReadInt32(); UVSet = niFile.Reader.ReadInt32(); PS2L = niFile.Reader.ReadInt16(); PS2K = niFile.Reader.ReadInt16(); unknown1 = niFile.Reader.ReadInt16(); }
/* * Sets the texture clamp mode of the specified texture slot. This * specifies the way that textures will be displayed for UV coordinates * that fall outside the 0-1 range. * \param[in] slot The type of texture slot to get the clamp mode for. * \param[in] mode The new clamp mode for the specified texture slot. */ public void SetTexClampMode(TexType slot, TexClampMode mode) { if (texing_prop != null) { if (!texing_prop.HasTexture((int)slot)) { throw new Exception("The texture at the specified index does not exist."); } var td = texing_prop.GetTexture((int)slot); td.clampMode = mode; texing_prop.SetTexture((int)slot, td); } //Just silently fail for now. Not sure where this data may or may not be stored in the old style texture properties. }
public NiTextureEffect() { textureFiltering = TexFilterMode.FILTER_TRILERP; maxAnisotropy = (ushort)0; textureClamping = TexClampMode.WRAP_S_WRAP_T; textureType = TextureType.TEX_ENVIRONMENT_MAP; coordinateGenerationType = CoordGenType.CG_SPHERE_MAP; image = null; sourceTexture = null; enablePlane = (byte)0; ps2L = (short)0; ps2K = (short)-75; unknownShort = (ushort)0; }
public NiTextureEffect(NIFReader file, BinaryReader reader) : base(file, reader) { ModelProjectionMatrix = reader.ReadMatrix33(); ModelProjectionTransform = reader.Read <Vector3>(); TextureFiltering = (TexFilterMode)reader.ReadUInt32(); TextureClamping = (TexClampMode)reader.ReadUInt32(); EffectType = (EffectType)reader.ReadUInt32(); CoordGenType = (CoordGenType)reader.ReadUInt32(); SourceTexture = new NiRef <NiSourceTexture>(reader); ClippingPlane = reader.ReadBoolean(); ModelPlane = reader.Read <Plane>(); PS2L = reader.ReadInt16(); PS2K = reader.ReadInt16(); }
public NiTextureEffect(NiFile niFile) : base(niFile) { modelProjectionMatrix = niFile.Reader.ReadMatrix(); modelProjectionTransform = niFile.Reader.ReadVector3(); textureFiltering = (TexFilterMode)niFile.Reader.ReadInt32(); textureClamping = (TexClampMode)niFile.Reader.ReadInt32(); textureType = (EffectType)niFile.Reader.ReadInt32(); coordinateGenerationType = (CoordGenType)niFile.Reader.ReadInt32(); sourceTexture = niFile.Reader.ReadInt32(); clippingPlane = niFile.Reader.ReadByte(); unknownVector = niFile.Reader.ReadVector3(); unknownFloat = niFile.Reader.ReadSingle(); PS2L = niFile.Reader.ReadInt16(); PS2K = niFile.Reader.ReadInt16(); unknownShort = niFile.Reader.ReadInt16(); }
//Constructor public TexDesc() { unchecked { image = null; source = null; clampMode = TexClampMode.WRAP_S_WRAP_T; filterMode = TexFilterMode.FILTER_TRILERP; flags = (ushort)0; maxAnisotropy = (ushort)0; uvSet = (uint)0; ps2L = (short)0; ps2K = (short)-75; unknown1 = (ushort)0; hasTextureTransform = false; scale = 1.0, 1.0; rotation = 0.0f; transformMethod = (TransformMethod)0; } }
public BSLightingShaderProperty() { shaderFlags1_sk = (SkyrimShaderPropertyFlags1)2185233153; shaderFlags2_sk = (SkyrimShaderPropertyFlags2)32801; shaderFlags1_fo4 = (Fallout4ShaderPropertyFlags1)2151678465; shaderFlags2_fo4 = (Fallout4ShaderPropertyFlags2)1; uvScale = (1.0, 1.0); textureSet = null; emissiveColor = (0.0, 0.0, 0.0); emissiveMultiple = 0.0f; textureClampMode = (TexClampMode)3; alpha = 1.0f; refractionStrength = 0.0f; glossiness = 80f; smoothness = 1.0f; specularStrength = 1.0f; lightingEffect1 = 0.3f; lightingEffect2 = 2.0f; subsurfaceRolloff = 0.3f; rimlightPower = 3.402823466e+38f; backlightPower = 0.0f; grayscaleToPaletteScale = 0.0f; fresnelPower = 5.0f; wetnessSpecScale = -1.0f; wetnessSpecPower = -1.0f; wetnessMinVar = -1.0f; wetnessEnvMapScale = -1.0f; wetnessFresnelPower = -1.0f; wetnessMetalness = -1.0f; environmentMapScale = 1.0f; unknownEnvMapShort = (ushort)0; unknownSkinTintInt = (uint)0; maxPasses = 0.0f; scale = 0.0f; parallaxInnerLayerThickness = 0.0f; parallaxRefractionScale = 0.0f; parallaxEnvmapStrength = 0.0f; eyeCubemapScale = 0.0f; }
public BSShaderLightingProperty() { textureClampMode = (TexClampMode)3; }