// return accbuf here Texture2D GrabImageDOF(int samples, float x, float y) { //float ps = 1.0f / (float)ResUpscale; for (int ty = 0; ty < Screen.height; ty++) { for (int tx = 0; tx < Screen.width; tx++) { blendbuf[tx, ty] = Color.black; } } for (int d = 0; d < totalSegments; d++) { ChangeDOFPos(d); //SrcCamera.transform.localToWorldMatrix = ChangeCameraDOF(d); GrabAA(x, y); // Blend image blendtable.BlendImages(blendbuf, accbuf, Screen.width, Screen.height, d); } return(grabtex); }
// return accbuf here Texture2D GrabImageDOF(int samples, float x, float y) { for (int ty = 0; ty < Screen.height; ty++) { for (int tx = 0; tx < Screen.width; tx++) { blendbuf[tx, ty] = Color.black; } } for (int d = 0; d < totalSegments; d++) { ChangeDOFPos(d); GrabAA(x, y); // Blend image blendtable.BlendImages(blendbuf, accbuf, Screen.width, Screen.height, d); } return(grabtex); }