How to use PSSM in ETM ?

zhucde

15-01-2009 04:06:27

how to use PSSM(Parallel Split Shadow Mapping , see: http://www.ogre3d.org/wiki/index.php/Pa ... ow_Mapping),

it has a good effect on show map, but , when use it , we should change the ETM terrain's material to accept the show map ,

writted with CG, i am a newbie of CG, so who can tell me how to change the ETMTerrain.material ?

add follow code will using the PSSM:

technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1 1

scene_blend modulate

vertex_program_ref PSSM/shadow_receiver_vs {}
fragment_program_ref PSSM/shadow_receiver_ps {}

texture_unit shadow_tex0
{
content_type shadow
tex_address_mode clamp
}
texture_unit shadow_tex1
{
content_type shadow
tex_address_mode clamp
}
texture_unit shadow_tex2
{
content_type shadow
tex_address_mode clamp
}

texture_unit diffuse_tex
{
// texture $diffuse
}
}
}


add where ?

SongOfTheWeave

30-01-2009 21:46:34

You'll need a material setup something like this:

Ambient pass
Lighting/Shadow pass(es) - possibly using iterate_per_light
Splatting pass

This thread might provide some insight into how to set up your material even though it does not explicitly deal with shadows: viewtopic.php?f=16&t=7009

dudeabot

28-02-2009 01:25:09

any luck on this?

i tried addinga new pass, or using the existing lightining pass with the provided Playpen Ogre code for PSSM but it only produced weird artifacts

zhucde

10-03-2009 03:05:04

I still don't know how to use it in ETM , do you have any way ?