15bd8deadSopenharmony_ciXXX - Not complete yet!!! 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ciName 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ci SGIX_spotlight_cutoff 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_SGIX_spotlight_cutoff 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ciVersion 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ci $Date: 1997/09/29 21:22:36 $ $Revision: 1.5 $ 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciNumber 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci 131 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciDependencies 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci OpenGL 1.1 is required. 225bd8deadSopenharmony_ci SGIX_fragment_light affects the definition of this extension. 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ciOverview 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci As specified, the transition to black at the edge of a spotlight cone 275bd8deadSopenharmony_ci is abrupt and, therefore, can cause aliasing in fragment lighting. 285bd8deadSopenharmony_ci This extension adds a new parameter to vertex and fragment lights that 295bd8deadSopenharmony_ci defines an angular region just within the cutoff angle over which the 305bd8deadSopenharmony_ci spotlight attenuation is transitioned smoothly to zero. The extension 315bd8deadSopenharmony_ci is modeled on that from the RenderMan Interface from Pixar. 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciIssues 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci * Should this single parameter be included in the fragment_light 365bd8deadSopenharmony_ci spec (and thus removing the requirement of this spec)? 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci * Do we want this to apply to per-vertex lights too? I would say 395bd8deadSopenharmony_ci yes at this point because this feature can be used for visual 405bd8deadSopenharmony_ci effects like those of area light sources. Vertex lights can 415bd8deadSopenharmony_ci benefit almost as much as fragment lights in this situation. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci * Do we want to force a certain falloff function or leave it up to 445bd8deadSopenharmony_ci the implementation? I think we should leave it open, but force 455bd8deadSopenharmony_ci it to be monotonic. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciNew Procedures and Functions 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci None 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ciNew Tokens 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci Accepted by the <pname> parameter of Lightf, Lighti, Lightfv, and 545bd8deadSopenharmony_ci Lightiv and by the <pname> parameter of GetLightfv and GetLightiv: 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci SPOT_CUTOFF_DELTA_SGIX 0x8193 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci Insert in Table 2.7 (need to replicate whole table...): 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci Param Type Default Description 635bd8deadSopenharmony_ci ---------------------------------------------------------------- 645bd8deadSopenharmony_ci d_rli real 0.0 spotlight delta cutoff angle 655bd8deadSopenharmony_ci (range: [0.0,90.0]) 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci Equation 2.5 becomes: 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci If d_rli<=c_rli: 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci spot_i = (P_pliV.s_dli)^s_rli c_rli!=180.0 P_pliV.s_dli>=cos(c_rli-d_rli) 725bd8deadSopenharmony_ci smooth falloff c_rli!=180.0 cos(c_rli)>=P_pliV.s_dli>cos(c_rli-d_rli) 735bd8deadSopenharmony_ci 0.0 c_rli!=180.0 P_pliV.s_dli<cos(c_rli) 745bd8deadSopenharmony_ci 1.0 c_rli==180.0 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci If d_rli>c_rli: 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci spot_i = (P_pliV.s_dli)^s_rli c_rli!=180.0 P_pliV.s_dli>=cos(c_rli) 795bd8deadSopenharmony_ci 0.0 c_rli!=180.0 P_pliV.s_dli<cos(c_rli) 805bd8deadSopenharmony_ci 1.0 c_rli==180.0 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci Before the paragraph beginning "The value of A produced..." insert: 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci When d_rli<=c_rli, the spotlight attenuation transitions smoothly to 865bd8deadSopenharmony_ci 0.0 at the cutoff angle over an angle d_rli. The falloff is 875bd8deadSopenharmony_ci implementation specific and may be, for instance, linear or cubic, 885bd8deadSopenharmony_ci however it must monotonically decrease from (cos(c_rli-d_rli))^s_rli 895bd8deadSopenharmony_ci to 0.0. 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci Insert in Table 2.8 (need to replicate whole table...): 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci Param Name Number of Values 945bd8deadSopenharmony_ci ---------------------------------------------------- 955bd8deadSopenharmony_ci d_rli SPOT_CUTOFF_DELTA_SGIX 1 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization) 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci In Section 3.9.2 Lighting Operation insert after lighting equation: 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci If d_rli<=c_rli: 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci spot_i = (P_pliV.s_dli)^s_rli c_rli!=180.0 P_pliV.s_dli>=cos(c_rli-d_rli) 1045bd8deadSopenharmony_ci smooth falloff c_rli!=180.0 cos(c_rli)>=P_pliV.s_dli>cos(c_rli-d_rli) 1055bd8deadSopenharmony_ci 0.0 c_rli!=180.0 P_pliV.s_dli<cos(c_rli) 1065bd8deadSopenharmony_ci 1.0 c_rli==180.0 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci If d_rli>c_rli: 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci spot_i = (P_pliV.s_dli)^s_rli c_rli!=180.0 P_pliV.s_dli>=cos(c_rli) 1115bd8deadSopenharmony_ci 0.0 c_rli!=180.0 P_pliV.s_dli<cos(c_rli) 1125bd8deadSopenharmony_ci 1.0 c_rli==180.0 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci When d_rli<=c_rli, the spotlight attenuation transitions smoothly to 1155bd8deadSopenharmony_ci 0.0 at the cutoff angle over an angle d_rli. The falloff is 1165bd8deadSopenharmony_ci implementation specific and may be, for instance, linear or cubic, 1175bd8deadSopenharmony_ci however it must monotonically decrease from (cos(c_rli-d_rli))^s_rli 1185bd8deadSopenharmony_ci to 0.0. 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations 1215bd8deadSopenharmony_ciand the Frame Buffer) 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci None 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions) 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci None 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests) 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci TBD 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ciAdditions to the GLX Specification 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci TBD 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ciDependencies on SGIX_fragment_light 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci If SGIX_fragment_light is not implemented, references to fragment 1405bd8deadSopenharmony_ci lighting in this document are invalid and should be ignored. 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ciErrors 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci GL_INVALID_VALUE is generated if SPOT_CUTOFF_DELTA_SGIX is outside the 1455bd8deadSopenharmony_ci range [0,90]. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ciNew State 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attribute 1505bd8deadSopenharmony_ci --------- ----------- ---- ------------- --------- 1515bd8deadSopenharmony_ci SPOT_CUTOFF_DELTA_SGIX GetLightfv 1*xR+ 0.0 lighting 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ciNew Implementation Dependent State 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci None 156