Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2011, 5:41:04 PM (14 years ago)
Author:
marwegma
Message:

Godrays.compositor added, extended Godrays.material, unified the Godrays code a bit.

Location:
data/branches/environment/programs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • data/branches/environment/programs/Godrays_blur.cg

    r8346 r8357  
    11/**
    22*
    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!
    44*
    55* \author Markus Wegmann
     
    2727//// Fragment Shader ////
    2828
    29 void godray_blur(
     29void godrays_blur(
    3030        OneTexelVertex IN,
    3131               
     
    6666
    6767
    68 void combineRenderAndGodrays(
     68void godrays_combine(
    6969        OneTexelVertex IN,
    7070
     
    103103> = {0f,0f,0f,1.0f};
    104104
    105 float GodrayExposure = 1f;
    106 float GodrayDecay = 0.1f;
    107 float GodrayDensity = 0.7f;
     105float GodraysExposure = 1f;
     106float GodraysDecay = 0.1f;
     107float GodraysDensity = 0.7f;
    108108
    109109texture ScnTarget : RenderColorTarget <
     
    122122};
    123123
    124 texture GodrayTarget : RenderColorTarget <
     124texture GodraysTarget : RenderColorTarget <
    125125        float2 ViewPortRatio = {1,1};
    126126    int MipLevels = 1;
     
    129129>;
    130130
    131 sampler2D GodrayDecal = sampler_state {
    132     Texture = <GodrayTarget>;
     131sampler2D GodraysDecal = sampler_state {
     132    Texture = <GodraysTarget>;
    133133        WrapS = ClampToEdge;
    134134    WrapT = ClampToEdge;
     
    188188               
    189189                VertexShader = compile vp40 ScreenQuadVS();
    190         FragmentProgram = compile fp40 godray_blur(
     190        FragmentProgram = compile fp40 godrays_blur(
    191191            ProjSunLightPosition,
    192                         GodrayExposure,
    193                         GodrayDecay,
    194                         GodrayDensity,
     192                        GodraysExposure,
     193                        GodraysDecay,
     194                        GodraysDensity,
    195195                        ScnDecal);
    196196        }
     
    208208               
    209209                VertexShader = compile vp40 ScreenQuadVS();
    210         FragmentProgram = compile fp40 combineRenderAndGodrays(
     210        FragmentProgram = compile fp40 godrays_combine(
    211211                        ScnDecal,
    212                         GodrayDecal);
     212                        GodraysDecal);
    213213        }
    214214}
  • data/branches/environment/programs/Godrays_raw.cg

    r8346 r8357  
    2525
    2626
    27 void black_shader(
     27void obstacle_shader(
    2828    float4 position : POSITION,
    2929
     
    8484                        CullFaceEnable = true;
    8585               
    86                         VertexProgram = compile vp40 black_shader(WvpXf);
     86                        VertexProgram = compile vp40 obstacle_shader(WvpXf);
    8787                }
    8888}
Note: See TracChangeset for help on using the changeset viewer.