📄 fgldrawpixels.ps
字号:
10 s 0 xH 0 xS 1 f10 f0 96(h)N24(hhh)X4176(h)X4200(hhh)X9 s1 f266 480(F)N268(FG)X310(GL)X364(LD)X410(DR)X464(RA)X514(AW)X568(WP)X638(PI)X680(IX)X706(XE)X760(EL)X806(LS)X852(S)X898(\()X900(\()X936(\))X938(\))X1885(U)X1887(UN)X1941(NI)X1995(IX)X2021(X)X2093(S)X2095(Sy)X2137(ys)X2175(st)X2205(te)X2227(em)X2261(m)X2337(V)X2339(V)X3314(F)X3316(FG)X3358(GL)X3412(LD)X3458(DR)X3512(RA)X3562(AW)X3616(WP)X3686(PI)X3728(IX)X3754(XE)X3808(EL)X3854(LS)X3900(S)X3946(\()X3948(\()X3984(\))X3986(\))X10 s842 864(internal)N1111(\257oating-point)X1571(format)X1810(such)X1982(that)X2127(the)X2250(most)X2430(positive)X2708(representable)X3162(integer)X3410(value)X3609(maps)X3803(to)X3890(1.0,)X842 960(and)N985(the)X1110(most)X1292(negative)X1591(representable)X2047(value)X2248(maps)X2444(to)X9 f2533(-)X1 f2577(1.0.)X2744(Unsigned)X3078(integer)X3327(data)X3487(is)X3566(mapped)X3846(simi-)X842 1056(larly:)N1054(the)X1175(largest)X1412(integer)X1658(value)X1855(maps)X2047(to)X2132(1.0,)X2275(and)X2414(0)X2477(maps)X2670(to)X2756(0.0.)X2920(The)X3069(resulting)X3373(\257oating-point)X3832(depth)X842 1152(value)N1052(is)X1141(then)X1315(multiplied)X1678(by)X1793(by)X3 f1908(GL_DEPTH_SCALE)X1 f2679(and)X2830(added)X3057(to)X3 f3154(GL_DEPTH_BIAS)X1 f3810(.)X3885(The)X842 1248(result)N1040(is)X1113(clamped)X1405(to)X1487(the)X1605(range)X1804([0,1].)X842 1382(The)N989(GL)X1119(then)X1280(converts)X1575(the)X1696(resulting)X1999(depth)X2200(components)X2610(to)X2695(fragments)X3039(by)X3142(attaching)X3459(the)X3580(current)X3831(raster)X842 1478(position)N1129(color)X1324(or)X1421(color)X1616(index)X1824(and)X1970(texture)X2222(coordinates)X2621(to)X2712(each)X2889(pixel,)X3098(then)X3265(assigning)X3596($x$)X3745(and)X3890($y$)X842 1574(window)N1120(coordinates)X1510(to)X1592(the)X1710($n$th)X1912(fragment)X2222(such)X2389(that)X1618 1708($x)N1718(sub)X1849(n)X1909(\304=\304)X2028(x)X2088(sub)X2219(r)X2266(\304+\304)X2385(n)X2445(\304)X2492(roman)X2717(mod)X2879(\304)X2926("width"$)X1760 1900($y)N1860(sub)X1991(n)X2051(\304=\304)X2170(y)X2230(sub)X2361(r)X2408(\304+\304)X10 f2527(Q)X1 f2567(\304)X2614(n)X2674(/)X2716("width")X2984(\304)X10 f3031(P)X1 f($)S842 2130(where)N1065(\($x)X1198(sub)X1335(r)X1388(,)X1434(y)X1500(sub)X1637(r$\))X1757(is)X1836(the)X1961(current)X2216(raster)X2422(position.)X2746(These)X2965(pixel)X3152(fragments)X3500(are)X3626(then)X3791(treated)X842 2226(just)N982(like)X1127(the)X1250(fragments)X1596(generated)X1934(by)X2039(rasterizing)X2403(points,)X2642(lines,)X2837(or)X2928(polygons.)X3285(Texture)X3559(mapping,)X3883(fog,)X842 2322(and)N978(all)X1078(the)X1196(fragment)X1506(operations)X1860(are)X1979(applied)X2235(before)X2461(the)X2579(fragments)X2920(are)X3039(written)X3286(to)X3368(the)X3486(frame)X3694(buffer.)X3 f554 2456(GL_RGBA)N1 f842 2552(Each)N1032(pixel)X1221(is)X1303(a)X1368(four-component)X1914(group:)X2152(for)X3 f2275(GL_RGBA)X1 f2661(,)X2711(the)X2839(red)X2972(component)X3358(is)X3441(\256rst,)X3615(followed)X3930(by)X842 2648(green,)N1073(followed)X1390(by)X1502(blue,)X1691(followed)X2007(by)X2118(alpha.)X2363(Floating-point)X2851(values)X3087(are)X3217(converted)X3565(directly)X3841(to)X3934(an)X842 2744(internal)N1130(\257oating-point)X1608(format)X1865(with)X2050(unspeci\256ed)X2458(precision.)X2835(Signed)X3100(integer)X3366(values)X3614(are)X3756(mapped)X842 2840(linearly)N1108(to)X1191(the)X1310(internal)X1576(\257oating-point)X2032(format)X2267(such)X2435(that)X2576(the)X2695(most)X2871(positive)X3144(representable)X3593(integer)X3836(value)X842 2936(maps)N1031(to)X1113(1.0,)X1253(and)X1390(the)X1509(most)X1685(negative)X1978(representable)X2428(value)X2623(maps)X2813(to)X9 f2896(-)X1 f2940(1.0.)X3081(\(Note)X3285(that)X3426(this)X3562(mapping)X3863(does)X842 3032(not)N975(convert)X1247(0)X1318(precisely)X1639(to)X1732(0.0.\))X1930(Unsigned)X2268(integer)X2522(data)X2687(is)X2771(mapped)X3056(similarly:)X3413(the)X3542(largest)X3787(integer)X842 3128(value)N1037(maps)X1227(to)X1310(1.0,)X1451(and)X1588(0)X1649(maps)X1839(to)X1922(0.0.)X2083(The)X2229(resulting)X2530(\257oating-point)X2987(color)X3174(values)X3401(are)X3522(then)X3682(multiplied)X842 3224(by)N3 f946(GL_c_SCALE)X1 f1467(and)X1607(added)X1822(to)X3 f1907(GL_c_BIAS)X1 f2324(,)X2367(where)X2 f2587(c)X1 f2646(is)X2722(RED,)X2925(GREEN,)X3235(BLUE,)X3487(and)X3626(ALPHA)X3916(for)X842 3320(the)N960(respective)X1306(color)X1491(components.)X1938(The)X2083(results)X2312(are)X2431(clamped)X2723(to)X2805(the)X2923(range)X3122([0,1].)X842 3454(If)N3 f937(GL_MAP_COLOR)X1 f1649(is)X1743(true,)X1929(each)X2118(color)X2324(component)X2721(is)X2815(scaled)X3057(by)X3178(the)X3317(size)X3483(of)X3591(lookup)X3854(table)X3 f842 3550(GL_PIXEL_MAP_c_TO_c)N1 f1771(,)X1814(then)X1975(replaced)X2271(by)X2374(the)X2495(value)X2692(that)X2835(it)X2902 0.3889(references)AX3257(in)X3342(that)X3485(table.)X2 f3704(c)X1 f3762(is)X3837(R,)X3932(G,)X842 3646(B,)N935(or)X1022(A)X1100(respectively.)X842 3780(The)N987(GL)X1114(then)X1272(converts)X1564(the)X1682(resulting)X1982(RGBA)X2224(colors)X2441(to)X2524(fragments)X2866(by)X2967(attaching)X3282(the)X3401(current)X3650(raster)X3850(posi-)X842 3876(tion)N2 f990(z)X1 f1045(coordinate)X1408(and)X1548(texture)X1795(coordinates)X2189(to)X2274(each)X2445(pixel,)X2648(then)X2809(assigning)X3134($x$)X3277(and)X3416($y$)X3559(window)X3840(coor-)X842 3972(dinates)N1089(to)X1171(the)X1289($n$th)X1491(fragment)X1801(such)X1968(that)X1618 4106($x)N1718(sub)X1849(n)X1909(\304=\304)X2028(x)X2088(sub)X2219(r)X2266(\304+\304)X2385(n)X2445(\304)X2492(roman)X2717(mod)X2879(\304)X2926("width"$)X1760 4298($y)N1860(sub)X1991(n)X2051(\304=\304)X2170(y)X2230(sub)X2361(r)X2408(\304+\304)X10 f2527(Q)X1 f2567(\304)X2614(n)X2674(/)X2716("width")X2984(\304)X10 f3031(P)X1 f($)S842 4528(where)N1065(\($x)X1198(sub)X1335(r)X1388(,)X1434(y)X1500(sub)X1637(r$\))X1757(is)X1836(the)X1961(current)X2216(raster)X2422(position.)X2746(These)X2965(pixel)X3152(fragments)X3500(are)X3626(then)X3791(treated)X842 4624(just)N982(like)X1127(the)X1250(fragments)X1596(generated)X1934(by)X2039(rasterizing)X2403(points,)X2642(lines,)X2837(or)X2928(polygons.)X3285(Texture)X3559(mapping,)X3883(fog,)X842 4720(and)N978(all)X1078(the)X1196(fragment)X1506(operations)X1860(are)X1979(applied)X2235(before)X2461(the)X2579(fragments)X2920(are)X3039(written)X3286(to)X3368(the)X3486(frame)X3694(buffer.)X3 f554 4854(GL_RED)N1 f842 4950(Each)N1028(pixel)X1213(is)X1291(a)X1352(single)X1569(red)X1698(component.)X2120(This)X2288(component)X2670(is)X2749(converted)X3092(to)X3180(the)X3304(internal)X3575(\257oating-point)X842 5046(format)N1079(in)X1164(the)X1285(same)X1473(way)X1630(the)X1750(red)X1875(component)X2253(of)X2342(an)X2440(RGBA)X2684(pixel)X2866(is.)X2961(It)X3032(is)X3107(then)X3267(converted)X3606(to)X3690(an)X3788(RGBA)X842 5142(pixel)N1024(with)X1188(green)X1389(and)X1527(blue)X1687(set)X1798(to)X1882(0,)X1964(and)X2102(alpha)X2298(set)X2409(to)X2493(1.)X2595(After)X2788(this)X2926(conversion,)X3321(the)X3442(pixel)X3625(is)X3701(treated)X3943(as)X842 5238(if)N911(it)X975(had)X1111(been)X1283(read)X1442(as)X1529(an)X1625(RGBA)X1867(pixel.)X3 f554 5372(GL_GREEN)N1 f842 5468(Each)N1023(pixel)X1203(is)X1276(a)X1332(single)X1543(green)X1742(component.)X2158(This)X2320(component)X2696(is)X2769(converted)X3107(to)X3190(the)X3309(internal)X3575(\257oating-point)X842 5564(format)N1087(in)X1180(the)X1309(same)X1505(way)X1670(the)X1799(green)X2009(component)X2396(of)X2494(an)X2600(RGBA)X2852(pixel)X3042(is.)X3165(It)X3244(is)X3327(then)X3495(converted)X3842(to)X3934(an)X842 5660(RGBA)N1094(pixel)X1284(with)X1457(red)X1591(and)X1738(blue)X1907(set)X2027(to)X2120(0,)X2211(and)X2358(alpha)X2563(set)X2683(to)X2776(1.)X2887(After)X3088(this)X3234(conversion,)X3637(the)X3766(pixel)X3957(is)X842 5756(treated)N1081(as)X1168(if)X1237(it)X1301(had)X1437(been)X1609(read)X1768(as)X1855(an)X1951(RGBA)X2193(pixel.)X266 6144(Page)N442(3)X3577(July)X3730(22,)X3850(1997)X4 p%%Page: 4 410 s 0 xH 0 xS 1 f10 f0 96(h)N24(hhh)X4176(h)X4200(hhh)X9 s1 f266 480(F)N268(FG)X310(GL)X364(LD)X410(DR)X464(RA)X514(AW)X568(WP)X638(PI)X680(IX)X706(XE)X760(EL)X806(LS)X852(S)X898(\()X900(\()X936(\))X938(\))X1885(U)X1887(UN)X1941(NI)X1995(IX)X2021(X)X2093(S)X2095(Sy)X2137(ys)X2175(st)X2205(te)X2227(em)X2261(m)X2337(V)X2339(V)X3314(F)X3316(FG)X3358(GL)X3412(LD)X3458(DR)X3512(RA)X3562(AW)X3616(WP)X3686(PI)X3728(IX)X3754(XE)X3808(EL)X3854(LS)X3900(S)X3946(\()X3948(\()X3984(\))X3986(\))X3 f10 s554 864(GL_BLUE)N1 f842 960(Each)N1026(pixel)X1209(is)X1285(a)X1344(single)X1558(blue)X1719(component.)X2138(This)X2303(component)X2682(is)X2758(converted)X3098(to)X3184(the)X3306(internal)X3575(\257oating-point)X842 1056(format)N1089(in)X1184(the)X1315(same)X1513(way)X1680(the)X1811(blue)X1982(component)X2371(of)X2471(an)X2580(RGBA)X2835(pixel)X3028(is.)X3154(It)X3236(is)X3321(then)X3491(converted)X3840(to)X3934(an)X842 1152(RGBA)N1092(pixel)X1280(with)X1450(red)X1581(and)X1725(green)X1933(set)X2051(to)X2142(0,)X2231(and)X2376(alpha)X2579(set)X2697(to)X2788(1.)X2897(After)X3096(this)X3240(conversion,)X3641(the)X3768(pixel)X3957(is)X842 1248(treated)N1081(as)X1168(if)X1237(it)X1301(had)X1437(been)X1609(read)X1768(as)X1855(an)X1951(RGBA)X2193(pixel.)X3 f554 1382(GL_ALPHA)N1 f842 1478(Each)N1023(pixel)X1203(is)X1276(a)X1332(single)X1543(alpha)X1738(component.)X2155(This)X2318(component)X2695(is)X2769(converted)X3107(to)X3190(the)X3309(internal)X3575(\257oating-point)X842 1574(format)N1087(in)X1180(the)X1309(same)X
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -