## Sub SetMaterialConstant(material, m_constant$, n1, n2, n3, n4)

Sets the constant value of an FX material

NOTE: Each constant can be of type Float, Vec2, Vec3, or Vec4. The ones listed as defined are set internally by the runtime.

FX_MATERIAL_TYPE_NORMAL_BLEND
Possible Constants

- [Float] Alpha

FX_MATERIAL_TYPE_REFRACTION
Possible Constants

- [Vec3] BaseColor
- [Float] Depth
- [Float] MixRatio
- [Float] FrameWidth
- [Float] FrameHeight
- [-Defined-] EnvMap
- [-Defined-] RefractionMap

FX_MATERIAL_TYPE_REFRACTION2
Possible Constants

- NONE

FX_MATERIAL_TYPE_GOOCH
Possible Constants

- [Vec3] SurfaceColor
- [Vec3] WarmColor
- [Vec3] CoolColor
- [Float] DiffuseWarm
- [Float] DiffuseCool

FX_MATERIAL_TYPE_PLASTIC
Possible Constants

- [Vec4] Color
- [Float] Intensity

FX_MATERIAL_TYPE_TANGENT
Possible Constants

- [Float] BViewSpace
- [Defined] MatView

FX_MATERIAL_TYPE_SPEAKER
Possible Constants

- [Float] PulseSharpness
- [Float] Beat
- [Float] Amplitude
- [Float] BassFrequency
- [Defined] Base
- [Defined] View_Proj_Matrix
- [Defined] View_Matrix
- [Defined] Time_0_X

FX_MATERIAL_TYPE_PHONG_TEXTURE
Possible Constants

- [Vec4] fvAmbient
- [Vec4] fvSpecular
- [Vec4] fvDiffuse
- [Float] fSpecularPower
- [-Defined-] BaseMap
- [-Defined-] fvEyePosition

FX_MATERIAL_TYPE_STYLE
Possible Constants

- [-Defined-] LightPos

FX_MATERIAL_TYPE_STYLE2
Possible Constants

- [-Defined-] BaseMap

FX_MATERIAL_TYPE_STYLE3
Possible Constants

- NONE

FX_MATERIAL_TYPE_STYLE4
Possible Constants

- [Float] SilhouetteThreshold
- [Vec4] SilhouetteColor
- [Float] EnableLighting
- [-Defined-] Tex

Related: GetMaterialConstant