Advertisement
acegiak

RayHandler change

Aug 25th, 2013
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. void renderWithShaders() {
  2.  
  3.         if (shadows || blur) {
  4.             lightMap.frameBuffer.begin();
  5.             Gdx.gl20.glClearColor(0f, 0f, 0f, 0f);
  6.             Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT);
  7.         }
  8.  
  9.         lightShader.setUniformi("u_mask", 8);
  10.  
  11.         Gdx.gl.glActiveTexture(GL10.GL_TEXTURE8);
  12.         mask.bind();
  13.         Gdx.gl.glActiveTexture(GL10.GL_TEXTURE0);
  14.        
  15.         lightShader.begin();
  16.         {
  17.             lightShader.setUniformMatrix("u_projTrans", combined);
  18.  
  19.             final Light[] list = lightList.items;
  20.             for (int i = 0, size = lightList.size; i < size; i++) {
  21.                 list[i].render();
  22.             }
  23.         }
  24.         lightShader.end();
  25.  
  26.         if (shadows || blur) {
  27.             lightMap.frameBuffer.end();
  28.             lightMap.render();
  29.         }
  30.  
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement