freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

pixelbender開發(fā)人員指南-資料下載頁

2025-04-01 23:07本頁面
  

【正文】 put pixel4 result。 parameter int kernel_type minValue: 0。 maxValue: 1。 defaultValue: 0。 aeDisplayName: Kernel Type。 aeUIControl: aePopup。 aePopupString: Smooth|Sharpen|Emboss。 。 parameter float blend_with_original minValue: 。 maxValue: 。 defaultValue: 。 aeDisplayName: Blend Factor。 //AEspecific metadata aeUIControl: aePercentSlider。 //AEspecific metadata 。 const float3x3 smooth_mask = float3x3( , , , , , , , , )。 const float3x3 sharpen_mask = float3x3(, , , , , , , , )。 const float3x3 emboss_mask = float3x3( , , , , , , , , )。 dependent float3x3 filter_mask。 dependent float mask_divisor。 float findDivisor(float3x3 mask) { float divisor = 。 for(int i = 0。 i 3。 ++i) { for(int j = 0。 j 3。 ++j) { divisor += mask[i][j]。 } } return divisor。 } void evaluateDependents() { if (kernel_type == 0) { filter_mask = smooth_mask。 } else if (kernel_type == 1) { filter_mask = sharpen_mask。 } else if (kernel_type == 2) { filter_mask = emboss_mask。 } mask_divisor = findDivisor(filter_mask)。 } float4 convolve(float3x3 in_kernel, float divisor) { float4 conv_result = float4(, , , )。 float2 out_coord = outCoord()。 for(int i = 1。 i = 1。 ++i) { for(int j = 1。 j = 1。 ++j) { conv_result += sampleNearest(source, out_coord + float2(i, j)) * in_kernel[i + 1][j + 1]。 } } conv_result /= divisor。 return conv_result。 } void evaluatePixel() { float4 conv_result = convolve(filter_mask, mask_divisor)。 result = mix(conv_result, sampleNearest(source, outCoord()), blend_with_original)。 } region needed( region output_region, imageRef input_index ) { region result = output_region。 result = outset( result, float2( , ) )。 return result。 } region changed( region input_region, imageRef input_index ) { region result = input_region。 result = outset( result, float2( , ) )。 return result。 }}在flash中開發(fā)Pixel Bender本章討論了如何與Pixel BenderFlash,F(xiàn)lex和ActionScript的工作。在Pixel Bender工具包使用Flash預(yù)覽功能Pixel Bender工具包2和以后可以直接顯示一個(gè)Pixel Bender過濾器在Flash Player運(yùn)行結(jié)果。使用Flash預(yù)覽選項(xiàng):1. 選擇文件 Load Image 12. 單擊Open a filter打開你希望預(yù)覽的效果3. 選擇flash在下拉菜單中選擇Build and Run 按鈕4. 單擊Build and Run按鈕如果加載的過濾器不能和Flash兼容,Pixel Bender工具在輸出結(jié)果界面中顯示錯(cuò)誤信息。SWF文件中嵌入一個(gè)Pixel Bender效果這個(gè)修改的實(shí)例允許過濾器被嵌入的SWF文件,所以不需要在運(yùn)行時(shí)動(dòng)態(tài)加載。package{ import .*。 import .*。 import .*。 import .*。 import 。 // SWF Metadata [SWF(width=600, height=400, backgroundColor=000000, framerate=30)] public class PB extends Sprite { //the file that contains the binary bytes of the PixelBender filter [Embed(, mimeType=application/octetstream)] private var TestFilter:Class。 //The image to display the filter on [Embed(source=)] private var image:Class。 private var im:Bitmap。 public function PB():void { im = new image() as Bitmap。 addChild(im)。 //Pass the loaded filter to the Shader as a ByteArray var shader:Shader = new Shader(new TestFilter() as ByteArray)。 = [100]。 var filter:ShaderFilter = new ShaderFilter(shader)。 //add the filter to the image = [filter]。 } }}制作Pixel Bender濾鏡的ActionScript庫您可以創(chuàng)建一個(gè)SWC(可再發(fā)行庫的ActionScript類),包含一個(gè)Pixel Bender效果封裝在一個(gè)ActionScript類。你可以使用這個(gè)技術(shù)來創(chuàng)建自定義的SWC庫Pixel Bender濾鏡,可以用Flash播放器項(xiàng)目與Flex Builder開發(fā),mxmlc,和flash。用ActionScript類封裝一個(gè)效果這個(gè)簡(jiǎn)單的例子顯示如何自定義Pixel Bender效果用actionScript類來封裝然后,你可以和AS內(nèi)置的效果一樣來使用package{ import 。CHAPTER 8: Developing for Flash Making Pixel Bender filters into ActionScript libraries 84 import 。 // SWF Metadata [SWF(width=600, height=400, backgroundColor=000000, framerate=30)] public class PBFilter extends Sprite { //The image to display the filter on [Embed(source=)] private var image:Class。 private var im:Bitmap。 public function PBFilter():void { im = new image() as Bitmap。 addChild(im)。 var filter:TestFilter = new TestFilter()。 = 30。 //add the filter to the image = [filter]。 } }}效果類: package{ import 。 import 。 import 。 public class TestFilter extends ShaderFilter { //the file that contains the binary bytes of the PixelBender filter [Embed(, mimeType=application/octetstream)] private var Filter:Class。 private var _shader:Shader。 public function TestFilter(value:Number = 50) { //initialize the ShaderFilter with the PixelBender filter we //embedded _shader = new Shader(new Filter() as ByteArray)。 //set the default value = value。 super(_shader)。 } //This filter only has one value, named value public function get value():Number { return [0]。 } public function set value(value:Number):void { //not that pixel bender filters take an array of values, even //though we only have one in our example = [value]。 } }}創(chuàng)建的SWC庫您可以在Flex Bui lder創(chuàng)建Flex BuilderSWC,或使用pc命令行工具包括在FlexSDK。 Bui lder中添加flex sdk;Window Preferences Flex Installed Flex SDKs Add. 庫項(xiàng)目File New Flex Library Project3. 指定項(xiàng)目名稱和項(xiàng)目將存儲(chǔ)。SDK版本下,選擇“使用特定的SDK”,選擇你剛剛添加的Flex SDK(將FLEX)。使用Pixel Bender核融合當(dāng)你用你共用Flash Player,callingthesample函數(shù)獲取正確的結(jié)果outcoord()函數(shù)總是返回每個(gè)點(diǎn)34 / 3
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1