| 1 | //--------------------------------------------------- | 
|---|
| 2 | // This file includes a number of basic GPU programs | 
|---|
| 3 | // for use in many materials.  | 
|---|
| 4 | //--------------------------------------------------- | 
|---|
| 5 |  | 
|---|
| 6 |  | 
|---|
| 7 |  | 
|---|
| 8 |  | 
|---|
| 9 | // A really basic ambient pass program, support for one texture coodinate set | 
|---|
| 10 | vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureHLSL hlsl | 
|---|
| 11 | { | 
|---|
| 12 |         source Example_Basic.hlsl | 
|---|
| 13 |         entry_point ambientOneTexture_vp | 
|---|
| 14 |         target vs_1_1 | 
|---|
| 15 |  | 
|---|
| 16 |         default_params | 
|---|
| 17 |         { | 
|---|
| 18 |                 param_named_auto worldViewProj worldviewproj_matrix | 
|---|
| 19 |                 param_named_auto ambient ambient_light_colour | 
|---|
| 20 |         } | 
|---|
| 21 | } | 
|---|
| 22 | // A really basic ambient pass program, support for one texture coodinate set | 
|---|
| 23 | vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSL glsl | 
|---|
| 24 | { | 
|---|
| 25 |         source AmbientOneTexture.glsl | 
|---|
| 26 |  | 
|---|
| 27 |         default_params | 
|---|
| 28 |         { | 
|---|
| 29 |                 param_named_auto ambient ambient_light_colour | 
|---|
| 30 |         } | 
|---|
| 31 | } | 
|---|
| 32 |  | 
|---|
| 33 |  | 
|---|
| 34 | vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureUnified unified | 
|---|
| 35 | { | 
|---|
| 36 |         delegate Ogre/BasicVertexPrograms/AmbientOneTextureGLSL | 
|---|
| 37 |         delegate Ogre/BasicVertexPrograms/AmbientOneTextureHLSL | 
|---|
| 38 | } | 
|---|
| 39 |  | 
|---|
| 40 | // Same as below, but for use when rendering texture shadows | 
|---|
| 41 | vertex_program Ogre/HardwareSkinningOneWeightShadowCaster cg | 
|---|
| 42 | { | 
|---|
| 43 |         source Example_Basic.cg | 
|---|
| 44 |         entry_point hardwareSkinningOneWeightCaster_vp | 
|---|
| 45 |         profiles vs_1_1 arbvp1 | 
|---|
| 46 |         includes_skeletal_animation true | 
|---|
| 47 | } | 
|---|
| 48 | // Basic hardware skinning using one indexed weight per vertex | 
|---|
| 49 | vertex_program Ogre/HardwareSkinningOneWeight cg | 
|---|
| 50 | { | 
|---|
| 51 |    source Example_Basic.cg | 
|---|
| 52 |    entry_point hardwareSkinningOneWeight_vp | 
|---|
| 53 |    profiles vs_1_1 arbvp1 | 
|---|
| 54 |    includes_skeletal_animation true    | 
|---|
| 55 | } | 
|---|
| 56 | // Same as below, but for use when rendering texture shadows | 
|---|
| 57 | vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterCg cg | 
|---|
| 58 | { | 
|---|
| 59 |         source Example_Basic.cg | 
|---|
| 60 |         entry_point hardwareSkinningTwoWeightsCaster_vp | 
|---|
| 61 |         profiles vs_1_1 arbvp1 | 
|---|
| 62 |         includes_skeletal_animation true | 
|---|
| 63 | } | 
|---|
| 64 |  | 
|---|
| 65 | vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL glsl | 
|---|
| 66 | { | 
|---|
| 67 |         source skinningTwoWeightsShadowCasterVp.glsl | 
|---|
| 68 |         includes_skeletal_animation true | 
|---|
| 69 | } | 
|---|
| 70 |  | 
|---|
| 71 | vertex_program Ogre/HardwareSkinningTwoWeightsShadowCaster unified | 
|---|
| 72 | { | 
|---|
| 73 |         delegate Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL | 
|---|
| 74 |         delegate Ogre/HardwareSkinningTwoWeightsShadowCasterCg | 
|---|
| 75 | } | 
|---|
| 76 |  | 
|---|
| 77 | // Basic hardware skinning using two indexed weights per vertex | 
|---|
| 78 | vertex_program Ogre/HardwareSkinningTwoWeightsCg cg | 
|---|
| 79 | { | 
|---|
| 80 |    source Example_Basic.cg | 
|---|
| 81 |    entry_point hardwareSkinningTwoWeights_vp | 
|---|
| 82 |    profiles vs_1_1 arbvp1 | 
|---|
| 83 |    includes_skeletal_animation true | 
|---|
| 84 | } | 
|---|
| 85 |  | 
|---|
| 86 | vertex_program Ogre/HardwareSkinningTwoWeightsGLSL glsl | 
|---|
| 87 | { | 
|---|
| 88 |    source skinningTwoWeightsVp.glsl | 
|---|
| 89 |    includes_skeletal_animation true | 
|---|
| 90 | } | 
|---|
| 91 |  | 
|---|
| 92 | vertex_program Ogre/HardwareSkinningTwoWeights unified | 
|---|
| 93 | { | 
|---|
| 94 |         delegate Ogre/HardwareSkinningTwoWeightsGLSL | 
|---|
| 95 |         delegate Ogre/HardwareSkinningTwoWeightsCg | 
|---|
| 96 |          | 
|---|
| 97 |    default_params | 
|---|
| 98 |    { | 
|---|
| 99 |                 param_named_auto worldMatrix3x4Array world_matrix_array_3x4 | 
|---|
| 100 |                 param_named_auto viewProjectionMatrix viewproj_matrix | 
|---|
| 101 |                 param_named_auto lightPos[0] light_position 0 | 
|---|
| 102 |                 param_named_auto lightPos[1] light_position 1 | 
|---|
| 103 |                 param_named_auto lightDiffuseColour[0] light_diffuse_colour 0 | 
|---|
| 104 |                 param_named_auto lightDiffuseColour[1] light_diffuse_colour 1 | 
|---|
| 105 |    } | 
|---|
| 106 | } | 
|---|
| 107 |  | 
|---|
| 108 | // Basic hardware skinning using four indexed weights per vertex | 
|---|
| 109 | vertex_program Ogre/HardwareSkinningFourWeights cg | 
|---|
| 110 | { | 
|---|
| 111 |    source Example_Basic.cg | 
|---|
| 112 |    entry_point hardwareSkinningFourWeights_vp | 
|---|
| 113 |    profiles vs_1_1 arbvp1 | 
|---|
| 114 |    includes_skeletal_animation true | 
|---|
| 115 |  | 
|---|
| 116 | } | 
|---|
| 117 | // Basic hardware morph animation  | 
|---|
| 118 | vertex_program Ogre/HardwareMorphAnimation cg | 
|---|
| 119 | { | 
|---|
| 120 |         source Example_Basic.cg | 
|---|
| 121 |         entry_point hardwareMorphAnimation | 
|---|
| 122 |         profiles vs_1_1 arbvp1 | 
|---|
| 123 |  | 
|---|
| 124 |         includes_morph_animation true | 
|---|
| 125 |         default_params | 
|---|
| 126 |         { | 
|---|
| 127 |                 param_named_auto worldViewProj worldviewproj_matrix | 
|---|
| 128 |                 param_named_auto anim_t animation_parametric | 
|---|
| 129 |         } | 
|---|
| 130 | } | 
|---|
| 131 | // Basic hardware pose animation supporting 2 active poses | 
|---|
| 132 | vertex_program Ogre/HardwarePoseAnimation cg | 
|---|
| 133 | { | 
|---|
| 134 |         source Example_Basic.cg | 
|---|
| 135 |         entry_point hardwarePoseAnimation | 
|---|
| 136 |         profiles vs_1_1 arbvp1 | 
|---|
| 137 |  | 
|---|
| 138 |         includes_pose_animation 2 | 
|---|
| 139 |         default_params | 
|---|
| 140 |         { | 
|---|
| 141 |                 param_named_auto worldViewProj worldviewproj_matrix | 
|---|
| 142 |                 param_named_auto anim_t animation_parametric | 
|---|
| 143 |         } | 
|---|
| 144 | } | 
|---|
| 145 |  | 
|---|
| 146 |  | 
|---|