VarianceShadowmap.material
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:2k
源码类别:
游戏引擎
开发平台:
Visual C++
- // Shadow Caster __________________________________________________
- vertex_program VarianceShadowMapping/ShadowCasterVP cg
- {
- source varianceshadowcastervp.cg
- entry_point main
- profiles arbvp1 vs_2_x
- default_params
- {
- param_named_auto uModelViewProjection worldviewproj_matrix
- }
- }
- fragment_program VarianceShadowMapping/ShadowCasterFP cg
- {
- source varianceshadowcasterfp.cg
- entry_point main
- profiles arbfp1 ps_2_x
- default_params
- {
- param_named uDepthOffset float 1.0
- param_named_auto uProjection projection_matrix
- }
- }
- material VarianceShadowMapping/ShadowCaster
- {
- technique default
- {
- // Z-write only pass
- pass Z-write
- {
- //Instead of using depth_bias, we'll be implementing it manually
- vertex_program_ref VarianceShadowMapping/ShadowCasterVP
- {
- }
- fragment_program_ref VarianceShadowMapping/ShadowCasterFP
- {
- }
- }
- }
- }
- // Shadow Receiver ________________________________________________
- vertex_program VarianceShadowMapping/ShadowReceiverVP cg
- {
- source varianceshadowreceivervp.cg
- entry_point main
- profiles arbvp1 vs_2_x
- default_params
- {
- param_named_auto uModelViewProjection worldviewproj_matrix
- param_named_auto uLightPosition light_position_object_space 0
- param_named_auto uModel world_matrix
- param_named_auto uTextureViewProjection texture_viewproj_matrix
- }
- }
- fragment_program VarianceShadowMapping/ShadowReceiverFP cg
- {
- source varianceshadowreceiverfp.cg
- entry_point main
- profiles arbfp1 ps_2_x
- default_params
- {
- param_named uSTexWidth float 512.0
- param_named uSTexHeight float 512.0
- }
- }
- material VarianceShadowMapping/ShadowReceiver
- {
- technique default
- {
- pass lighting
- {
- vertex_program_ref VarianceShadowMapping/ShadowReceiverVP
- {
- }
- fragment_program_ref VarianceShadowMapping/ShadowReceiverFP
- {
- }
- // we won't rely on hardware specific filtering of z-tests
- texture_unit ShadowMap
- {
- tex_address_mode clamp
- filtering none
- }
- }
- }
- }