[1493] | 1 | /*
|
---|
| 2 | material matLeavesPlane256Depth256_old01
|
---|
| 3 | {
|
---|
| 4 | technique
|
---|
| 5 | {
|
---|
| 6 | pass
|
---|
| 7 | {
|
---|
| 8 | //alpha_rejection greater_equal 10
|
---|
| 9 | alpha_rejection greater_equal 110
|
---|
| 10 | //scene_blend alpha_blend
|
---|
| 11 | //depth_write off
|
---|
| 12 | //depth_check off
|
---|
| 13 | cull_hardware none
|
---|
| 14 | cull_software none
|
---|
| 15 | lighting off
|
---|
| 16 |
|
---|
| 17 | //vertex_program_ref Ogre/tree_idtexturing_hlsl_VP
|
---|
| 18 | //vertex_program_ref Ogre/tree_idtexturing_directional_VP
|
---|
| 19 | vertex_program_ref Ogre/tree_idtexturing_spotlight_VP
|
---|
| 20 | {
|
---|
| 21 | param_named_auto worldviewproj worldviewproj_matrix
|
---|
| 22 | param_named_auto proj_matrix texture_viewproj_matrix
|
---|
| 23 | param_named_auto camera_pos camera_position
|
---|
| 24 | param_named distanceScale float 0.000004
|
---|
| 25 | param_named_auto lightPosition light_position 0
|
---|
| 26 | param_named_auto lightDirection light_direction 0
|
---|
| 27 | //param_named_auto viewDirection view_direction 0
|
---|
| 28 | //param_named_auto time_0_X time_0_x
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | fragment_program_ref Ogre/tree_idtexturing_hlsl_FP
|
---|
| 32 | {
|
---|
| 33 | //param_named_auto shininess custom 1
|
---|
| 34 | // Param OpenGL
|
---|
| 35 | //param_named scale_factor float 4.0
|
---|
| 36 | // Param DirectX
|
---|
| 37 | //param_named scale_factor float 64.0
|
---|
| 38 | //param_named backProjectionCut float 45.57
|
---|
| 39 | //param_named shadowBias float 0.0
|
---|
| 40 | param_named_auto ldiffuse light_diffuse_colour 0
|
---|
| 41 | param_named_auto lspecular light_specular_colour 0
|
---|
| 42 | param_named_auto lattenuation light_attenuation 0
|
---|
| 43 | param_named_auto gambient ambient_light_colour
|
---|
| 44 | param_named Ka float 0.2
|
---|
| 45 | param_named Kd float 1.0
|
---|
| 46 | param_named Ks float 0.0
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | texture_unit
|
---|
| 50 | {
|
---|
| 51 | //rotate 90.0
|
---|
| 52 | texture orderFrontBackAtlas.exr
|
---|
| 53 | //texture orderFrontBackAtlas.png
|
---|
| 54 |
|
---|
| 55 | filtering point point none
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | //texture_unit
|
---|
| 59 | //{
|
---|
| 60 | // //rotate 90.0
|
---|
| 61 | // texture orderBackFrontAtlas.exr
|
---|
| 62 | // filtering point point none
|
---|
| 63 | //}
|
---|
| 64 |
|
---|
| 65 | texture_unit
|
---|
| 66 | {
|
---|
| 67 | //texture acer_saccarium_leaf_atlas_1024_16.png
|
---|
| 68 | //texture acer_saccarium_leaf_atlas04_scaled_16.png
|
---|
| 69 | texture white_leaf_atlas_rotated_90_16.png
|
---|
| 70 | //texture acer_saccarium_leaf_atlas04_scaled_rotated_90_16.png
|
---|
| 71 | //filtering point point none
|
---|
| 72 | filtering anisotropic
|
---|
| 73 | max_anisotropy 8
|
---|
| 74 | //filtering bilinear
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | texture_unit
|
---|
| 78 | {
|
---|
| 79 | texture Ogre/ShadowTexture0
|
---|
| 80 | }
|
---|
| 81 |
|
---|
| 82 | texture_unit
|
---|
| 83 | {
|
---|
| 84 | texture spotlight.tga
|
---|
| 85 | }
|
---|
| 86 | }
|
---|
| 87 | }
|
---|
| 88 | }
|
---|
| 89 | */
|
---|
| 90 |
|
---|
| 91 |
|
---|
| 92 |
|
---|
| 93 | //float4 main_fp(float2 texCoord: TEXCOORD0, float2 texCoordNormalized: TEXCOORD1) : COLOR
|
---|
| 94 | //{
|
---|
| 95 | // // DirectX
|
---|
| 96 | // return float4((tex2D(orderFrontBack, texCoord).w > 0.0) ? tex2D(leaf,((texCoordNormalized - tex2D(orderFrontBack, texCoord).xy) + float2(0.0,0.0)) * 4.0) : 0.0);
|
---|
| 97 | //}
|
---|
| 98 |
|
---|
| 99 |
|
---|
| 100 | float tex_atlas_size;
|
---|
| 101 | float scale_factor;
|
---|
| 102 | float3 ldiffuse;
|
---|
| 103 | float3 lspecular;
|
---|
| 104 | float3 lattenuation;
|
---|
| 105 | float4 gambient;
|
---|
| 106 | float Ka;
|
---|
| 107 | float Kd;
|
---|
| 108 | float Ks;
|
---|
| 109 | float reg : register(vFace);
|
---|
| 110 | sampler orderFrontBack: register(s0);
|
---|
| 111 | sampler leaf: register(s1);
|
---|
| 112 | sampler shadowMap: register(s2);
|
---|
| 113 | sampler spotLight: register(s3);
|
---|
| 114 |
|
---|
| 115 | float shadowBias = 45.57;
|
---|
| 116 | float backProjectionCut = 0.0; |
---|