Novetus_src/clients/2009L/content/fonts/materials/scripts/roblox.material

600 lines
12 KiB
Plaintext

vertex_program fonts/materials/programs/include/commonvp cg
{
source common.cfgx
}
fragment_program fonts/materials/programs/include/commonfp cg
{
source common.cfgx
}
vertex_program PlasticVP_med cg
{
source fonts/materials/programs/plastic_med.cgfx
profiles vs_1_1 arbvp1
entry_point plastic_vp_simple
default_params
{
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Kr float 0.35
param_named FresnelMin float 0.05
}
}
fragment_program PlasticFP_med cg
{
source fonts/materials/programs/plastic_med.cgfx
entry_point plastic_fp_simple
profiles ps_2_0 arbfp1
default_params
{
param_named_auto Lamp0Color light_diffuse_colour 0
param_named Ks float 0.75
param_named SpecExpon float 81
}
}
vertex_program PlasticVP_high cg
{
source fonts/materials/programs/plastic_high.cgfx
profiles vs_1_1 arbvp1
entry_point plastic_vp_simple
default_params
{
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Kr float 0.35
param_named FresnelMin float 0.05
param_named FresnelExp float 3.55
}
}
fragment_program PlasticFP_high cg
{
source fonts/materials/programs/plastic_high.cgfx
entry_point plastic_fp_simple
profiles ps_2_0 arbfp1
default_params
{
param_named_auto Lamp0Color light_diffuse_colour 0
param_named Ks float 0.75
param_named SpecExpon float 81
param_named Kr float 0.35
}
}
//todo: need a med and high quality studless once we decide to go with high fidelidty plastic.
material PlasticStudless
{
technique
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.9 0.9 0.9 50
}
}
}
material PlasticStudlessTransparent : PlasticStudless
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticStuds_Low : PlasticStudless
{
technique
{
pass
{
texture_unit
{
texture_alias StudsAlways
tex_coord_set 0
texture textures/SurfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Plastic_Low : PlasticStudless
{
technique
{
pass
{
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material PlasticStuds_Med : PlasticStudless
{
technique
{
pass
{
max_lights 2
vertex_program_ref PlasticVP_med
{
}
fragment_program_ref PlasticFP_med
{
}
texture_unit
{
texture_alias StudsAlways
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
}
}
}
material Plastic_Med : PlasticStudless
{
technique
{
pass
{
max_lights 2
vertex_program_ref PlasticVP_med
{
}
fragment_program_ref PlasticFP_med
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
}
}
}
material PlasticStuds_High : PlasticStudless
{
technique
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref PlasticVP_high
{
}
fragment_program_ref PlasticFP_high
{
}
texture_unit
{
texture_alias StudsAlways
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
texture_alias SkyBox
tex_coord_set 1
texture textures/Dark_BW_reflection_Blur11.dds cubic
filtering trilinear
}
}
}
}
material Plastic_High : PlasticStudless
{
technique
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref PlasticVP_high
{
}
fragment_program_ref PlasticFP_high
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
texture_alias SkyBox
tex_coord_set 1
texture textures/Dark_BW_reflection_Blur11.dds cubic
filtering trilinear
}
}
}
}
material PlasticTransparent_Low : Plastic_Low
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
texture_unit
{
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices.
alpha_op_ex source1 src_diffuse src_texture
}
}
}
}
material PlasticStudsTransparent_Low : PlasticStuds_Low
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
texture_unit
{
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices.
alpha_op_ex source1 src_diffuse src_texture
}
}
}
}
material PlasticTransparent_Med : Plastic_Med
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticStudsTransparent_Med : PlasticStuds_Med
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticTransparent_High : Plastic_High
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticStudsTransparent_High : PlasticStuds_High
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
vertex_program WoodVP cg
{
source fonts/materials/programs/wood.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
param_named NormalMapAttnExp float 5.0
// NormalMapAttnVec must match mul(TextureXf, float4(1,0,0,0))
param_named NormalMapAttnVec float3 0.1699672 -2.625356E-08 -0.9854497
//Matrix.CreateFromYawPitchRoll((float)(1.4f), (float)Math.PI /3.0f, 0.0f)
//param_named TextureXf matrix4x4 0.1699672 -2.625356E-08 -0.9854497 0 0.8534244 0.5 0.1471959 0 0.4927248 -0.8660254 0.08498365 0 0 0 0 1
//param_named TextureXf matrix4x4 0.7316889 1.200554E-08 -0.6816387 0 0.4646314 0.7316889 0.4987475 0 0.4987475 -0.6816387 0.5353686 0 12 3 -4 1
//param_named TextureXf matrix4x4 0.3658444 6.002772E-09 -0.3408194 0 0.2323157 0.3658444 0.2493737 0 0.2493737 -0.3408194 0.2676843 0 12 3 -4 0.5
//param_named TextureXf matrix4x4 1.463378 2.401109E-08 -1.363277 0 0.9292628 1.463378 0.9974949 0 0.9974949 -1.363277 1.070737 0 12 3 -4 2
}
}
fragment_program WoodFP cg
{
source fonts/materials/programs/wood.cgfx
entry_point woodPSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named WoodContrast float3 0.1 0.1 0.1
param_named Ks1 float 0.32
param_named Ks2 float 0.16
param_named SpecExpon float 4
param_named RingScale float 4
param_named AmpScale float 1
param_named LightRingEnd float 0.4
param_named DarkRingStart float 0.8
param_named DarkRingEnd float 0.83
param_named NormMapScale float 0.6
param_named NoiseScale float 64
// always set to (1 - gLightRingEnd + gDarkRingEnd - gDarkRingBegin) /2
param_named MixedColorRatio float 0.315
param_named AAFreqMultiplier float 12
}
}
fragment_program WoodFPStudless cg
{
source fonts/materials/programs/wood.cgfx
entry_point woodPS
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named WoodContrast float3 0.1 0.1 0.1
param_named Ks1 float 0.32
param_named Ks2 float 0.16
param_named SpecExpon float 4
param_named RingScale float 4
param_named AmpScale float 1
param_named LightRingEnd float 0.4
param_named DarkRingStart float 0.8
param_named DarkRingEnd float 0.83
param_named NormMapScale float 0.6
param_named NoiseScale float 64
// always set to (1 - gLightRingEnd + gDarkRingEnd - gDarkRingBegin) /2
param_named MixedColorRatio float 0.315
param_named AAFreqMultiplier float 12
}
}
material Wood_Low
{
technique lod1
{
pass
{
// set ambient and diffuse colors to Lerp(WoodColor1, WoodColor2, MixedColorRatio)
// set specular to Lerp(Ks1, Ks2, MixedColorRatio) SpecExpo
ambient vertexcolour
diffuse vertexcolour
specular 0.2696 0.2696 0.2696 4
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Wood_Med : Wood_Low
{
lod_distances 200.0
// reserver a spot for proper fallback order in dervied Wood_High
technique Procedural_lod0
{
scheme Unused
}
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.2696 0.2696 0.2696 4
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/WoodFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
//transform 0.025 0.025 0 0 -0.025 0 0.025 0 0 0 0 0 0 0 0 0
transform 0.01699672 0.1353425 -0.03733006 0 -0.1155417 -0.07062286 -0.04077413 0 0 0 0 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}
material Wood_High : Wood_Med
{
technique Procedural_lod0
{
scheme Default
lod_index 0
pass
{
max_lights 2
vertex_program_ref WoodVP
{
}
fragment_program_ref WoodFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/noiseL8_32x32x32.dds 3d
filtering trilinear
}
texture_unit
{
tex_coord_set 2
texture textures/HorizLines_normal.dds
filtering trilinear
}
}
}
technique LegacyFF_lod0
{
}
technique lod1
{
}
}