Changeset 8357 for data/branches/environment
- Timestamp:
- Apr 28, 2011, 5:41:04 PM (14 years ago)
- Location:
- data/branches/environment
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/environment/materials/Godrays.material
r8346 r8357 1 1 /** 2 * 2 * 3 3 * \author Markus Wegmann 4 4 * … … 31 31 32 32 33 fragment_program Godray BlurFragmentProgram cg33 fragment_program GodraysBlurFragmentProgram cg 34 34 { 35 35 source Godrays_blur.cg 36 entry_point godray _blur37 profiles ps_3_0 fp4036 entry_point godrays_blur 37 profiles fp40 ps_3_0 38 38 } 39 39 40 40 41 material Godrays/Blur/RadialBlur 41 42 material Godrays/Blur 42 43 { 43 44 technique … … 46 47 pass 47 48 { 48 fragment_program_ref Godray BlurFragmentProgram49 fragment_program_ref GodraysBlurFragmentProgram 49 50 { 50 51 param_indexed 0 float2 0.0 0.0 … … 52 53 param_indexed 2 float 0.1 53 54 param_indexed 3 float 0.7 54 // The raw decal has to be loaded manually by api.55 55 } 56 56 } 57 57 } 58 58 } 59 60 fragment_program GodraysCombineFragmentProgram cg 61 { 62 source Godrays_blur.cg 63 entry_point godrays_combine 64 profiles fp40 ps_3_0 65 } 66 67 material Godrays/Combine 68 { 69 technique 70 { 71 pass 72 { 73 fragment_program_ref GodraysCombineFragmentProgram { } 74 } 75 } 76 } -
data/branches/environment/programs/Godrays_blur.cg
r8346 r8357 1 1 /** 2 2 * 3 * \brief Godrays_*.cg is a radial blur based shader implementation of the natural effects of godrays (ray light scattering). The vertex function ScreenQuadVS() skips the default wvp-transform, that is irrelevant for screenspace effects.3 * \brief Godrays_*.cg is a radial blur based shader implementation of the natural effects of godrays (ray light scattering). The vertex function ScreenQuadVS() skips the default wvp-transform, what is irrelevant in Ogre when doing a "render_quad"-pass... just to say! 4 4 * 5 5 * \author Markus Wegmann … … 27 27 //// Fragment Shader //// 28 28 29 void godray _blur(29 void godrays_blur( 30 30 OneTexelVertex IN, 31 31 … … 66 66 67 67 68 void combineRenderAndGodrays(68 void godrays_combine( 69 69 OneTexelVertex IN, 70 70 … … 103 103 > = {0f,0f,0f,1.0f}; 104 104 105 float Godray Exposure = 1f;106 float Godray Decay = 0.1f;107 float Godray Density = 0.7f;105 float GodraysExposure = 1f; 106 float GodraysDecay = 0.1f; 107 float GodraysDensity = 0.7f; 108 108 109 109 texture ScnTarget : RenderColorTarget < … … 122 122 }; 123 123 124 texture Godray Target : RenderColorTarget <124 texture GodraysTarget : RenderColorTarget < 125 125 float2 ViewPortRatio = {1,1}; 126 126 int MipLevels = 1; … … 129 129 >; 130 130 131 sampler2D Godray Decal = sampler_state {132 Texture = <Godray Target>;131 sampler2D GodraysDecal = sampler_state { 132 Texture = <GodraysTarget>; 133 133 WrapS = ClampToEdge; 134 134 WrapT = ClampToEdge; … … 188 188 189 189 VertexShader = compile vp40 ScreenQuadVS(); 190 FragmentProgram = compile fp40 godray _blur(190 FragmentProgram = compile fp40 godrays_blur( 191 191 ProjSunLightPosition, 192 Godray Exposure,193 Godray Decay,194 Godray Density,192 GodraysExposure, 193 GodraysDecay, 194 GodraysDensity, 195 195 ScnDecal); 196 196 } … … 208 208 209 209 VertexShader = compile vp40 ScreenQuadVS(); 210 FragmentProgram = compile fp40 combineRenderAndGodrays(210 FragmentProgram = compile fp40 godrays_combine( 211 211 ScnDecal, 212 Godray Decal);212 GodraysDecal); 213 213 } 214 214 } -
data/branches/environment/programs/Godrays_raw.cg
r8346 r8357 25 25 26 26 27 void black_shader(27 void obstacle_shader( 28 28 float4 position : POSITION, 29 29 … … 84 84 CullFaceEnable = true; 85 85 86 VertexProgram = compile vp40 black_shader(WvpXf);86 VertexProgram = compile vp40 obstacle_shader(WvpXf); 87 87 } 88 88 }
Note: See TracChangeset
for help on using the changeset viewer.