| 1 |
<svg version="1.1" baseProfile="full" id="svg-root" |
| 2 |
width="100%" height="100%" viewBox="0 0 480 360" |
| 3 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= SVG 1.1 2nd Edition Test Case =--> |
| 6 |
<!--======================================================================--> |
| 7 |
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> |
| 8 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 9 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 10 |
<!--= All Rights Reserved. =--> |
| 11 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 12 |
<!--======================================================================--> |
| 13 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 14 |
template-version="1.4" reviewer="SVGWG" author="Vincent Hardy" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: filters-light-01-f.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#LightSourceDefinitions"> |
| 17 |
<p> |
| 18 |
Verify the basic operation of the different lights used in the feDiffuseLighting |
| 19 |
and feSpecularLighting elements. The test uses the same feDiffuseLighting filter, |
| 20 |
using different lights. |
| 21 |
</p> |
| 22 |
<p> |
| 23 |
The first row shows different settings for feDistantLight. The second row shows |
| 24 |
different settings for fePointLight. The last row shows different settings for |
| 25 |
feSpotLight. |
| 26 |
</p> |
| 27 |
</d:testDescription> |
| 28 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 29 |
<p> |
| 30 |
Run the test. No interaction required. |
| 31 |
</p> |
| 32 |
</d:operatorScript> |
| 33 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 34 |
<p> |
| 35 |
The rendered image should look approximately like the reference image, except for the last |
| 36 |
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 |
| 37 |
at least 'similar' lighting results and bump maps. |
| 38 |
</p> |
| 39 |
</d:passCriteria> |
| 40 |
</d:SVGTestCase> |
| 41 |
<title id="test-title">$RCSfile: filters-light-01-f.svg,v $</title> |
| 42 |
<defs> |
| 43 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 44 |
<font-face-src> |
| 45 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 46 |
</font-face-src> |
| 47 |
</font-face> |
| 48 |
</defs> |
| 49 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 50 |
<!-- Title --> |
| 51 |
<text x="240" y="20" fill="black" font-size="12" font-family="Arial" text-anchor="middle">Filters: feDistantLight, fePointLight, feSpotLight</text> |
| 52 |
<!-- ===================================================================== --> |
| 53 |
<!-- Filter definitions --> |
| 54 |
<!-- ===================================================================== --> |
| 55 |
<defs> |
| 56 |
<!-- ================================================= --> |
| 57 |
<!-- feDistantLight --> |
| 58 |
<!-- ================================================= --> |
| 59 |
<filter id="distantLightA" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 60 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 61 |
<feDistantLight azimuth="0" elevation="0"/> |
| 62 |
</feDiffuseLighting> |
| 63 |
</filter> |
| 64 |
<filter id="distantLightB" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 65 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 66 |
<feDistantLight azimuth="45" elevation="0"/> |
| 67 |
</feDiffuseLighting> |
| 68 |
</filter> |
| 69 |
<filter id="distantLightC" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 70 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 71 |
<feDistantLight azimuth="0" elevation="45"/> |
| 72 |
</feDiffuseLighting> |
| 73 |
</filter> |
| 74 |
<filter id="distantLightD" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 75 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 76 |
<feDistantLight azimuth="45" elevation="45"/> |
| 77 |
</feDiffuseLighting> |
| 78 |
</filter> |
| 79 |
<!-- ================================================= --> |
| 80 |
<!-- fePointLight --> |
| 81 |
<!-- ================================================= --> |
| 82 |
<filter id="pointLightA" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 83 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 84 |
<fePointLight x="0" y="0" z="10"/> |
| 85 |
</feDiffuseLighting> |
| 86 |
</filter> |
| 87 |
<filter id="pointLightB" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 88 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 89 |
<fePointLight x="50" y="0" z="10"/> |
| 90 |
</feDiffuseLighting> |
| 91 |
</filter> |
| 92 |
<filter id="pointLightC" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 93 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 94 |
<fePointLight x="0" y="30" z="10"/> |
| 95 |
</feDiffuseLighting> |
| 96 |
</filter> |
| 97 |
<filter id="pointLightD" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 98 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 99 |
<fePointLight x="50" y="30" z="10"/> |
| 100 |
</feDiffuseLighting> |
| 101 |
</filter> |
| 102 |
<!-- ================================================= --> |
| 103 |
<!-- feSpotLight --> |
| 104 |
<!-- ================================================= --> |
| 105 |
<filter id="spotLightA" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 106 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 107 |
<feSpotLight x="25" y="0" z="35" pointsAtX="25" pointsAtY="30" pointsAtZ="0" specularExponent="0"/> |
| 108 |
</feDiffuseLighting> |
| 109 |
</filter> |
| 110 |
<filter id="spotLightB" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 111 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 112 |
<feSpotLight x="25" y="30" z="35" pointsAtX="25" pointsAtY="0" pointsAtZ="0" specularExponent="0"/> |
| 113 |
</feDiffuseLighting> |
| 114 |
</filter> |
| 115 |
<filter id="spotLightC" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 116 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 117 |
<feSpotLight x="25" y="0" z="35" pointsAtX="25" pointsAtY="30" pointsAtZ="0" specularExponent="1"/> |
| 118 |
</feDiffuseLighting> |
| 119 |
</filter> |
| 120 |
<filter id="spotLightD" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> |
| 121 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="white"> |
| 122 |
<feSpotLight x="25" y="0" z="35" pointsAtX="25" pointsAtY="30" pointsAtZ="0" specularExponent="0" limitingConeAngle="30"/> |
| 123 |
</feDiffuseLighting> |
| 124 |
</filter> |
| 125 |
</defs> |
| 126 |
<!-- ==================================================== --> |
| 127 |
<!-- The same image is rendered multiple times with using --> |
| 128 |
<!-- different filters. --> |
| 129 |
<!-- ==================================================== --> |
| 130 |
<!-- Various feDistantLights --> |
| 131 |
<g transform="translate(0, 40)"> |
| 132 |
<text x="70" y="10">Various values for feDistantLight azimuth and elevation</text> |
| 133 |
<text x="70" y="25">(0, 0)</text> |
| 134 |
<text x="165" y="25">(45, 0)</text> |
| 135 |
<text x="260" y="25">(0, 45)</text> |
| 136 |
<text x="355" y="25">(45, 45)</text> |
| 137 |
<image xlink:href="../images/bumpMap2.png" x="70" y="30" width="50" height="30" filter="url(#distantLightA)"/> |
| 138 |
<image xlink:href="../images/bumpMap2.png" x="165" y="30" width="50" height="30" filter="url(#distantLightB)"/> |
| 139 |
<image xlink:href="../images/bumpMap2.png" x="260" y="30" width="50" height="30" filter="url(#distantLightC)"/> |
| 140 |
<image xlink:href="../images/bumpMap2.png" x="355" y="30" width="50" height="30" filter="url(#distantLightD)"/> |
| 141 |
</g> |
| 142 |
<!-- Various fePointLights --> |
| 143 |
<g transform="translate(0, 120)"> |
| 144 |
<text x="70" y="10">Various values for fePointLight's x, y and z</text> |
| 145 |
<text x="70" y="25">(0, 0, 10)</text> |
| 146 |
<text x="165" y="25">(50, 0, 10)</text> |
| 147 |
<text x="260" y="25">(0, 30, 10)</text> |
| 148 |
<text x="355" y="25">(50, 30, 10)</text> |
| 149 |
</g> |
| 150 |
<g> |
| 151 |
<image transform="translate(70, 150)" xlink:href="../images/bumpMap2.png" width="50" height="30" filter="url(#pointLightA)"/> |
| 152 |
<image transform="translate(165, 150)" xlink:href="../images/bumpMap2.png" width="50" height="30" filter="url(#pointLightB)"/> |
| 153 |
<image transform="translate(260, 150)" xlink:href="../images/bumpMap2.png" width="50" height="30" filter="url(#pointLightC)"/> |
| 154 |
<image transform="translate(355, 150)" xlink:href="../images/bumpMap2.png" width="50" height="30" filter="url(#pointLightD)"/> |
| 155 |
</g> |
| 156 |
<!-- feSpotLight --> |
| 157 |
<g transform="translate(0, 210)"> |
| 158 |
<text x="70" y="0">Various values for feSpotLight's x, y, z, pointsAtX, pointsAtY, pointsAtZ</text> |
| 159 |
<text x="70" y="15">(25, 0, 25)</text> |
| 160 |
<text x="70" y="30">(25, 30, 0)</text> |
| 161 |
<text x="165" y="15">(25, 30, 25)</text> |
| 162 |
<text x="165" y="30">(25, 0, 0)</text> |
| 163 |
<text x="260" y="30">np=1</text> |
| 164 |
<text x="355" y="30">limitingConeAngle=30</text> |
| 165 |
</g> |
| 166 |
<g> |
| 167 |
<rect transform="translate(70, 245)" width="50" height="30" filter="url(#spotLightA)"/> |
| 168 |
<rect transform="translate(165, 245)" width="50" height="30" filter="url(#spotLightB)"/> |
| 169 |
<rect transform="translate(260, 245)" width="50" height="30" filter="url(#spotLightC)"/> |
| 170 |
<rect transform="translate(355, 245)" width="50" height="30" filter="url(#spotLightD)"/> |
| 171 |
</g> |
| 172 |
<!-- ===================================================== --> |
| 173 |
<!-- Legends --> |
| 174 |
<!-- ===================================================== --> |
| 175 |
<!-- Surface Scale --> |
| 176 |
</g> |
| 177 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 178 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 179 |
</g> |
| 180 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 181 |
<!-- comment out this watermark once the test is approved --> |
| 182 |
<!--<g id="draft-watermark"> |
| 183 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 184 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 185 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 186 |
</g>--> |
| 187 |
</svg> |