Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define PART_WIDTH 192
- #define PART_HEIGHT 108
- void blurScreen()
- {
- if (!initialized) return;
- sceGuTexFilter(GU_LINEAR,GU_LINEAR);
- tVertex* vertices = sceGuGetMemory(3 * 2 * sizeof(tVertex));
- sceGuTexMode(GU_PSM_8888,0,0,0);
- sceGuTexImage(0,getNextPower2(SCREEN_WIDTH),getNextPower2(SCREEN_WIDTH),getNextPower2(SCREEN_WIDTH),(void*)getVramDrawBuffer());
- vertices[0].u = 0;
- vertices[0].v = 0;
- vertices[0].x = 0;
- vertices[0].y = 0;
- vertices[0].z = 0;
- vertices[1].u = SCREEN_WIDTH;
- vertices[1].v = SCREEN_HEIGHT;
- vertices[1].x = PART_WIDTH;
- vertices[1].y = PART_HEIGHT;
- vertices[1].z = 0;
- vertices[2].u = 0;
- vertices[2].v = 0;
- vertices[2].x = SCREEN_WIDTH-PART_WIDTH;
- vertices[2].y = SCREEN_HEIGHT-PART_HEIGHT;
- vertices[2].z = 0;
- vertices[3].u = PART_WIDTH;
- vertices[3].v = PART_HEIGHT;
- vertices[3].x = SCREEN_WIDTH;
- vertices[3].y = SCREEN_HEIGHT;
- vertices[3].z = 0;
- vertices[4].u = SCREEN_WIDTH-PART_WIDTH;
- vertices[4].v = SCREEN_HEIGHT-PART_HEIGHT;
- vertices[4].x = 0;
- vertices[4].y = 0;
- vertices[4].z = 0;
- vertices[5].u = SCREEN_WIDTH;
- vertices[5].v = SCREEN_HEIGHT;
- vertices[5].x = SCREEN_WIDTH;
- vertices[5].y = SCREEN_HEIGHT;
- vertices[5].z = 0;
- sceGuEnable(GU_BLEND);
- sceGuEnable(GU_TEXTURE_2D);
- sceGuDisable(GU_DEPTH_TEST);
- sceGuDrawArray(GU_SPRITES, GU_TEXTURE_16BIT | GU_VERTEX_16BIT | GU_TRANSFORM_2D, 3*2, 0, vertices);
- sceGuEnable(GU_BLEND);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement