Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • Cole1497: join horney scape we are horney all the time and have a sex emote
      November 09, 2019, 05:14:33 PM
    • thewraith500: try autoscape,0rg brand new osrs CUSTOMS server! fight caves for flaming fire cape, upgrade them to infernal wings + more!
      November 09, 2019, 01:37:29 AM
    • SuperNativeZ: Come play brand new server [link]
      November 08, 2019, 02:13:24 PM
    • SuperNativeZ: Come play brand new server [link]
      November 08, 2019, 02:13:17 PM
    • SuperNativeZ: Come play brand new server [link]
      November 08, 2019, 02:13:14 PM
    • ragnoroker: Brand new server, come join the fun - unique server - RuneGuild - [link]
      November 07, 2019, 11:55:44 AM
    • ragnoroker: Brand new server, come join the fun - unique server - RuneGuild - [link]
      November 07, 2019, 11:55:40 AM
    • ragnoroker: Brand new server, come join the fun - unique server - RuneGuild - [link]
      November 07, 2019, 11:55:35 AM
    • ArtexAdv: Come play brand new server [link]
      November 07, 2019, 07:36:34 AM
    • grefin::cool:
      November 04, 2019, 12:55:57 AM
    • grefin: Hi friends! I cant get through that bank pin thing. What should i do my friends?
      November 04, 2019, 12:55:36 AM
    • cows1471: its weird
      November 03, 2019, 02:56:40 PM
    • cows1471: fudge me
      November 03, 2019, 02:56:34 PM
    • cows1471: my original account is 11 years ago
      November 03, 2019, 02:56:26 PM
    • cows1471: and yet
      November 03, 2019, 02:56:14 PM
    • Christmas_tree: this place has changed
      November 03, 2019, 02:54:34 PM
    • Christmas_tree: fudge me
      November 03, 2019, 02:54:25 PM
    • Christmas_tree: six years ago i registered this account
      November 03, 2019, 02:54:22 PM
    • thewraith500: everyone join autoscape,0rg its the best customs osrs server yet! the owner gives ultra boxes!
      October 28, 2019, 08:03:09 PM
    • gameruler93: I am so fudgeing glad to see this website is still alive.
      October 28, 2019, 07:57:18 PM

    Author Topic: [RT4] GlBloom Refactor  (Read 2351 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    [RT4] GlBloom Refactor
    « on: March 22, 2016, 01:32:51 PM »
    Bloom takes bright objects in a scene over a certain threshold, and makes their light 'bleed'.

    This implementation is from a 634 deob and uses GLSL shaders (duh I dont think itd be easy to otherwise).

    Steps:

    - If provided texture is greater than 256x256, downsample.
    - Write to texture 0 the most bright objects in the scene over a certain threshold.
    - Write to texture 1 the horizontal blur of texture 0.
    - Write to texture 0 the vertical blur of texture 1.
    - Bind texture 0 and scene texture. Use combine program and delegate draw to post processing manager.

    https://learnopengl.com/#!Advanced-Lighting/Bloom
    https://gist.github.com/Hadyn/025c4dce5783321e4469

    Code: Java
    1. /* Class348_Sub5_Sub1 - Decompiled by JODE
    2.  * Visit http://jode.sourceforge.net/
    3.  */
    4. importjaggl.OpenGL;
    5.  
    6. importjava.io.*;
    7.  
    8. finalclass GlBloom extends GlPostProcess {
    9.   staticint anInt8823;
    10.   staticint anInt8827;
    11.   staticint anInt8828;
    12.   staticint anInt8829;
    13.   staticint anInt8831;
    14.   static Class21 aClass21_8832 =new Class21();
    15.   staticint anInt8834;
    16.   staticint anInt8839;
    17.   staticint anInt8840;
    18.   staticint anInt8843;
    19.   private Program gaussianBlurShader;
    20.   private Program textProgramSq;
    21.   private FrameBuffer frameBuffer;
    22.   privateint bitWidth;
    23.   private GlTexture2d colorBuffer1;
    24.   privateint length;
    25.   private GlTexture2d colorBuffer0;
    26.   private Program combineProgram;
    27.   private GlTexture2d[] downSamples;
    28.   privateint bitLength;
    29.   privateint width;
    30.   private Program testProgramRt;
    31.   private FrameBuffer downsampleFrameBuffer;
    32.  
    33.   GlBloom(OpenGlRenderer renderer){
    34.     super(renderer);
    35.   }
    36.  
    37.   publicstaticvoid method2765(int i){
    38.     aClass21_8832 =null;
    39.     if(i !=2048){
    40.       method2765(52);
    41.     }
    42.   }
    43.  
    44.   staticfinalString method2766(boolean bool, Throwable throwable)throwsIOException{
    45.     anInt8823++;
    46.     String string;
    47.     if(throwable instanceof RuntimeException_Sub1){
    48.       RuntimeException_Sub1 runtimeexception_sub1 =(RuntimeException_Sub1) throwable;
    49.       string =(runtimeexception_sub1.aString4594+" | ");
    50.       throwable =(runtimeexception_sub1.aThrowable4595);
    51.     }else{
    52.       string ="";
    53.     }
    54.     StringWriter stringwriter =newStringWriter();
    55.     PrintWriter printwriter =newPrintWriter(stringwriter);
    56.     throwable.printStackTrace(printwriter);
    57.     printwriter.close();
    58.     String string_8_ = stringwriter.toString();
    59.     BufferedReader bufferedreader =newBufferedReader(newStringReader(string_8_));
    60.     if(bool !=false){
    61.       method2765(-61);
    62.     }
    63.     String string_9_ = bufferedreader.readLine();
    64.     for(;;){
    65.       String string_10_ = bufferedreader.readLine();
    66.       if(string_10_ ==null){
    67.         break;
    68.       }
    69.       int i = string_10_.indexOf('(');
    70.       int i_11_ = string_10_.indexOf(')', 1+ i);
    71.       String string_12_;
    72.       if(i ==-1){
    73.         string_12_ = string_10_;
    74.       }else{
    75.         string_12_ = string_10_.substring(0, i);
    76.       }
    77.       string_12_ = string_12_.trim();
    78.       string_12_ = string_12_.substring(1+ string_12_.lastIndexOf(' '));
    79.       string_12_ = string_12_.substring(1+ string_12_.lastIndexOf('\t'));
    80.       string += string_12_;
    81.       if((i ^ 0xffffffff)!=0&& i_11_ !=-1){
    82.         int i_13_ = string_10_.indexOf(".java:", i);
    83.         if(i_13_ >=0){
    84.           string += string_10_.substring(i_13_ --5, i_11_);
    85.         }
    86.       }
    87.       string +=' ';
    88.     }
    89.     string +="| "+ string_9_;
    90.     return string;
    91.   }
    92.  
    93.   finalvoid reset(int i_0_){
    94.     anInt8831++;
    95.     OpenGL.glUseProgramObjectARB(0L);
    96.     this.renderer.setActiveTexture(1);
    97.     this.renderer.bindTexture(null);
    98.     this.renderer.setActiveTexture(0);
    99.   }
    100.  
    101.   finalvoid handle(GlTexture2d sceneTexture, GlTexture2d depthTexture, int pass){
    102.     try{
    103.       anInt8828++;
    104.       // GL_VIEWPORT_BIT
    105.       OpenGL.glPushAttrib(2048);
    106.  
    107.       // Setup the projection matrix.
    108.       OpenGL.glMatrixMode(5889);
    109.       OpenGL.glPushMatrix();
    110.       OpenGL.glLoadIdentity();
    111.       OpenGL.glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
    112.  
    113.       // Step One: Extract the bright colors over a specified threshold.
    114.       // Downsample the texture to 256x256 if we need to.
    115.       if(downSamples !=null){
    116.         renderer.pushFrameBuffer(downsampleFrameBuffer);
    117.         int hbw = Class348_Sub40_Sub1.getHighestBit(width);
    118.         int hbl = Class348_Sub40_Sub1.getHighestBit(length);
    119.         int step =0;
    120.         while(hbw >256|| hbl >256){
    121.           OpenGL.glViewport(0, 0, hbw, hbl);
    122.           downsampleFrameBuffer.attach(downSamples[step], 0, 0);
    123.           if(step ==0){
    124.             this.renderer.bindTexture(sceneTexture);
    125.             OpenGL.glBegin(7);
    126.               OpenGL.glTexCoord2f(0.0F, 0.0F);
    127.               OpenGL.glVertex2i(0, 0);
    128.               OpenGL.glTexCoord2f((float) width, 0.0F);
    129.               OpenGL.glVertex2i(1, 0);
    130.               OpenGL.glTexCoord2f((float) width, (float) length);
    131.               OpenGL.glVertex2i(1, 1);
    132.               OpenGL.glTexCoord2f(0.0F, (float) length);
    133.               OpenGL.glVertex2i(0, 1);
    134.             OpenGL.glEnd();
    135.           }else{
    136.             this.renderer.bindTexture(downSamples[step -1]);
    137.             OpenGL.glBegin(7);
    138.               OpenGL.glTexCoord2f(0.0F, 0.0F);
    139.               OpenGL.glVertex2i(0, 0);
    140.               OpenGL.glTexCoord2f(1.0F, 0.0F);
    141.               OpenGL.glVertex2i(1, 0);
    142.               OpenGL.glTexCoord2f(1.0F, 1.0F);
    143.               OpenGL.glVertex2i(1, 1);
    144.               OpenGL.glTexCoord2f(0.0F, 1.0F);
    145.               OpenGL.glVertex2i(0, 1);
    146.             OpenGL.glEnd();
    147.           }
    148.           if(hbl >256){
    149.             hbl >>=1;
    150.           }
    151.           if(hbw >256){
    152.             hbw >>=1;
    153.           }
    154.           step++;
    155.         }
    156.         this.renderer.popFrameBuffer(downsampleFrameBuffer);
    157.         this.renderer.bindTexture(downSamples[step -1]);
    158.         this.renderer.pushFrameBuffer(frameBuffer);
    159.         frameBuffer.setDrawTarget(0);
    160.         OpenGL.glViewport(0, 0, 256, 256);
    161.         long programId = textProgramSq.id;
    162.  
    163.         OpenGL.glUseProgramObjectARB(programId);
    164.         OpenGL.glUniform1iARB(OpenGL.glGetUniformLocationARB(programId, "sceneTex"), 0);
    165.         OpenGL.glUniform3fARB(OpenGL.glGetUniformLocationARB(programId, "params"),
    166.           Class75_Sub1.thresholdBrightness, 0.0F, 0.0F);
    167.  
    168.         OpenGL.glBegin(7);
    169.           OpenGL.glTexCoord2f(0.0F, 0.0F);
    170.           OpenGL.glVertex2i(0, 0);
    171.           OpenGL.glTexCoord2f(1.0F, 0.0F);
    172.           OpenGL.glVertex2i(1, 0);
    173.           OpenGL.glTexCoord2f(1.0F, 1.0F);
    174.           OpenGL.glVertex2i(1, 1);
    175.           OpenGL.glTexCoord2f(0.0F, 1.0F);
    176.           OpenGL.glVertex2i(0, 1);
    177.         OpenGL.glEnd();
    178.       }else{
    179.         // Draw to texture 0, sample scene texture, test brightness threshold.
    180.         this.renderer.bindTexture(sceneTexture);
    181.         this.renderer.pushFrameBuffer(frameBuffer);
    182.         frameBuffer.setDrawTarget(0);
    183.         OpenGL.glViewport(0, 0, 256, 256);
    184.  
    185.         long programId = testProgramRt.id;
    186.         OpenGL.glUseProgramObjectARB(programId);
    187.         OpenGL.glUniform1iARB(OpenGL.glGetUniformLocationARB(programId, "sceneTex"), 0);
    188.         OpenGL.glUniform3fARB(OpenGL.glGetUniformLocationARB(programId, "params"),
    189.           Class75_Sub1.thresholdBrightness, 0.0F, 0.0F);
    190.  
    191.         OpenGL.glBegin(7);
    192.           OpenGL.glTexCoord2f(0.0F, 0.0F);
    193.           OpenGL.glVertex2i(0, 0);
    194.           OpenGL.glTexCoord2f((float) width, 0.0F);
    195.           OpenGL.glVertex2i(1, 0);
    196.           OpenGL.glTexCoord2f((float) width, (float) length);
    197.           OpenGL.glVertex2i(1, 1);
    198.           OpenGL.glTexCoord2f(0.0F, (float) length);
    199.           OpenGL.glVertex2i(0, 1);
    200.         OpenGL.glEnd();
    201.       }
    202.  
    203.       // Step 2: Blur the bright objects in the scene.
    204.  
    205.       // Draw to texture 1, sample texture 0, blur horizontal pass.
    206.       frameBuffer.setDrawTarget(1);
    207.       renderer.bindTexture(colorBuffer0);
    208.       long blurProgramId = gaussianBlurShader.id;
    209.       OpenGL.glUseProgramObjectARB(blurProgramId);
    210.       OpenGL.glUniform1iARB(OpenGL.glGetUniformLocationARB(blurProgramId, "baseTex"), 0);
    211.       OpenGL.glUniform3fARB(OpenGL.glGetUniformLocationARB(blurProgramId, "step"), 0.00390625F, 0.0F, 0.0F);
    212.       OpenGL.glBegin(7);
    213.         OpenGL.glTexCoord2f(0.0F, 0.0F);
    214.         OpenGL.glVertex2i(0, 0);
    215.         OpenGL.glTexCoord2f(1.0F, 0.0F);
    216.         OpenGL.glVertex2i(1, 0);
    217.         OpenGL.glTexCoord2f(1.0F, 1.0F);
    218.         OpenGL.glVertex2i(1, 1);
    219.         OpenGL.glTexCoord2f(0.0F, 1.0F);
    220.         OpenGL.glVertex2i(0, 1);
    221.       OpenGL.glEnd();
    222.  
    223.       // Draw to texture 0, sample texture 1, blur vertical pass.
    224.       frameBuffer.setDrawTarget(0);
    225.       renderer.bindTexture(this.colorBuffer1);
    226.       OpenGL.glUniform3fARB(OpenGL.glGetUniformLocationARB(blurProgramId, "step"), 0.0F, 0.00390625F, 0.0F);
    227.       OpenGL.glBegin(7);
    228.         OpenGL.glTexCoord2f(0.0F, 0.0F);
    229.         OpenGL.glVertex2i(0, 0);
    230.         OpenGL.glTexCoord2f(1.0F, 0.0F);
    231.         OpenGL.glVertex2i(1, 0);
    232.         OpenGL.glTexCoord2f(1.0F, 1.0F);
    233.         OpenGL.glVertex2i(1, 1);
    234.         OpenGL.glTexCoord2f(0.0F, 1.0F);
    235.         OpenGL.glVertex2i(0, 1);
    236.       OpenGL.glEnd();
    237.       OpenGL.glPopAttrib();
    238.       OpenGL.glPopMatrix();
    239.  
    240.       // Reset matrix mode.
    241.       OpenGL.glMatrixMode(5888);
    242.       renderer.popFrameBuffer(frameBuffer);
    243.  
    244.       // Step 3: Combine the blur and the scene texture.
    245.       long combineProgramId = combineProgram.id;
    246.       OpenGL.glUseProgramObjectARB(combineProgramId);
    247.       OpenGL.glUniform1iARB(OpenGL.glGetUniformLocationARB(combineProgramId, "sceneTex"), 0);
    248.       OpenGL.glUniform1iARB(OpenGL.glGetUniformLocationARB(combineProgramId, "bloomTex"), 1);
    249.       OpenGL.glUniform3fARB(OpenGL.glGetUniformLocationARB(combineProgramId, "params"),
    250.         Class348_Sub40_Sub13.bloomIntensity, Class239_Sub26.sourceIntensity, 0.0F);
    251.       this.renderer.setActiveTexture(1);
    252.       this.renderer.bindTexture(colorBuffer0);
    253.       this.renderer.setActiveTexture(0);
    254.       this.renderer.bindTexture(sceneTexture);
    255.     }catch(RuntimeException runtimeexception){
    256.       throw Class348_Sub17.method2929(runtimeexception,
    257.         ("rda.H("+(depthTexture !=null?"{...}":"null")+','+(sceneTexture !=null?
    258.           "{...}":
    259.           "null")+','+ pass +')'));
    260.     }
    261.   }
    262.  
    263.   @Override
    264.   finalvoid setDimensions(int width, int length){
    265.     this.length= length;
    266.     anInt8843++;
    267.     this.width= width;
    268.     int hbWidth = Class348_Sub40_Sub1.getHighestBit(this.width);
    269.     int hbLength = Class348_Sub40_Sub1.getHighestBit(this.length);
    270.     if((hbWidth ^ 0xffffffff)!=(bitWidth ^ 0xffffffff)|| bitLength != hbLength){
    271.       if(downSamples !=null){
    272.         for(int i_18_ =0;((downSamples.length^ 0xffffffff)<(i_18_ ^ 0xffffffff)); i_18_++){
    273.           downSamples[i_18_].method1952(-19948);
    274.         }
    275.         downSamples =null;
    276.       }
    277.       if(hbWidth >256|| hbLength >256){
    278.         int i_19_ = hbWidth;
    279.         int i_20_ = hbLength;
    280.         int step =0;
    281.         while(i_19_ >256||(i_20_ ^ 0xffffffff)<-257){
    282.           if(i_20_ >256){
    283.             i_20_ >>=1;
    284.           }
    285.           if(i_19_ >256){
    286.             i_19_ >>=1;
    287.           }
    288.           step++;
    289.         }
    290.         if(downsampleFrameBuffer ==null){
    291.           downsampleFrameBuffer =new FrameBuffer(this.renderer);
    292.         }
    293.         i_19_ = hbWidth;
    294.         downSamples =new GlTexture2d[step];
    295.         i_20_ = hbLength;
    296.         step =0;
    297.         while(i_19_ >256|| i_20_ >256){
    298.           downSamples[step++]=new GlTexture2d(this.renderer, 3553, 34842, i_19_, i_20_);
    299.           if((i_20_ ^ 0xffffffff)<-257){
    300.             i_20_ >>=1;
    301.           }
    302.           if((i_19_ ^ 0xffffffff)<-257){
    303.             i_19_ >>=1;
    304.           }
    305.         }
    306.       }else{
    307.         downsampleFrameBuffer =null;
    308.       }
    309.       bitWidth = hbWidth;
    310.       bitLength = hbLength;
    311.     }
    312.  
    313.   }
    314.  
    315.   @Override
    316.   finalvoid destroy(){
    317.     gaussianBlurShader =null;
    318.     colorBuffer0 =null;
    319.     downsampleFrameBuffer =null;
    320.     frameBuffer =null;
    321.     testProgramRt =null;
    322.     anInt8839++;
    323.     downSamples =null;
    324.     textProgramSq =null;
    325.     combineProgram =null;
    326.     colorBuffer1 =null;
    327.   }
    328.  
    329.   finalboolean isInitialized(){
    330.     anInt8829++;
    331.     return frameBuffer !=null;
    332.   }
    333.  
    334.   finalboolean isSupported(){
    335.     anInt8840++;
    336.     returnthis.renderer.frameBufferSupport
    337.       &&this.renderer.fragmentShaderSupport
    338.       &&this.renderer.textureFloatSupport;
    339.   }
    340.  
    341.   finalint getColorFormat(){
    342.     anInt8827++;
    343.  
    344.     return1;
    345.   }
    346.  
    347.   @Override publicfinalboolean initialize(){
    348.     anInt8834++;
    349.     if(renderer.frameBufferSupport
    350.       && renderer.fragmentShaderSupport
    351.       && renderer.textureFloatSupport){
    352.       frameBuffer =new FrameBuffer(this.renderer);
    353.       colorBuffer0 =new GlTexture2d(this.renderer, 3553, 34842, 256, 256);
    354.       colorBuffer0.configure(false, false);
    355.       colorBuffer1 =new GlTexture2d(this.renderer, 3553, 34842, 256, 256);
    356.       colorBuffer1.configure(false, false);
    357.       renderer.pushFrameBuffer(frameBuffer);
    358.       frameBuffer.attach(colorBuffer0, 0, 0);
    359.       frameBuffer.attach(colorBuffer1, 1, 0);
    360.       frameBuffer.setDrawTarget(0);
    361.       if(!frameBuffer.isComplete()){
    362.         renderer.popFrameBuffer(frameBuffer);
    363.         returnfalse;
    364.       }
    365.       renderer.popFrameBuffer(frameBuffer);
    366.  
    367.       testProgramRt =(Class318_Sub1_Sub5_Sub2.createProgram(this.renderer, (new Shader[]{
    368.         Class348_Sub42_Sub15.createShader(35632, this.renderer,
    369.           "#extension GL_ARB_texture_rectangle : enable\n"+"uniform vec3 params;\n"
    370.             +"uniform sampler2DRect sceneTex;\n"
    371.             +"const vec3 lumCoef = vec3(0.2126, 0.7152, 0.0722);\n"+"void main() {\n"
    372.             +"    vec4 col = texture2DRect(sceneTex, gl_TexCoord[0].xy);\n"
    373.             +"    gl_FragColor = col*step(params.x, dot(lumCoef, col.rgb));\n"+"}\n")})));
    374.  
    375.       textProgramSq =(Class318_Sub1_Sub5_Sub2.createProgram(this.renderer, (new Shader[]{
    376.         Class348_Sub42_Sub15.createShader(35632, this.renderer,
    377.           "uniform vec3 params;\n"+"uniform sampler2D sceneTex;\n"
    378.             +"const vec3 lumCoef = vec3(0.2126, 0.7152, 0.0722);\n"+"void main() {\n"
    379.             +"    vec4 col = texture2D(sceneTex, gl_TexCoord[0].xy);\n"
    380.             +"    gl_FragColor = col*step(params.x, dot(lumCoef, col.rgb));\n"+"}\n")})));
    381.  
    382.       combineProgram =(Class318_Sub1_Sub5_Sub2.createProgram(this.renderer, (new Shader[]{
    383.         Class348_Sub42_Sub15.createShader(35632, this.renderer,
    384.           "#extension GL_ARB_texture_rectangle : enable\n"+"uniform vec3 params;\n"
    385.             +"uniform vec3 dimScale;\n"+"uniform sampler2D bloomTex;\n"
    386.             +"uniform sampler2DRect sceneTex;\n"
    387.             +"const vec3 lumCoef = vec3(0.2126, 0.7152, 0.0722);\n"+"void main() {\n"
    388.             +"\t vec4 bloomCol = texture2D(bloomTex, gl_TexCoord[1].xy);\n"
    389.             +"\t vec4 sceneCol = texture2DRect(sceneTex, gl_TexCoord[0].xy);\n"
    390.             +"\t float preLum = 0.99*dot(lumCoef, sceneCol.rgb)+0.01;\n"
    391.             +"\t float postLum = preLum*(1.0+(preLum/params.y))/(preLum+1.0);\n"
    392.             +"\t gl_FragColor = sceneCol*(postLum/preLum)+bloomCol*params.x;\n"+"}\n")})));
    393.  
    394.       gaussianBlurShader =(Class318_Sub1_Sub5_Sub2.createProgram(this.renderer, (new Shader[]{
    395.         Class348_Sub42_Sub15.createShader(35632, this.renderer,
    396.           "uniform vec3 step;\n"+"uniform sampler2D baseTex;\n"+"void main() {\n"
    397.             +"\tvec4 fragCol = texture2D(baseTex, gl_TexCoord[0].xy)*0.091396265;\n"
    398.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-1.0*step.xy))*0.088584304;\n"
    399.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 1.0*step.xy))*0.088584304;\n"
    400.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-2.0*step.xy))*0.08065692;\n"
    401.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 2.0*step.xy))*0.08065692;\n"
    402.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-3.0*step.xy))*0.068989515;\n"
    403.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 3.0*step.xy))*0.068989515;\n"
    404.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-4.0*step.xy))*0.055434637;\n"
    405.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 4.0*step.xy))*0.055434637;\n"
    406.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-5.0*step.xy))*0.04184426;\n"
    407.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 5.0*step.xy))*0.04184426;\n"
    408.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-6.0*step.xy))*0.029672023;\n"
    409.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 6.0*step.xy))*0.029672023;\n"
    410.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-7.0*step.xy))*0.019765828;\n"
    411.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 7.0*step.xy))*0.019765828;\n"
    412.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+(-8.0*step.xy))*0.012369139;\n"
    413.             +"\tfragCol += texture2D(baseTex, gl_TexCoord[0].xy+( 8.0*step.xy))*0.012369139;\n"
    414.             +"\tgl_FragColor = fragCol;\n"+"}\n")})));
    415.  
    416.       return!(textProgramSq ==null|| testProgramRt ==null|| combineProgram ==null
    417.         || gaussianBlurShader ==null);
    418.     }
    419.     returnfalse;
    420.   }
    421. }
    422.  
    « Last Edit: March 22, 2016, 01:36:38 PM by sini »
    Runescape Gambling

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal