143 lines
2.7 KiB
Plaintext
143 lines
2.7 KiB
Plaintext
// Auxiliary lights
|
|
|
|
/////////////////////////////////////////////////
|
|
// Deferred Shading
|
|
/////////////////////////////////////////////////
|
|
// Reference material [geometry]
|
|
material DeferredShading/LightMaterial/Geometry
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
// Don't disable depth test, because the light doesn't have to be rendered
|
|
// if the bounding geometry is obscured.
|
|
scene_blend add
|
|
depth_write off
|
|
depth_check on
|
|
lighting off
|
|
|
|
texture_unit tex0
|
|
{
|
|
content_type compositor DeferredShading/GBuffer mrt_output 0
|
|
tex_address_mode clamp
|
|
filtering none
|
|
}
|
|
texture_unit tex1
|
|
{
|
|
content_type compositor DeferredShading/GBuffer mrt_output 1
|
|
tex_address_mode clamp
|
|
filtering none
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Reference material [geometry w/shadows]
|
|
material DeferredShading/LightMaterial/GeometryShadow : DeferredShading/LightMaterial/Geometry
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
texture_unit ShadowMap
|
|
{
|
|
content_type shadow
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Reference material [quad]
|
|
material DeferredShading/LightMaterial/Quad : DeferredShading/LightMaterial/Geometry
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
depth_check off
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Reference material [quad w/shadows]
|
|
material DeferredShading/LightMaterial/QuadShadow : DeferredShading/LightMaterial/GeometryShadow
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
depth_check off
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/////////////////////////////////////////////////
|
|
// Deferred Lighting
|
|
/////////////////////////////////////////////////
|
|
// Reference material [geometry]
|
|
material DeferredLighting/LightMaterial/Geometry
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
// Don't disable depth test, because the light doesn't have to be rendered
|
|
// if the bounding geometry is obscured.
|
|
scene_blend add
|
|
depth_write off
|
|
depth_check on
|
|
lighting off
|
|
|
|
texture_unit GBuffer
|
|
{
|
|
content_type compositor DeferredLighting/GBuffer mrt_output 0
|
|
tex_address_mode clamp
|
|
filtering none
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Reference material [geometry w/shadows]
|
|
material DeferredLighting/LightMaterial/GeometryShadow : DeferredLighting/LightMaterial/Geometry
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
texture_unit ShadowMap
|
|
{
|
|
content_type shadow
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Reference material [quad]
|
|
material DeferredLighting/LightMaterial/Quad : DeferredLighting/LightMaterial/Geometry
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
depth_check off
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Reference material [quad w/shadows]
|
|
material DeferredLighting/LightMaterial/QuadShadow : DeferredLighting/LightMaterial/GeometryShadow
|
|
{
|
|
technique DeferredTechnique
|
|
{
|
|
pass DeferredPass
|
|
{
|
|
depth_check off
|
|
}
|
|
}
|
|
}
|