blob: 8cf1f39249baca0d7310d5f63372315d6bedab85 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- filters-lights-BE-09.svg -->
<!-- renamed for 1.1 suite to filters-light-01-f.svg -->
<!-- Author : Vincent Hardy 06-08-2000 -->
<!-- revised for 1.1 : Luc Minnebo Mar/14/2002 -->
<!--======================================================================-->
<svg version="1.1" baseProfile="full" id="svg-root" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript version="$Revision: 1.8 $" testname="filters-light-01-f.svg">
<Paragraph>
Verify the basic operation of the different lights used in the feDiffuseLighting
and feSpecularLighting elements. The test uses the same feDiffuseLighting filter,
using different lights.
</Paragraph>
<Paragraph>
The first row shows different settings for feDistantLight. The second row shows
different settings for fePointLight. The last row shows different settings for
feSpotLight.
</Paragraph>
<Paragraph>
The rendered image should look approximately like the reference image, except for the last
feSpotLight test for which a reference image could not be created. The reference image may not be pixel accurate. However, the rendered image should show
at least 'similar' lighting results and bump maps.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">filters-light-01-f</title>
<desc id="test-desc">Validates operation of the various SVG lights</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<!-- Title -->
<text x="240" y="20" fill="black" font-size="12" font-family="Arial" text-anchor="middle">Filters: feDistantLight, fePointLight, feSpotLight</text>
<!-- ===================================================================== -->
<!-- Filter definitions -->
<!-- ===================================================================== -->
<defs>
<!-- ================================================= -->
<!-- feDistantLight -->
<!-- ================================================= -->
<filter id="distantLightA" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feDistantLight azimuth="0" elevation="0"/>
</feDiffuseLighting>
</filter>
<filter id="distantLightB" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feDistantLight azimuth="45" elevation="0"/>
</feDiffuseLighting>
</filter>
<filter id="distantLightC" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feDistantLight azimuth="0" elevation="45"/>
</feDiffuseLighting>
</filter>
<filter id="distantLightD" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feDistantLight azimuth="45" elevation="45"/>
</feDiffuseLighting>
</filter>
<!-- ================================================= -->
<!-- fePointLight -->
<!-- ================================================= -->
<filter id="pointLightA" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<fePointLight x="0" y="0" z="10"/>
</feDiffuseLighting>
</filter>
<filter id="pointLightB" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<fePointLight x="50" y="0" z="10"/>
</feDiffuseLighting>
</filter>
<filter id="pointLightC" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<fePointLight x="0" y="30" z="10"/>
</feDiffuseLighting>
</filter>
<filter id="pointLightD" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<fePointLight x="50" y="30" z="10"/>
</feDiffuseLighting>
</filter>
<!-- ================================================= -->
<!-- feSpotLight -->
<!-- ================================================= -->
<filter id="spotLightA" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feSpotLight x="25" y="0" z="35" pointsAtX="25" pointsAtY="30" pointsAtZ="0" specularExponent="0"/>
</feDiffuseLighting>
</filter>
<filter id="spotLightB" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feSpotLight x="25" y="30" z="35" pointsAtX="25" pointsAtY="0" pointsAtZ="0" specularExponent="0"/>
</feDiffuseLighting>
</filter>
<filter id="spotLightC" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feSpotLight x="25" y="0" z="35" pointsAtX="25" pointsAtY="30" pointsAtZ="0" specularExponent="1"/>
</feDiffuseLighting>
</filter>
<filter id="spotLightD" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white">
<feSpotLight x="25" y="0" z="35" pointsAtX="25" pointsAtY="30" pointsAtZ="0" specularExponent="0" limitingConeAngle="30"/>
</feDiffuseLighting>
</filter>
</defs>
<!-- ==================================================== -->
<!-- The same image is rendered multiple times with using -->
<!-- different filters. -->
<!-- ==================================================== -->
<!-- Various feDistantLights -->
<g transform="translate(0, 40)">
<text x="70" y="10">Various values for feDistantLight azimuth and elevation</text>
<text x="70" y="25">(0, 0)</text>
<text x="165" y="25">(45, 0)</text>
<text x="260" y="25">(0, 45)</text>
<text x="355" y="25">(45, 45)</text>
<image xlink:href="resources/bumpMap2.png" x="70" y="30" width="50" height="30" filter="url(#distantLightA)"/>
<image xlink:href="resources/bumpMap2.png" x="165" y="30" width="50" height="30" filter="url(#distantLightB)"/>
<image xlink:href="resources/bumpMap2.png" x="260" y="30" width="50" height="30" filter="url(#distantLightC)"/>
<image xlink:href="resources/bumpMap2.png" x="355" y="30" width="50" height="30" filter="url(#distantLightD)"/>
</g>
<!-- Various fePointLights -->
<g transform="translate(0, 120)">
<text x="70" y="10">Various values for fePointLight's x, y and z</text>
<text x="70" y="25">(0, 0, 10)</text>
<text x="165" y="25">(50, 0, 10)</text>
<text x="260" y="25">(0, 30, 10)</text>
<text x="355" y="25">(50, 30, 10)</text>
</g>
<g>
<image transform="translate(70, 150)" xlink:href="resources/bumpMap2.png" width="50" height="30" filter="url(#pointLightA)"/>
<image transform="translate(165, 150)" xlink:href="resources/bumpMap2.png" width="50" height="30" filter="url(#pointLightB)"/>
<image transform="translate(260, 150)" xlink:href="resources/bumpMap2.png" width="50" height="30" filter="url(#pointLightC)"/>
<image transform="translate(355, 150)" xlink:href="resources/bumpMap2.png" width="50" height="30" filter="url(#pointLightD)"/>
</g>
<!-- feSpotLight -->
<g transform="translate(0, 210)">
<text x="70" y="0">Various values for feSpotLight's x, y, z, pointsAtX, pointsAtY, pointsAtZ</text>
<text x="70" y="15">(25, 0, 25)</text>
<text x="70" y="30">(25, 30, 0)</text>
<text x="165" y="15">(25, 30, 25)</text>
<text x="165" y="30">(25, 0, 0)</text>
<text x="260" y="30">np=1</text>
<text x="355" y="30">limitingConeAngle=30</text>
</g>
<g>
<rect transform="translate(70, 245)" width="50" height="30" filter="url(#spotLightA)"/>
<rect transform="translate(165, 245)" width="50" height="30" filter="url(#spotLightB)"/>
<rect transform="translate(260, 245)" width="50" height="30" filter="url(#spotLightC)"/>
<rect transform="translate(355, 245)" width="50" height="30" filter="url(#spotLightD)"/>
</g>
<!-- ===================================================== -->
<!-- Legends -->
<!-- ===================================================== -->
<!-- Surface Scale -->
</g>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.8 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>