2015-05-12 12:31:33 +08:00
|
|
|
material sample
|
|
|
|
{
|
|
|
|
technique blur
|
|
|
|
{
|
|
|
|
pass 0
|
|
|
|
{
|
|
|
|
shader
|
|
|
|
{
|
|
|
|
defines = THIS_IS_AN_EXAMPLE 1;TOMORROW_IS_HOLIDAY 2
|
2015-05-28 10:46:44 +08:00
|
|
|
vertexShader = Shaders/example_Simple.vsh
|
2015-05-12 12:31:33 +08:00
|
|
|
fragmentShader = Shaders/example_Blur.fsh
|
2015-05-14 01:24:32 +08:00
|
|
|
// Uniforms
|
|
|
|
blurRadius = 3
|
2015-05-12 12:31:33 +08:00
|
|
|
sampleNum = 5
|
|
|
|
resolution = 100,100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
technique outline
|
|
|
|
{
|
|
|
|
pass 0
|
|
|
|
{
|
|
|
|
shader
|
|
|
|
{
|
2015-05-28 10:46:44 +08:00
|
|
|
vertexShader = Shaders/example_Simple.vsh
|
|
|
|
fragmentShader = Shaders/example_Outline.fsh
|
2015-05-12 12:31:33 +08:00
|
|
|
u_outlineColor = 0.1, 0.2, 0.3
|
|
|
|
u_radius = 0.01
|
|
|
|
u_threshold = 1.75
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
technique noise {
|
|
|
|
pass 0
|
|
|
|
{
|
|
|
|
shader
|
|
|
|
{
|
2015-05-28 10:46:44 +08:00
|
|
|
vertexShader = Shaders/example_Simple.vsh
|
2015-05-12 12:31:33 +08:00
|
|
|
fragmentShader = Shaders/example_Noisy.fsh
|
|
|
|
resolution = 100,100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
technique edge_detect
|
|
|
|
{
|
|
|
|
pass 0
|
|
|
|
{
|
|
|
|
shader
|
|
|
|
{
|
|
|
|
defines =
|
2015-05-28 10:46:44 +08:00
|
|
|
vertexShader = Shaders/example_Simple.vsh
|
|
|
|
fragmentShader = Shaders/example_EdgeDetection.fsh
|
2015-05-12 12:31:33 +08:00
|
|
|
resolution = 100, 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|