Evak
07-03-2008 19:47:16
I've been playing with Ofusion and the shaderFX bridge and have single pass materials with more than 4 texture units.
I can load the shaders via the object/user material but prefer to be able to use Ofusions material editor. but normaly I convert them to ofusion materials and assign them in the material editor. Unfortunately I'm using 6 texture units on my terrain.
Here's my material file which blends 3x normalmaps and 3x diffuse with specular alpha terrain textures. using 2 vertex colors Red to blend grass and dirt, and green to add white rock. Just fits in a single pass on 7800GS.
Modern video cards can handle this easily in a single pass, so I thought I'd ask if it would be possible to have more texture units, or an option to enable extra texture units. My last non ogre engine that used DX7 supported up to8 textures.
Perhaps something like the # of user defined buttons in the 3dsmax modifier stack?
I can load the shaders via the object/user material but prefer to be able to use Ofusions material editor. but normaly I convert them to ofusion materials and assign them in the material editor. Unfortunately I'm using 6 texture units on my terrain.
Here's my material file which blends 3x normalmaps and 3x diffuse with specular alpha terrain textures. using 2 vertex colors Red to blend grass and dirt, and green to add white rock. Just fits in a single pass on 7800GS.
fragment_program RG_VC3terrainNMSP_ps hlsl
{
source RG_VC3terrainNMSP_ps.source
entry_point f
target ps_2_0
column_major_matrices true
default_params
{
param_named lightColor float4 0 0 0 0
}
}
vertex_program RG_VC3terrainNMSP_vs hlsl
{
source RG_VC3terrainNMSP_vs.source
entry_point v
target vs_2_0
column_major_matrices true
default_params
{
param_named lightPosition float4 0 0 0 0
param_named viewInv float16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
param_named world float16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
param_named worldIT float16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
param_named wvp float16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
}
}
material
{
technique
{
pass
{
specular 1 1 1 1 0
emissive 1 1 1 1
vertex_program_ref RG_VC3terrainNMSP_vs
{
param_named_auto lightPosition light_position 0
param_named_auto viewInv inverse_transpose_view_matrix
param_named_auto world transpose_world_matrix
param_named_auto worldIT inverse_world_matrix
param_named_auto wvp transpose_worldviewproj_matrix
}
fragment_program_ref RG_VC3terrainNMSP_ps
{
param_named_auto lightColor light_diffuse_colour 0
}
texture_unit
{
texture Grass256_COL+SPEC.dds
}
texture_unit
{
texture granite_wall_COL+SPEC.dds
}
texture_unit
{
texture clif-face13_COL+SPEC.dds
}
texture_unit
{
texture Grass256_NRM.png
}
texture_unit
{
texture granite_wall_NRM.png
}
texture_unit
{
texture clif-face13_NRM.png
}
}
}
}Modern video cards can handle this easily in a single pass, so I thought I'd ask if it would be possible to have more texture units, or an option to enable extra texture units. My last non ogre engine that used DX7 supported up to8 textures.
Perhaps something like the # of user defined buttons in the 3dsmax modifier stack?