Advertisement
GeeckoDev

pspgu blur

Aug 9th, 2011
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.40 KB | None | 0 0
  1. #define PART_WIDTH 192
  2. #define PART_HEIGHT 108
  3. void blurScreen()
  4.     {
  5.     if (!initialized) return;
  6.  
  7.     sceGuTexFilter(GU_LINEAR,GU_LINEAR);
  8.     tVertex* vertices = sceGuGetMemory(3 * 2 * sizeof(tVertex));
  9.     sceGuTexMode(GU_PSM_8888,0,0,0);
  10.     sceGuTexImage(0,getNextPower2(SCREEN_WIDTH),getNextPower2(SCREEN_WIDTH),getNextPower2(SCREEN_WIDTH),(void*)getVramDrawBuffer());
  11.     vertices[0].u = 0;
  12.     vertices[0].v = 0;
  13.     vertices[0].x = 0;
  14.     vertices[0].y = 0;
  15.     vertices[0].z = 0;
  16.     vertices[1].u = SCREEN_WIDTH;
  17.     vertices[1].v = SCREEN_HEIGHT;
  18.     vertices[1].x = PART_WIDTH;
  19.     vertices[1].y = PART_HEIGHT;
  20.     vertices[1].z = 0;
  21.     vertices[2].u = 0;
  22.     vertices[2].v = 0;
  23.     vertices[2].x = SCREEN_WIDTH-PART_WIDTH;
  24.     vertices[2].y = SCREEN_HEIGHT-PART_HEIGHT;
  25.     vertices[2].z = 0;
  26.     vertices[3].u = PART_WIDTH;
  27.     vertices[3].v = PART_HEIGHT;
  28.     vertices[3].x = SCREEN_WIDTH;
  29.     vertices[3].y = SCREEN_HEIGHT;
  30.     vertices[3].z = 0;
  31.     vertices[4].u = SCREEN_WIDTH-PART_WIDTH;
  32.     vertices[4].v = SCREEN_HEIGHT-PART_HEIGHT;
  33.     vertices[4].x = 0;
  34.     vertices[4].y = 0;
  35.     vertices[4].z = 0;
  36.     vertices[5].u = SCREEN_WIDTH;
  37.     vertices[5].v = SCREEN_HEIGHT;
  38.     vertices[5].x = SCREEN_WIDTH;
  39.     vertices[5].y = SCREEN_HEIGHT;
  40.     vertices[5].z = 0;
  41.     sceGuEnable(GU_BLEND);
  42.     sceGuEnable(GU_TEXTURE_2D);
  43.     sceGuDisable(GU_DEPTH_TEST);
  44.     sceGuDrawArray(GU_SPRITES, GU_TEXTURE_16BIT | GU_VERTEX_16BIT | GU_TRANSFORM_2D, 3*2, 0, vertices);
  45.     sceGuEnable(GU_BLEND);
  46.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement