//--------------------------------------------------------------------------- //These materials/shaders are part of the NEW InstanceManager implementation //Written by Matias N. Goldberg ("dark_sylinc") //--------------------------------------------------------------------------- //-------------------------------------------------------------- // GLSL Programs //-------------------------------------------------------------- vertex_program Ogre/Instancing/VTF_glsl_vs glsl { source VTFInstancing.vert preprocessor_defines DEPTH_SHADOWRECEIVER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 2 } } vertex_program Ogre/Instancing/VTF/shadow_caster_glsl_vs glsl { source VTFInstancing.vert preprocessor_defines DEPTH_SHADOWCASTER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 0 } } vertex_program Ogre/Instancing/VTF_dq_glsl_vs glsl { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,DEPTH_SHADOWRECEIVER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 2 } } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_glsl_vs glsl { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,DEPTH_SHADOWCASTER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 0 } } vertex_program Ogre/Instancing/VTF_dq_two_weights_glsl_vs glsl { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,BONE_TWO_WEIGHTS,DEPTH_SHADOWRECEIVER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 2 } } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_two_weights_glsl_vs glsl { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,BONE_TWO_WEIGHTS,DEPTH_SHADOWCASTER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 0 } } //-------------------------------------------------------------- // GLSL ES Programs //-------------------------------------------------------------- vertex_program Ogre/Instancing/VTF_glsles_vs glsles { source VTFInstancing.vert preprocessor_defines DEPTH_SHADOWRECEIVER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 2 } } vertex_program Ogre/Instancing/VTF/shadow_caster_glsles_vs glsles { source VTFInstancing.vert preprocessor_defines DEPTH_SHADOWCASTER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 0 } } vertex_program Ogre/Instancing/VTF_dq_glsles_vs glsles { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,DEPTH_SHADOWRECEIVER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 2 } } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_glsles_vs glsles { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,DEPTH_SHADOWCASTER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 0 } } vertex_program Ogre/Instancing/VTF_dq_two_weights_glsles_vs glsles { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,BONE_TWO_WEIGHTS,DEPTH_SHADOWRECEIVER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 2 } } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_two_weights_glsles_vs glsles { source VTFInstancing.vert preprocessor_defines ST_DUAL_QUATERNION,BONE_TWO_WEIGHTS,DEPTH_SHADOWCASTER=1 uses_vertex_texture_fetch true default_params { param_named matrixTexture int 0 } } //-------------------------------------------------------------- // CG Programs //-------------------------------------------------------------- vertex_program Ogre/Instancing/VTF_cg_vs cg { source VTFInstancing.cg entry_point main_vs profiles vs_3_0 vp40 compile_arguments -DDEPTH_SHADOWRECEIVER uses_vertex_texture_fetch true } vertex_program Ogre/Instancing/VTF/shadow_caster_cg_vs cg { source VTFInstancing.cg entry_point main_vs profiles vs_3_0 vp40 compile_arguments -DDEPTH_SHADOWCASTER uses_vertex_texture_fetch true } vertex_program Ogre/Instancing/VTF_dq_cg_vs cg { source VTFInstancing.cg entry_point main_vs profiles vs_3_0 vp40 compile_arguments -DDEPTH_SHADOWRECEIVER -DST_DUAL_QUATERNION uses_vertex_texture_fetch true } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_cg_vs cg { source VTFInstancing.cg entry_point main_vs profiles vs_3_0 vp40 compile_arguments -DDEPTH_SHADOWCASTER -DST_DUAL_QUATERNION uses_vertex_texture_fetch true } vertex_program Ogre/Instancing/VTF_dq_two_weights_cg_vs cg { source VTFInstancing.cg entry_point main_vs profiles vs_3_0 vp40 compile_arguments -DDEPTH_SHADOWRECEIVER -DST_DUAL_QUATERNION -DBONE_TWO_WEIGHTS uses_vertex_texture_fetch true } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_two_weights_cg_vs cg { source VTFInstancing.cg entry_point main_vs profiles vs_3_0 vp40 compile_arguments -DDEPTH_SHADOWCASTER -DST_DUAL_QUATERNION -DBONE_TWO_WEIGHTS uses_vertex_texture_fetch true } //-------------------------------------------------------------- // Unified CG/GLSL Programs //-------------------------------------------------------------- vertex_program Ogre/Instancing/VTF_vs unified { delegate Ogre/Instancing/VTF_glsl_vs delegate Ogre/Instancing/VTF_glsles_vs delegate Ogre/Instancing/VTF_cg_vs default_params { param_named_auto viewProjMatrix viewproj_matrix param_named_auto depthRange shadow_scene_depth_range 0 param_named_auto texViewProjMatrix texture_viewproj_matrix 0 } } vertex_program Ogre/Instancing/VTF/shadow_caster_vs unified { delegate Ogre/Instancing/VTF/shadow_caster_glsl_vs delegate Ogre/Instancing/VTF/shadow_caster_glsles_vs delegate Ogre/Instancing/VTF/shadow_caster_cg_vs default_params { param_named_auto viewProjMatrix viewproj_matrix param_named_auto depthRange scene_depth_range } } vertex_program Ogre/Instancing/VTF_dq_vs unified { delegate Ogre/Instancing/VTF_dq_glsl_vs delegate Ogre/Instancing/VTF_dq_glsles_vs delegate Ogre/Instancing/VTF_dq_cg_vs default_params { param_named_auto viewProjMatrix viewproj_matrix param_named_auto depthRange shadow_scene_depth_range 0 param_named_auto texViewProjMatrix texture_viewproj_matrix 0 } } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_vs unified { delegate Ogre/Instancing/VTF/shadow_caster_dq_glsl_vs delegate Ogre/Instancing/VTF/shadow_caster_dq_glsles_vs delegate Ogre/Instancing/VTF/shadow_caster_dq_cg_vs default_params { param_named_auto viewProjMatrix viewproj_matrix param_named_auto depthRange scene_depth_range } } vertex_program Ogre/Instancing/VTF_dq_two_weights_vs unified { delegate Ogre/Instancing/VTF_dq_two_weights_glsl_vs delegate Ogre/Instancing/VTF_dq_two_weights_glsles_vs delegate Ogre/Instancing/VTF_dq_two_weights_cg_vs default_params { param_named_auto viewProjMatrix viewproj_matrix param_named_auto depthRange shadow_scene_depth_range 0 param_named_auto texViewProjMatrix texture_viewproj_matrix 0 } } vertex_program Ogre/Instancing/VTF/shadow_caster_dq_two_weights_vs unified { delegate Ogre/Instancing/VTF/shadow_caster_dq_two_weights_glsl_vs delegate Ogre/Instancing/VTF/shadow_caster_dq_two_weights_glsles_vs delegate Ogre/Instancing/VTF/shadow_caster_dq_two_weights_cg_vs default_params { param_named_auto viewProjMatrix viewproj_matrix param_named_auto depthRange scene_depth_range } } material Examples/Instancing/VTF/shadow_caster { technique { pass { vertex_program_ref Ogre/Instancing/VTF/shadow_caster_vs { } fragment_program_ref Ogre/Instancing/shadow_caster_ps { } texture_unit InstancingVTF { binding_type vertex filtering none } } } } material Examples/Instancing/VTF/shadow_caster_dq { technique { pass { vertex_program_ref Ogre/Instancing/VTF/shadow_caster_dq_vs { } fragment_program_ref Ogre/Instancing/shadow_caster_ps { } texture_unit InstancingVTF { binding_type vertex filtering none } } } } material Examples/Instancing/VTF/shadow_caster_dq_two_weights { technique { pass { vertex_program_ref Ogre/Instancing/VTF/shadow_caster_dq_two_weights_vs { } fragment_program_ref Ogre/Instancing/shadow_caster_ps { } texture_unit InstancingVTF { binding_type vertex filtering none } } } } abstract material Examples/Instancing/VTF { technique { shadow_caster_material Examples/Instancing/VTF/shadow_caster pass { specular 1 1 1 1 12.5 vertex_program_ref Ogre/Instancing/VTF_vs { } fragment_program_ref Ogre/Instancing_ps { } texture_unit Diffuse { texture_alias DiffuseMap } texture_unit shadow0 { content_type shadow tex_address_mode border tex_border_colour 1 1 1 1 } texture_unit InstancingVTF { binding_type vertex filtering none } } } } abstract material Examples/Instancing/VTF_dq { technique { shadow_caster_material Examples/Instancing/VTF/shadow_caster_dq pass { specular 1 1 1 1 12.5 vertex_program_ref Ogre/Instancing/VTF_dq_vs { } fragment_program_ref Ogre/Instancing_ps { } texture_unit Diffuse { texture_alias DiffuseMap } texture_unit shadow0 { content_type shadow tex_address_mode border tex_border_colour 1 1 1 1 } texture_unit InstancingVTF { binding_type vertex filtering none } } } } abstract material Examples/Instancing/VTF_dq_two_weights { technique { shadow_caster_material Examples/Instancing/VTF/shadow_caster_dq_two_weights pass { diffuse 0.3 0.3 0.3 specular 0.1 0.1 0.1 0.1 12.5 vertex_program_ref Ogre/Instancing/VTF_dq_two_weights_vs { } fragment_program_ref Ogre/Instancing_ps { } texture_unit Diffuse { texture_alias DiffuseMap tex_address_mode clamp } texture_unit shadow0 { content_type shadow tex_address_mode border tex_border_colour 1 1 1 1 } texture_unit InstancingVTF { binding_type vertex filtering none } } } } material Examples/Instancing/VTF/Robot : Examples/Instancing/VTF { set_texture_alias DiffuseMap r2skin.jpg } material Examples/Instancing/VTF/Robot_dq : Examples/Instancing/VTF_dq { set_texture_alias DiffuseMap r2skin.jpg } material Examples/Instancing/VTF/spine_dq_two_weights : Examples/Instancing/VTF_dq_two_weights { set_texture_alias DiffuseMap circuit.dds }