Code: Select all
material Material_#1203/Stripsmiddle3
{
technique
{
pass
{
diffuse 1.0 1.0 1.0 1
specular 1.0 1.0 1.0 1 20
vertex_program_ref BumpMap_vs
{
param_named_auto view_proj_matrix worldviewproj_matrix
param_named_auto inv_view_matrix inverse_worldview_matrix
param_named_auto light_position light_position_object_space 0
param_named_auto eye_position camera_position_object_space
}
fragment_program_ref BumpMap_ps
{
param_named bumpiness float 0.6
param_named_auto ambient ambient_light_colour
param_named Ka float 0.3
param_named_auto diffuse light_diffuse_colour 0
param_named Kd float 1
param_named_auto specular light_specular_colour 0
param_named Ks float 1
param_named specular_power float 64
}
texture_unit
{
texture panel_c.jpg
}
texture_unit
{
texture panel_norm.jpg
}
}
}
}panel_norm.jpg is the normal map, also in hd jpg
This code was used for pixel shader and vertex shader:
Code: Select all
//CG Pixel Shader ps_2_0
fragment_program BumpMap_ps cg
{
source BumpMap_ps.source
profiles ps_2_0 arbfp1 fp20
entry_point main
default_params
{
param_named Ka float 0.30
param_named Kd float 1.0
param_named Ks float 1.0
param_named_auto ambient ambient_light_colour
param_named_auto diffuse light_diffuse_colour 0
param_named_auto specular light_specular_colour 0
param_named bumpiness float 1.0
param_named specular_power float 64.0
}
}
//CG Vertex Shader vs_2_0
vertex_program BumpMap_vs cg
{
source BumpMap_vs.source
profiles vs_2_0 arbvp1
entry_point main
default_params
{
param_named_auto view_proj_matrix worldViewProj_matrix
param_named_auto inv_view_matrix inverse_worldView_matrix
param_named_auto light_position light_position_object_space 0
param_named_auto eye_position camera_position_object_space
}
}Although, in ogre it renders a mix between the diffuse and normal map:
http://fltc.firstones.com/a0.04/0.04/screenshot_1.png
Sure it looks dandy, but not like it's supposed to be...
Could anyone explain why the shaders dont work and what might have been done wrong...
Closer at the error:
You can clearly see the red stripes that shouldnt appear on the mesh, also there is no bump...



