Changeset 8357 for data/branches/environment/programs
- Timestamp:
- Apr 28, 2011, 5:41:04 PM (14 years ago)
- Location:
- data/branches/environment/programs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.