15bd8deadSopenharmony_ci INCOMPLETE - DO NOT RELEASE IMPLEMENTATIONS OF THIS EXTENSION 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ciName 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ci EXT_fragment_lighting 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_EXT_fragment_lighting 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ciVersion 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ci $Date: 1998/09/26 02:49:31 $ $Revision: 1.26 $ 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciNumber 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci 102 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciDependencies 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci OpenGL 1.1 is required. 225bd8deadSopenharmony_ci SGIX_color_range affects the definition of this extension. 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ciOverview 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci This extension adds a new lighting stage to the OpenGL pipeline. This 275bd8deadSopenharmony_ci stage occurs during fragment processing after the texture environment 285bd8deadSopenharmony_ci has been applied and before fog has been applied. The extension 295bd8deadSopenharmony_ci provides a mechanism for computing 'per-pixel lighting'. Fragment lighting 305bd8deadSopenharmony_ci applies to fragments generated by all primitives including pixel images. 315bd8deadSopenharmony_ci This extension doesn't eliminate vertex lighting, but can be used to 325bd8deadSopenharmony_ci complement it. For example, the diffuse contribution can be evaluated 335bd8deadSopenharmony_ci at each vertex, and the specular contribution can be evaluated at each 345bd8deadSopenharmony_ci fragment with the results being summed together to generate the final 355bd8deadSopenharmony_ci result. 365bd8deadSopenharmony_ci Ct Cf 375bd8deadSopenharmony_ci | |-------------------------------+ 385bd8deadSopenharmony_ci | | | 395bd8deadSopenharmony_ci ---------- | 405bd8deadSopenharmony_ci | | | 415bd8deadSopenharmony_ci | TexEnv | | 425bd8deadSopenharmony_ci | | | 435bd8deadSopenharmony_ci ---------- | 445bd8deadSopenharmony_ci | | 455bd8deadSopenharmony_ci ---------- | 465bd8deadSopenharmony_ci | Clamp | Nf Lf Hf Ff | 475bd8deadSopenharmony_ci ---------- | | | | | FragmentColorMaterial 485bd8deadSopenharmony_ci | ----------------- | 495bd8deadSopenharmony_ci | | | v 505bd8deadSopenharmony_ci Cf' | FragmentLight |<-o-<- Material {Am,Em,Dm,Sm,Nm,...} 515bd8deadSopenharmony_ci | | | 525bd8deadSopenharmony_ci | ----------------- 535bd8deadSopenharmony_ci | | 545bd8deadSopenharmony_ci | --------- 555bd8deadSopenharmony_ci | | Clamp | 565bd8deadSopenharmony_ci | --------- 575bd8deadSopenharmony_ci | Cl | 585bd8deadSopenharmony_ci | +---------------- 595bd8deadSopenharmony_ci v v 605bd8deadSopenharmony_ci ------------ 615bd8deadSopenharmony_ci | | 625bd8deadSopenharmony_ci | LightEnv | 635bd8deadSopenharmony_ci | | 645bd8deadSopenharmony_ci ------------ 655bd8deadSopenharmony_ci | 665bd8deadSopenharmony_ci --------- 675bd8deadSopenharmony_ci | Clamp | 685bd8deadSopenharmony_ci --------- 695bd8deadSopenharmony_ci | 705bd8deadSopenharmony_ci Cf'' 715bd8deadSopenharmony_ci | 725bd8deadSopenharmony_ci v 735bd8deadSopenharmony_ci ------- 745bd8deadSopenharmony_ci | | 755bd8deadSopenharmony_ci | Fog | 765bd8deadSopenharmony_ci | | 775bd8deadSopenharmony_ci ------- 785bd8deadSopenharmony_ci | 795bd8deadSopenharmony_ci v 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ciPatent Note 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci To the extent that SGI has patent rights that are unavoidably 845bd8deadSopenharmony_ci infringed by all implementations of this extension, SGI will, upon 855bd8deadSopenharmony_ci request, grant a license under such patent rights to the requesting 865bd8deadSopenharmony_ci party subject to reasonable terms and conditions, and without 875bd8deadSopenharmony_ci incremental charge or fee. Such license shall be non-exclusive, and 885bd8deadSopenharmony_ci non-transferable, and shall be limited to implementations of the 895bd8deadSopenharmony_ci extension in combination with any conformance certified 905bd8deadSopenharmony_ci implementation of the OpenGL API. Such license is expressly 915bd8deadSopenharmony_ci contingent upon a grant back of a non-exclusive, royalty-free, 925bd8deadSopenharmony_ci perpetual, worldwide license to SGI and its OpenGL licensees under 935bd8deadSopenharmony_ci the requesting party's patent rights that are unavoidably infringed 945bd8deadSopenharmony_ci by all implementations of this extension or OpenGL. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciIssues 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci * We specify a complete model and don't allow subsetting. if 995bd8deadSopenharmony_ci portions of the model aren't supported with hardware acceleration 1005bd8deadSopenharmony_ci then a software implementation of the complete model is 1015bd8deadSopenharmony_ci necessary. There should be sufficient mechanism for an 1025bd8deadSopenharmony_ci implementation to include partial acceleration and easily 1035bd8deadSopenharmony_ci identify when it can be used. The alternative is to 1045bd8deadSopenharmony_ci allow subsetting and a mechanisms for enumerating the capability 1055bd8deadSopenharmony_ci would this be any better? 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci I don't think so. Lighting will be an important area of 1085bd8deadSopenharmony_ci growth for OpenGL. I think we owe it to our developers 1095bd8deadSopenharmony_ci to force a consistent growth direction by trying to look 1105bd8deadSopenharmony_ci ahead a little. 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci * We apply texture environment before lighting so that decals 1135bd8deadSopenharmony_ci can be lighted correctly. The spec does not provide a 1145bd8deadSopenharmony_ci mechanism for applying texture after lighting. There are 1155bd8deadSopenharmony_ci applications where it would be useful to apply texture after 1165bd8deadSopenharmony_ci lighting (e.g. shadows or spotlight effects), but we deliberately 1175bd8deadSopenharmony_ci leave them out. Instead we will add binding posts in another 1185bd8deadSopenharmony_ci extension to allow textures to be bound to the attenuation 1195bd8deadSopenharmony_ci term, specular exponent, environment term, normal perturbation, 1205bd8deadSopenharmony_ci etc. 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci * Should the FragmentColorMaterial command really be done through 1235bd8deadSopenharmony_ci texture binding posts and TexEnv moved after lighting? 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci No. 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci * New LightModel parameters? 1285bd8deadSopenharmony_ci yes, NORMAL_INTERPOLATION control 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci * We deliberately chose to decouple the control of normal interpolation 1315bd8deadSopenharmony_ci for fragment lighting from ShadeModel, choosing to put it in the 1325bd8deadSopenharmony_ci FragmentLightModel command. We chose not to provide any mechanism to 1335bd8deadSopenharmony_ci allow flat coloring before vertex lighting, so FlatShading continues 1345bd8deadSopenharmony_ci to mean that the vertex color after vertex lighting is used to 1355bd8deadSopenharmony_ci provide a constant color across the face of a primitive. 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci * Material parameters are not interpolated. If FragmentMaterial is 1385bd8deadSopenharmony_ci enabled then the interpolated color parameter will be used as one or 1395bd8deadSopenharmony_ci more of the material parameters, but there is no equivalent notion 1405bd8deadSopenharmony_ci to per-vertex materials. If a material change occurs between a 1415bd8deadSopenharmony_ci Begin/End sequence, then only the last material specified before the 1425bd8deadSopenharmony_ci provoking vertex will affect the shading computation. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci * overload ColorMaterial & Material face param with FRAGMENT_FRONT, 1455bd8deadSopenharmony_ci FRAGMENT_BACK, and FRAGMENT_FRONT_AND_BACK rather than separate commands? 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci since the behaviour is somewhat different (not persistent) so it feels 1485bd8deadSopenharmony_ci like it should be a different command 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci * proxy mechanism for subsetting? proxy mechanism for determining 1515bd8deadSopenharmony_ci what is supported in hardware. NO. 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci * add some comments about where lighting parameters are sampled 1545bd8deadSopenharmony_ci (fragment centers, pixel centers, ...) 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci * shadow term is not quite right. removed it. 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci * should the material be undefined after color material is disabled 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci it should be well defined. fragment color material should be 1615bd8deadSopenharmony_ci thought of as a switch which causes the material parameters to be 1625bd8deadSopenharmony_ci sourced from the fragment material 'register' or from the fragment 1635bd8deadSopenharmony_ci color. At all times queries to the fragment material refer to the 1645bd8deadSopenharmony_ci material 'register' and whenever fragment color material is 1655bd8deadSopenharmony_ci disabled, material parameters are sourced from the unperturbed 1665bd8deadSopenharmony_ci fragment material 'register' 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci * disallow fragment material changes between begin/end? 1695bd8deadSopenharmony_ci seems okay, since we added a new command! - DONE 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci * add a total number of lights so that implementations can 1725bd8deadSopenharmony_ci share state between vertex and fragment lights yet be more flexible 1735bd8deadSopenharmony_ci about whether the state is used for a vertex or fragment light 1745bd8deadSopenharmony_ci (vimal). 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci Yes. MAX_ACTIVE_LIGHTS_EXT 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci * is the flatshading definition correct? unlike flatshading for 1795bd8deadSopenharmony_ci vertex lighting, the color will not be constant, just the normal 1805bd8deadSopenharmony_ci so N.L will vary across the face. Yes, it is what we want. 1815bd8deadSopenharmony_ci There is now a mechanism which allows flat or smooth color with 1825bd8deadSopenharmony_ci flat or smooth fragment lighting (flat or smooth normals). 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci * treatment of alpha? 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci alpha comes from the diffuse material if fragment lighting 1875bd8deadSopenharmony_ci is enabled. 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci * the state of FrontFace affects the interpretation of two-sided 1905bd8deadSopenharmony_ci lighting. Should there be separate state for vertex and fragment 1915bd8deadSopenharmony_ci lighting? 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci No. its a property of the geometry and shouldn't different for the 1945bd8deadSopenharmony_ci two light source types. 1955bd8deadSopenharmony_ci 1965bd8deadSopenharmony_ciNew Procedures and Functions 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci void FragmentLightModeliEXT(enum pname, int param); 1995bd8deadSopenharmony_ci void FragmentLightModelfEXT(enum pname, float param); 2005bd8deadSopenharmony_ci void FragmentLightModelivEXT(enum pname, int *params); 2015bd8deadSopenharmony_ci void FragmentLightModelfvEXT(enum pname, float *params); 2025bd8deadSopenharmony_ci 2035bd8deadSopenharmony_ci void FragmentLightiEXT(enum light, enum pname, int param); 2045bd8deadSopenharmony_ci void FragmentLightfEXT(enum light, enum pname, float param); 2055bd8deadSopenharmony_ci void FragmentLightivEXT(enum light, enum pname, int *params); 2065bd8deadSopenharmony_ci void FragmentLightfvEXT(enum light, enum pname, float *params); 2075bd8deadSopenharmony_ci 2085bd8deadSopenharmony_ci void GetFragmentLightivEXT(enum light, enum pname, int *params); 2095bd8deadSopenharmony_ci void GetFragmentLightfvEXT(enum light, enum pname, float *params); 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci void FragmentMaterialfEXT(enum face, enum pname, const float param); 2125bd8deadSopenharmony_ci void FragmentMaterialiEXT(enum face, enum pname, const int param); 2135bd8deadSopenharmony_ci void FragmentMaterialfvEXT(enum face, enum pname, const float *params); 2145bd8deadSopenharmony_ci void FragmentMaterialivEXT(enum face, enum pname, const int *params); 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci void FragmentColorMaterialEXT(enum face, enum mode); 2175bd8deadSopenharmony_ci 2185bd8deadSopenharmony_ci void GetFragmentMaterialfvEXT(enum face, enum pname, const float *params); 2195bd8deadSopenharmony_ci void GetFragmentMaterialivEXT(enum face, enum pname, const int *params); 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci void LightEnviEXT(enum pname, int param); 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ciNew Tokens 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by 2275bd8deadSopenharmony_ci the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and 2285bd8deadSopenharmony_ci GetDoublev: 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci FRAGMENT_LIGHTING_EXT 0x8400 2315bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL_EXT 0x8401 2325bd8deadSopenharmony_ci 2335bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 2345bd8deadSopenharmony_ci and GetDoublev: 2355bd8deadSopenharmony_ci 2365bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL_FACE_EXT 0x8402 2375bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT 0x8403 2385bd8deadSopenharmony_ci MAX_FRAGMENT_LIGHTS_EXT 0x8404 2395bd8deadSopenharmony_ci MAX_ACTIVE_LIGHTS_EXT 0x8405 2405bd8deadSopenharmony_ci CURRENT_RASTER_NORMAL_EXT 0x8406 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci Accepted by the <pname> parameter of LightEnviEXT, by 2445bd8deadSopenharmony_ci the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and 2455bd8deadSopenharmony_ci GetDoublev: 2465bd8deadSopenharmony_ci 2475bd8deadSopenharmony_ci LIGHT_ENV_MODE_EXT 0x8407 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci Accepted by the <pname> parameter of FragmentLightModeliEXT, 2505bd8deadSopenharmony_ci FragmentLightModelfEXT, FragmentLightModelivEXT, 2515bd8deadSopenharmony_ci FragmentLightModelfvEXT, GetBooleanv, GetIntegerv, GetFloatv, and 2525bd8deadSopenharmony_ci GetDoublev: 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT 0x8408 2555bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT 0x8409 2565bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_AMBIENT_EXT 0x840A 2575bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT 0x840B 2585bd8deadSopenharmony_ci 2595bd8deadSopenharmony_ci Accepted by the <light> parameter of FragmentLightfEXT, 2605bd8deadSopenharmony_ci FragmentLightiEXT, FragmentLightfvEXT, and FragmentLightivEXT, and by 2615bd8deadSopenharmony_ci the <cap> parameter of Enable, Disable, and IsEnabled, and by the <light> 2625bd8deadSopenharmony_ci parameter of GetFragmentLightfvEXT and GetFragmentLightivEXT: 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci FRAGMENT_LIGHT0_EXT 0x840C 2655bd8deadSopenharmony_ci . 2665bd8deadSopenharmony_ci . 2675bd8deadSopenharmony_ci . 2685bd8deadSopenharmony_ci FRAGMENT_LIGHT7_EXT 0x8413 2695bd8deadSopenharmony_ci <reserve enums for 32> 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 2725bd8deadSopenharmony_ci 2735bd8deadSopenharmony_ci Section 2.12 Current Raster Position 2745bd8deadSopenharmony_ci 2755bd8deadSopenharmony_ci ... <paragraph 2> 2765bd8deadSopenharmony_ci The current raster position consists of three window coordinates xw, yw, 2775bd8deadSopenharmony_ci and zw, a clip corrdinate wc value, an eye coordinate distance, a valid 2785bd8deadSopenharmony_ci bit, and associated data consisting of a color, normal, and texture 2795bd8deadSopenharmony_ci coordinates. It is set ... 2805bd8deadSopenharmony_ci 2815bd8deadSopenharmony_ci ... <paragraph 5> 2825bd8deadSopenharmony_ci The current raster position requires five single-precision floating point 2835bd8deadSopenharmony_ci values for its xw, yw, and zw window coordinates, its wc clip coordinate, 2845bd8deadSopenharmony_ci and its eye coordinate distance, a single valid bit, a color (RGBA and color 2855bd8deadSopenharmony_ci index), normal, and texture coordinates for associated data. In the initial 2865bd8deadSopenharmony_ci state, the coordinates and texture coordinates are both (0,0,0,1), the eye 2875bd8deadSopenharmony_ci coordinate distance is 0, the valid bit is set, the associated RGBA color is 2885bd8deadSopenharmony_ci (1,1,1,1), the associated color index is 1, and the associated normal is 2895bd8deadSopenharmony_ci (0,0,1). In RGBA mode, the associated color index always has its initial 2905bd8deadSopenharmony_ci value; in color index mode, the RGBA color always maintains its initial 2915bd8deadSopenharmony_ci value. 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci Section 2.13 Colors and Coloring 2945bd8deadSopenharmony_ci 2955bd8deadSopenharmony_ci ... 2965bd8deadSopenharmony_ci Next vertex lighting, if enabled produces a color. If vertex lighting is 2975bd8deadSopenharmony_ci disabled, the current color is used in further processing. After vertex 2985bd8deadSopenharmony_ci lighting, RGBA colors are clamped to the range [0,1]. A color index is 2995bd8deadSopenharmony_ci converted to fixed-point and then its integer portion is masked (see 3005bd8deadSopenharmony_ci section 2.13.16). After clamping or masking, a primitive may be flatshaded, 3015bd8deadSopenharmony_ci indicating that all vertices of the primitive are to have the same color 3025bd8deadSopenharmony_ci (and normal). Finally, a primitive is clipped, then colors (texture 3035bd8deadSopenharmony_ci coordinates and normals) must be computed at the vertices introduced or 3045bd8deadSopenharmony_ci modified by clipping. 3055bd8deadSopenharmony_ci 3065bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization) 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci Section 3.6.3 Rasterization of Pixel Rectangles 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci Conversion to Fragments 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci ... <paragraph 2> 3135bd8deadSopenharmony_ci A fragment arising from a group consisting of color data takes on the color 3145bd8deadSopenharmony_ci index or color components of the group; the depth, normal and texture 3155bd8deadSopenharmony_ci coordinates are taken from the current raster position's associated data. 3165bd8deadSopenharmony_ci A fragment arising from a depth component takes the component's depth 3175bd8deadSopenharmony_ci value; the color, normal, and texture coordinate are given by those associated 3185bd8deadSopenharmony_ci with the current raster position. In both cases texture coordinates s, t, 3195bd8deadSopenharmony_ci and r are preplaced with s/q, t/q, and r/q, respectively. If q is less than 3205bd8deadSopenharmony_ci or equal to zero the results are undefined. Groups arising from DrawPixels 3215bd8deadSopenharmony_ci with a <format> of STENCIL_INDEX are treated specially and are described in 3225bd8deadSopenharmony_ci section 4.3.1. 3235bd8deadSopenharmony_ci 3245bd8deadSopenharmony_ci 3255bd8deadSopenharmony_ci Before Section 3.9 Fog insert: 3265bd8deadSopenharmony_ci 3275bd8deadSopenharmony_ci Section 3.9 Fragment Lighting 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci If enabled, fragment lighting computes a color for each rasterized fragment 3305bd8deadSopenharmony_ci by applying an equation defined by a client-specified lighting model to 3315bd8deadSopenharmony_ci a collection of parameters that can include the fragment coordinates, the 3325bd8deadSopenharmony_ci coordinates of one or more light sources, the fragment normal, and 3335bd8deadSopenharmony_ci parameters defining the characteristics of the light source and current 3345bd8deadSopenharmony_ci fragment material. Fragment lighting is only defined for RGBA mode, it 3355bd8deadSopenharmony_ci has no effect in color index mode. 3365bd8deadSopenharmony_ci 3375bd8deadSopenharmony_ci Fragment lighting may be in one of two states: 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci 1. Lighting Off. In this state the color assigned to a fragment is the 3405bd8deadSopenharmony_ci rasterized fragment's post-texturing color. 3415bd8deadSopenharmony_ci 3425bd8deadSopenharmony_ci 2. Lighting On. In this state the color assigned to a fragment is the 3435bd8deadSopenharmony_ci result of combining the rasterized fragment's post-texturing color and 3445bd8deadSopenharmony_ci a color computed from the current fragment lighting parameters. The 3455bd8deadSopenharmony_ci two colors are combined according to the function defined 3465bd8deadSopenharmony_ci by Lighting Environment described below. 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci Fragment lighting is turned either on or off using the generic Enable or 3495bd8deadSopenharmony_ci Disable commands with the symbolic value FRAGMENT_LIGHTING_EXT. 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci 3.9.1 Lighting Environment 3525bd8deadSopenharmony_ci 3535bd8deadSopenharmony_ci The command 3545bd8deadSopenharmony_ci 3555bd8deadSopenharmony_ci void LightEnviEXT(enum pname, int param); 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci sets parameters of the lighting environment that specifies how the computed 3585bd8deadSopenharmony_ci illumination value is combined with the post-texturing fragment color. 3595bd8deadSopenharmony_ci <pname> is a symbolic constant indicating the parameter to be set, <param> 3605bd8deadSopenharmony_ci is a value to which to set a single valued parameter. The possible 3615bd8deadSopenharmony_ci environment parameter is LIGHT_ENV_MODE_EXT. LIGHT_ENV_MODE_EXT may be 3625bd8deadSopenharmony_ci set to one of REPLACE, MODULATE, or ADD. 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ci The value of LIGHT_ENV_MODE_EXT specifies an environment function. 3655bd8deadSopenharmony_ci The result of this function depends on the post-texturing fragment color 3665bd8deadSopenharmony_ci (Cf) and the color computed (Cl) in equation (3.2) below. The functions 3675bd8deadSopenharmony_ci are specified in Table 3.3 3685bd8deadSopenharmony_ci 3695bd8deadSopenharmony_ci REPLACE MODULATE ADD 3705bd8deadSopenharmony_ci 3715bd8deadSopenharmony_ci Rv = Rl Rv = RfRl Rv = Rf+Rl 3725bd8deadSopenharmony_ci Gv = Gl Gv = GfGl Gv = Gf+Gl 3735bd8deadSopenharmony_ci Bv = Bl Bv = BfBl Bv = Bf+Bl 3745bd8deadSopenharmony_ci Av = Al Av = AfAl Av = Af+Al 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci Table 3.3 Light environment functions 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci 3795bd8deadSopenharmony_ci 3.9.2 Lighting Operation 3805bd8deadSopenharmony_ci 3815bd8deadSopenharmony_ci The equation for the fragment illumination model is: 3825bd8deadSopenharmony_ci 3835bd8deadSopenharmony_ci C = Em emissive 3845bd8deadSopenharmony_ci + Am*As ambient material*scene ambient color 3855bd8deadSopenharmony_ci SUM{_i = 0 through Nf-1} { 3865bd8deadSopenharmony_ci + Atten_i*SpotL_i*{ distance/spot light attenuation 3875bd8deadSopenharmony_ci + Am*Al_i ambient material*ambient light 3885bd8deadSopenharmony_ci + Dm*Dl_i*(N.L_i) diffuse material*diffuse light 3895bd8deadSopenharmony_ci + Sm*Sl_i*(f_i)(N.H_i)^n specular material*specular light 3905bd8deadSopenharmony_ci } 3915bd8deadSopenharmony_ci } 3925bd8deadSopenharmony_ci 3935bd8deadSopenharmony_ci Nf is the number of fragment light sources 3945bd8deadSopenharmony_ci N is the fragment normal vector 3955bd8deadSopenharmony_ci L_i is the direction vector from the fragment position to the light source 3965bd8deadSopenharmony_ci H_i is the half angle vector 3975bd8deadSopenharmony_ci f_i is as defined in equation (2.2) 3985bd8deadSopenharmony_ci n is the specular exponent (shininess) 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci Rewrite the equation as: 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci I[i] = Atten_i*SpotL_i*(Am*Al_i + Dm*Dl_i*(N.L_i) + Sm*Sl*(f_i)(N.H_i)^n) (3.1) 4035bd8deadSopenharmony_ci 4045bd8deadSopenharmony_ci and 4055bd8deadSopenharmony_ci 4065bd8deadSopenharmony_ci I' = SUM{i = 0 through Nf-1} I[i] 4075bd8deadSopenharmony_ci 4085bd8deadSopenharmony_ci C = Em + Am*As + I' (3.2) 4095bd8deadSopenharmony_ci 4105bd8deadSopenharmony_ci Equation (3.1) is the same as the vertex lighting equation described in 4115bd8deadSopenharmony_ci section 2.13.1 for a single light source. Similar to vertex lighting, 4125bd8deadSopenharmony_ci equation 3.2 is only evaluated for the R, G, and B components and the A 4135bd8deadSopenharmony_ci component of C is determined from the alpha component of Dm. 4145bd8deadSopenharmony_ci 4155bd8deadSopenharmony_ci In order to compute the illumination terms for each fragment, the eye 4165bd8deadSopenharmony_ci coordinates of the fragment can be used to compute the light direction, 4175bd8deadSopenharmony_ci half angle vector, and attenuation factor in a manner similar to that 4185bd8deadSopenharmony_ci used in the vertex lighting computations. It is permissible for an 4195bd8deadSopenharmony_ci implementation to approximate these by computing these values as well 4205bd8deadSopenharmony_ci as the normal vector at the vertices and interpolating and 4215bd8deadSopenharmony_ci renormalizing the results. 4225bd8deadSopenharmony_ci 4235bd8deadSopenharmony_ci Fragment material state is maintained which is distinct from the 4245bd8deadSopenharmony_ci vertex material state. The fragment material state consists of 4255bd8deadSopenharmony_ci emission, ambient, diffuse, specular and shininess terms for both 4265bd8deadSopenharmony_ci the front and back face of a primitive. Unlike vertex lighting, the 4275bd8deadSopenharmony_ci fragment material state is constant across a primitive since 4285bd8deadSopenharmony_ci it is resolved during rasterization. The results of the back face 4295bd8deadSopenharmony_ci computation described in section 3.5.1 are used to determine whether 4305bd8deadSopenharmony_ci the front material or back material is used when two sided lighting 4315bd8deadSopenharmony_ci is enabled. 4325bd8deadSopenharmony_ci 4335bd8deadSopenharmony_ci There is separate state for each fragment light source. The 4345bd8deadSopenharmony_ci fragment light source parameters are the same as the vertex light 4355bd8deadSopenharmony_ci source parameters described in section 2.13.1. The minimum number of 4365bd8deadSopenharmony_ci fragment light sources is 1. The number of available fragment light 4375bd8deadSopenharmony_ci sources can be queried by issuing the Get command with the <pname> 4385bd8deadSopenharmony_ci parameter set to MAX_FRAGMENT_LIGHTS_EXT. 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ci Distinct lighting model state is also maintained for vertex lighting and 4415bd8deadSopenharmony_ci fragment lighting. The lighting model state is described in section 4425bd8deadSopenharmony_ci 2.13.1. Fragment lighting model state includes one additional parameter, 4435bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT, which controls how normals 4445bd8deadSopenharmony_ci are selected for use in the fragment lighting computations for a primitive. 4455bd8deadSopenharmony_ci If FLAT is selected for the lighting model, the normal from the provoking 4465bd8deadSopenharmony_ci vertex (as described in Section 2.13.7 Flatshading) of the primitive for all 4475bd8deadSopenharmony_ci fragment lighting computations for the primitive. If SMOOTH is specified 4485bd8deadSopenharmony_ci a normal is computed for each fragment using the normals from all of the 4495bd8deadSopenharmony_ci vertices of the primitive. 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ci Fragment lighting differs from vertex lighting in that all components 4525bd8deadSopenharmony_ci of lighting parameters which are of type color in Table 2.7 are clamped 4535bd8deadSopenharmony_ci to the range [0,1] when they are specified. 4545bd8deadSopenharmony_ci 4555bd8deadSopenharmony_ci Equation 3.1 is evaluated for each light source and the resulting 4565bd8deadSopenharmony_ci colors are summed. This result is added to the material emissive and 4575bd8deadSopenharmony_ci scene ambient terms as in equation 3.2 to produce the R, G, and B 4585bd8deadSopenharmony_ci color components. The A component is determined from the diffuse 4595bd8deadSopenharmony_ci material's A component. The resulting color components 4605bd8deadSopenharmony_ci are clamped to the range [0,1] and then passed to the lighting 4615bd8deadSopenharmony_ci environment computation. 4625bd8deadSopenharmony_ci 4635bd8deadSopenharmony_ci 4645bd8deadSopenharmony_ci 3.9.3 Lighting Parameter Specification 4655bd8deadSopenharmony_ci 4665bd8deadSopenharmony_ci The fragment material state can be set with the commands 4675bd8deadSopenharmony_ci FragmentMaterialfEXT, FragmentMaterialfvEXT, FragmentMaterialiEXT, 4685bd8deadSopenharmony_ci FragmentMaterialivEXT using the values AMBIENT, DIFFUSE, SPECULAR, 4695bd8deadSopenharmony_ci SHININESS and EMISSION. This state can be queried using the commands 4705bd8deadSopenharmony_ci GetFragmentMaterialfvEXT and GetFragmentMaterialivEXT. 4715bd8deadSopenharmony_ci 4725bd8deadSopenharmony_ci Lighting parameters for fragment light i can be modified by issuing the 4735bd8deadSopenharmony_ci commands FragmentLightfEXT, FragmentLightiEXT, FragmentLightfvEXT, and 4745bd8deadSopenharmony_ci FragmentLightivEXT with the <light> parameter 4755bd8deadSopenharmony_ci set to FRAGMENT_LIGHTi_EXT. The lighting parameters for fragment light i 4765bd8deadSopenharmony_ci can be queried by issuing the commands GetFragmentLightfvEXT and 4775bd8deadSopenharmony_ci GetFragmentLightivEXT with the <light> parameter set to FRAGMENT_LIGHTi_EXT. 4785bd8deadSopenharmony_ci 4795bd8deadSopenharmony_ci Lighting model parameters for fragment lighting can be modified using the 4805bd8deadSopenharmony_ci commands FragmentLightModel{T}EXT, FragmentLightModel{T}vEXT. The 4815bd8deadSopenharmony_ci lighting model parameters can be queried by issuing the Get command <pname> 4825bd8deadSopenharmony_ci parameter set to the appropriate fragment lighting model parameter: 4835bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT, FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT, 4845bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_AMBIENT_EXT or FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT. 4855bd8deadSopenharmony_ci 4865bd8deadSopenharmony_ci 4875bd8deadSopenharmony_ci 3.9.4 FragmentColorMaterial 4885bd8deadSopenharmony_ci 4895bd8deadSopenharmony_ci One or more fragment material properties in Equation 3.2 can be 4905bd8deadSopenharmony_ci replaced with the fragment's pre-texturing color, causing these color 4915bd8deadSopenharmony_ci values to be used during the lighting computation. This behavior is enabled 4925bd8deadSopenharmony_ci and disabled by calling Enable and Disable with the symbolic value 4935bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL. 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci The command that controls which of these modes is selected is 4965bd8deadSopenharmony_ci 4975bd8deadSopenharmony_ci void FragmentColorMaterial(enum face, enum mode); 4985bd8deadSopenharmony_ci 4995bd8deadSopenharmony_ci <face> is one of FRONT, BACK, or FRONT_AND_BACK, indicating whether 5005bd8deadSopenharmony_ci the front material, back material, or both are affected by the 5015bd8deadSopenharmony_ci pre-texturing color. <mode> is one of EMISSION, AMBIENT, DIFFUSE, 5025bd8deadSopenharmony_ci SPECULAR, or AMBIENT_AND_DIFFUSE and specifies which material property 5035bd8deadSopenharmony_ci or properties are subsituted with the pre-texturing color. The substutions 5045bd8deadSopenharmony_ci do not affect the material state. When FragmentColorMaterial 5055bd8deadSopenharmony_ci is disabled the values in the fragment material state are used. 5065bd8deadSopenharmony_ci GetFragmentMaterial returns the fragment material last specified with 5075bd8deadSopenharmony_ci FragmentMaterial, regardless of whether FragmentColorMaterial is enabled. 5085bd8deadSopenharmony_ci 5095bd8deadSopenharmony_ci 3.9.5 Interactions with Vertex Lighting 5105bd8deadSopenharmony_ci 5115bd8deadSopenharmony_ci In order to allow implementions to share resources for vertex lighting and 5125bd8deadSopenharmony_ci fragment lighting, an implementation may limit the maximum number of combined 5135bd8deadSopenharmony_ci vertex and fragment lights to a number less than the sum of MAX_LIGHTS and 5145bd8deadSopenharmony_ci MAX_FRAGMENT_LIGHTS_EXT. This limit can be queried using the Get command 5155bd8deadSopenharmony_ci with <pname> parameter MAX_ACTIVE_LIGHTS_EXT. State for all 5165bd8deadSopenharmony_ci fragment and vertex lights is always maintained. When multiple 5175bd8deadSopenharmony_ci lights are enabled, priority is given to vertex lights starting with 5185bd8deadSopenharmony_ci LIGHT0 through LIGHT<n> where <n> is equal to MAX_LIGHTS, followed by 5195bd8deadSopenharmony_ci FRAGMENT_LIGHT0_EXT through FRAGMENT_LIGHT<m>_EXT where <m> is equal 5205bd8deadSopenharmony_ci to MAX_FRAGMENT_LIGHTS_EXT. 5215bd8deadSopenharmony_ci 5225bd8deadSopenharmony_ci 5235bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations 5245bd8deadSopenharmony_ciand the Frame Buffer) 5255bd8deadSopenharmony_ci 5265bd8deadSopenharmony_ci None 5275bd8deadSopenharmony_ci 5285bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions) 5295bd8deadSopenharmony_ci 5305bd8deadSopenharmony_ci None 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests) 5335bd8deadSopenharmony_ci 5345bd8deadSopenharmony_ci TBD 5355bd8deadSopenharmony_ci 5365bd8deadSopenharmony_ciAdditions to the GLX Specification 5375bd8deadSopenharmony_ci 5385bd8deadSopenharmony_ci TBD 5395bd8deadSopenharmony_ci 5405bd8deadSopenharmony_ciDependencies on SGIX_color_range 5415bd8deadSopenharmony_ci 5425bd8deadSopenharmony_ci If SGIX_color_range is implemented, then the components of lighting 5435bd8deadSopenharmony_ci parameters of type color, the result of evaluating the lighting 5445bd8deadSopenharmony_ci equation and the results of evaluating the lighting environment 5455bd8deadSopenharmony_ci are clamped to the extended color range rather than [0,1]. 5465bd8deadSopenharmony_ci 5475bd8deadSopenharmony_ciErrors 5485bd8deadSopenharmony_ci INVALID_ENUM is generated if FragmentMaterial{T}EXT, 5495bd8deadSopenharmony_ci FragmentMaterial{T}vEXT, or FragmentColorMaterialEXT, parameter <face> is 5505bd8deadSopenharmony_ci not FRONT, BACK or FRONT_AND_BACK. 5515bd8deadSopenharmony_ci 5525bd8deadSopenharmony_ci INVALID_ENUM is generated if FragmentMaterial{T}EXT or 5535bd8deadSopenharmony_ci FragmentMaterial{T}vEXT parameter <pname> is not AMBIENT, DIFFUSE, 5545bd8deadSopenharmony_ci SPECULAR, EMISSION, SHININESS, or AMBIENT_AND_DIFFUSE. 5555bd8deadSopenharmony_ci 5565bd8deadSopenharmony_ci INVALID_ENUM is generated if GetFragmentMaterial{T}vEXT parameter <face> 5575bd8deadSopenharmony_ci is not FRONT or BACK. 5585bd8deadSopenharmony_ci 5595bd8deadSopenharmony_ci INVALID_ENUM is generated if GetFragmentMaterial{T}vEXT parameter <pname> 5605bd8deadSopenharmony_ci is not AMBIENT, DIFFUSE, SPECULAR, EMISSION, or SHININESS, 5615bd8deadSopenharmony_ci 5625bd8deadSopenharmony_ci INVALID_ENUM if FragmentColorMaterialEXT parameter <mode> is not EMISSION, 5635bd8deadSopenharmony_ci AMBIENT, DIFFUSE, SPECULAR, or AMBIENT_AND_DIFFUSE 5645bd8deadSopenharmony_ci 5655bd8deadSopenharmony_ci INVALID_ENUM if LightEnviEXT parameter <pname> is not LIGHT_ENV_MODE_EXT 5665bd8deadSopenharmony_ci or if parameter <mode> is not REPLACE, MODULATE, or ADD. 5675bd8deadSopenharmony_ci 5685bd8deadSopenharmony_ci INVALID_ENUM is generated if FragmentLightModel{T}EXT <pname> is not 5695bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT, FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT 5705bd8deadSopenharmony_ci or FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT or if 5715bd8deadSopenharmony_ci FragmentLightModel{T}vEXT, parameter <pname> is not 5725bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_AMBIENT_EXT, FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT 5735bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT or 5745bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT. 5755bd8deadSopenharmony_ci 5765bd8deadSopenharmony_ci INVALID_ENUM is generated if FragmentLight{T}EXT, FragmentLight{T}vEXT, 5775bd8deadSopenharmony_ci or GetFragmentLight{T}vEXT parameter <light> is not FRAGMENT_LIGHT0_EXT 5785bd8deadSopenharmony_ci ... FRAGMENT_LIGHT<n>_EXT where n is one minus the number of supported 5795bd8deadSopenharmony_ci fragment lights, or if FragmentLight{T}EXT parameter <pname> is not 5805bd8deadSopenharmony_ci SPOT_EXPONENT, SPOT_CUTOFF, CONSTANT_ATTENUATION, LINEAR_ATTENUATION, or 5815bd8deadSopenharmony_ci QUADRATIC_ATTENUATION, or if FragmentLight{T}vEXT or 5825bd8deadSopenharmony_ci GetFragmentLight{T}vEXT parameter <pname> is not AMBIENT, DIFFUSE, 5835bd8deadSopenharmony_ci SPECULAR, POSITION, SPOT_DIRECTION, SPOT_EXPONENT, SPOT_CUTOFF, 5845bd8deadSopenharmony_ci CONSTANT_ATTENUATION, LINEAR_ATTENUATION, or QUADRATIC_ATTENUATION. 5855bd8deadSopenharmony_ci 5865bd8deadSopenharmony_ci INVALID_VALUE is generated if FragmentLight{T}EXT or FragmentLight{T}vEXT 5875bd8deadSopenharmony_ci parameter <param> if a spot exponent value is specified outside the range 5885bd8deadSopenharmony_ci [0,128], or if spot cutoff is specified outside the range [0,90] (except 5895bd8deadSopenharmony_ci for the special value 180), or if a negative attenuation factor is 5905bd8deadSopenharmony_ci specified. 5915bd8deadSopenharmony_ci 5925bd8deadSopenharmony_ci INVALID_OPERATION is generated if FragmentMaterial{T}EXT, 5935bd8deadSopenharmony_ci FragmentMaterial{T}vEXT, FragmentColorMaterialEXT, 5945bd8deadSopenharmony_ci GetFragmentMaterial{T}vEXT, LightEnviEXT, FragmentLight{T}EXT, 5955bd8deadSopenharmony_ci FragmentLight{T}vEXT, FragmentLightModel{T}EXT, 5965bd8deadSopenharmony_ci FragmentLightModel{T}vEXT or GetFragmentLight{T}vEXT is executed between 5975bd8deadSopenharmony_ci execution of Begin and the corresponding execution of End. 5985bd8deadSopenharmony_ci 5995bd8deadSopenharmony_ciNew State 6005bd8deadSopenharmony_ci 6015bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attribute 6025bd8deadSopenharmony_ci --------- ----------- ---- ------------- --------- 6035bd8deadSopenharmony_ci 6045bd8deadSopenharmony_ci FRAGMENT_LIGHTING_EXT IsEnabled B False lighting/enable 6055bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL_EXT IsEnabled B False lighting/enable 6065bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT GetIntegerv Z5 AMBIENT_AND_DIFFUSE lighting 6075bd8deadSopenharmony_ci FRAGMENT_COLOR_MATERIAL_FACE_EXT GetIntegerv Z3 FRONT_AND_BACK lighting 6085bd8deadSopenharmony_ci AMBIENT GetFragmentMaterialfvEXT 2xC (0.2,0.2,0.2,1.0) lighting 6095bd8deadSopenharmony_ci DIFFUSE GetFragmentMaterialfvEXT 2xC (0.8,0.8,0.8,1.0) lighting 6105bd8deadSopenharmony_ci SPECULAR GetFragmentMaterialfvEXT 2xC (0.0,0.0,0.0,1.0) lighting 6115bd8deadSopenharmony_ci EMISSION GetFragmentMaterialfvEXT 2xC (0.0,0.0,0.0,1.0) lighting 6125bd8deadSopenharmony_ci SHININESS GetFragmentMaterialfvEXT 2xR 0.0 lighting 6135bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_AMBIENT_EXT GetFloatv C (0.2,0.2,0.2,0.2) lighting 6145bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT GetBooleanv B False lighting 6155bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT GetBooleanv B False lighting 6165bd8deadSopenharmony_ci FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT GetIntegerv Z2 SMOOTH lighting 6175bd8deadSopenharmony_ci AMBIENT GetFragmentLightfvEXT 1*xC (0.0,0.0,0.0,1.0) lighting 6185bd8deadSopenharmony_ci DIFFUSE GetFragmentLightfvEXT 1*xC see 3.x lighting 6195bd8deadSopenharmony_ci SPECULAR GetFragmentLightfvEXT 1*xC see 3.x lighting 6205bd8deadSopenharmony_ci POSITION GetFragmentLightfvEXT 1*xP (0.0,0.0,1.0,0.0) lighting 6215bd8deadSopenharmony_ci CONSTANT_ATTENUATION GetFragmentLightfvEXT 1*xR 1.0 lighting 6225bd8deadSopenharmony_ci LINEAR_ATTENUATION GetFragmentLightfvEXT 1*xR+ 0.0 lighting 6235bd8deadSopenharmony_ci QUADRATIC_ATTENUATION GetFragmentLightfvEXT 1*xR+ 0.0 lighting 6245bd8deadSopenharmony_ci SPOT_DIRECTION GetFragmentLightfvEXT 1*xD (0.0,0.0,-1.0) lighting 6255bd8deadSopenharmony_ci SPOT_EXPONENT GetFragmentLightfvEXT 1*xR+ 0.0 lighting 6265bd8deadSopenharmony_ci SPOT_CUTOFF GetFragmentLightfvEXT 1*xR+ 180.0 lighting 6275bd8deadSopenharmony_ci FRAGMENT_LIGHTi_EXT IsEnabled 1*xB False lighting/enable 6285bd8deadSopenharmony_ci LIGHT_ENV_MODE_EXT GetIntegerv Z3 REPLACE lighting 6295bd8deadSopenharmony_ci 6305bd8deadSopenharmony_ci CURRENT_RASTER_NORMAL_EXT GetFloatv N (0,0,1) current 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ciNew Implementation Dependent State 6335bd8deadSopenharmony_ci 6345bd8deadSopenharmony_ci Get Value Get Command Type Minimum Value 6355bd8deadSopenharmony_ci --------- ----------- ---- ------------- 6365bd8deadSopenharmony_ci MAX_FRAGMENT_LIGHTS_EXT GetIntegerv Z+ 1 6375bd8deadSopenharmony_ci MAX_ACTIVE_LIGHTS_EXT GetIntegerv z+ MAX_LIGHTS 638