GameLib is a collection of libraries for creating applications in Cakelisp.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

134 lines
2.7 KiB

//DPSM stands for Dual Parabolloid Shadow Mapping.
fragment_program Ogre/DPSM/CubeToDpsm_ps_GLSL glsl
{
source CubeToDpsm_ps.glsl
default_params
{
param_named depthTexture int 0
}
}
fragment_program Ogre/DPSM/CubeToDpsm_Colour_ps_GLSL glsl : Ogre/DPSM/CubeToDpsm_ps_GLSL
{
preprocessor_defines OUTPUT_TO_COLOUR=1
}
fragment_program Ogre/DPSM/CubeToDpsm_ps_VK glslvk
{
source CubeToDpsm_ps.glsl
}
fragment_program Ogre/DPSM/CubeToDpsm_Colour_ps_VK glslvk : Ogre/DPSM/CubeToDpsm_ps_VK
{
preprocessor_defines OUTPUT_TO_COLOUR=1
}
fragment_program Ogre/DPSM/CubeToDpsm_ps_GLSLES glsles
{
source CubeToDpsm_ps.glsles
default_params
{
param_named depthTexture int 0
}
}
fragment_program Ogre/DPSM/CubeToDpsm_Colour_ps_GLSLES glsles : Ogre/DPSM/CubeToDpsm_ps_GLSLES
{
preprocessor_defines OUTPUT_TO_COLOUR=1
}
fragment_program Ogre/DPSM/CubeToDpsm_ps_HLSL hlsl
{
source CubeToDpsm_ps.hlsl
entry_point main
target ps_5_0 ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3
}
fragment_program Ogre/DPSM/CubeToDpsm_Colour_ps_HLSL hlsl : Ogre/DPSM/CubeToDpsm_ps_HLSL
{
preprocessor_defines OUTPUT_TO_COLOUR=1
}
fragment_program Ogre/DPSM/CubeToDpsm_ps_Metal metal
{
source CubeToDpsm_ps.metal
shader_reflection_pair_hint Ogre/Compositor/Quad_vs
}
fragment_program Ogre/DPSM/CubeToDpsm_Colour_ps_Metal metal : Ogre/DPSM/CubeToDpsm_ps_Metal
{
preprocessor_defines OUTPUT_TO_COLOUR=1
}
fragment_program Ogre/DPSM/CubeToDpsm_ps unified
{
delegate Ogre/DPSM/CubeToDpsm_ps_GLSL
delegate Ogre/DPSM/CubeToDpsm_ps_GLSLES
delegate Ogre/DPSM/CubeToDpsm_ps_VK
delegate Ogre/DPSM/CubeToDpsm_ps_HLSL
delegate Ogre/DPSM/CubeToDpsm_ps_Metal
}
fragment_program Ogre/DPSM/CubeToDpsm_Colour_ps unified
{
delegate Ogre/DPSM/CubeToDpsm_Colour_ps_GLSL
delegate Ogre/DPSM/CubeToDpsm_Colour_ps_GLSLES
delegate Ogre/DPSM/CubeToDpsm_Colour_ps_VK
delegate Ogre/DPSM/CubeToDpsm_Colour_ps_HLSL
delegate Ogre/DPSM/CubeToDpsm_Colour_ps_Metal
}
// Converts a cubemap to DPSM in the pixel shader.
material Ogre/DPSM/CubeToDpsm
{
technique
{
pass
{
//Depth writes must be on, since we write directly to the depth buffer.
depth_check on
depth_write on
depth_func always_pass
cull_hardware none
vertex_program_ref Ogre/Compositor/Quad_vs
{
}
fragment_program_ref Ogre/DPSM/CubeToDpsm_ps
{
}
texture_unit depthTexture
{
filtering none
tex_address_mode clamp
}
}
}
}
material Ogre/DPSM/CubeToDpsmColour
{
technique
{
pass
{
depth_check off
depth_write off
cull_hardware none
vertex_program_ref Ogre/Compositor/Quad_vs
{
}
fragment_program_ref Ogre/DPSM/CubeToDpsm_Colour_ps
{
}
texture_unit depthTexture
{
filtering none
tex_address_mode clamp
}
}
}
}