Revision 61441ce2
Added by Leszek Koltunski about 6 years ago
src/main/java/org/distorted/library/main/DistortedOutputSurface.java | ||
---|---|---|
79 | 79 |
|
80 | 80 |
private ArrayList<Job> mJobs = new ArrayList<>(); |
81 | 81 |
|
82 |
DistortedOutputSurface[] mBuffer; |
|
82 |
// buffers used for postprocessing. |
|
83 |
private DistortedOutputSurface[] mBuffer; |
|
83 | 84 |
|
84 | 85 |
private long mTime; |
85 | 86 |
private float mFOV; |
... | ... | |
99 | 100 |
|
100 | 101 |
private int mDebugLevel; |
101 | 102 |
|
102 |
protected int mRealWidth; // the Surface can be backed up with a texture that is
|
|
103 |
protected int mRealHeight; // larger than the viewport we have to it.
|
|
104 |
// mWidth,mHeight are the sizes of the Viewport, those -
|
|
105 |
// sizes of the backing up texture.
|
|
103 |
int mRealWidth; // the Surface can be backed up with a texture that is |
|
104 |
int mRealHeight; // larger than the viewport we have to it. |
|
105 |
// mWidth,mHeight are the sizes of the Viewport, those - |
|
106 |
// sizes of the backing up texture. |
|
106 | 107 |
|
107 | 108 |
//////////////////////////////////////////////////////////////////////////////// |
108 | 109 |
// section dealing with Shader Storage Buffer Object (for counting transparency) |
... | ... | |
415 | 416 |
numRenders += child2.markStencilAndDepth(time,mBuffer[internalQuality],lastQueue); |
416 | 417 |
} |
417 | 418 |
|
418 |
numRenders += lastQueue.postprocess(this);
|
|
419 |
numRenders += lastQueue.postprocess(mBuffer);
|
|
419 | 420 |
numRenders += blitWithDepth(time, mBuffer[quality]); |
420 | 421 |
} |
421 | 422 |
|
... | ... | |
425 | 426 |
} |
426 | 427 |
|
427 | 428 |
child1.draw(time,mBuffer[quality]); |
428 |
//numRenders += currQueue.draw(child1,time,mBuffer); |
|
429 | 429 |
|
430 | 430 |
if( i==numChildren-1 ) |
431 | 431 |
{ |
... | ... | |
435 | 435 |
numRenders += child2.markStencilAndDepth(time,mBuffer[internalQuality],currQueue); |
436 | 436 |
} |
437 | 437 |
|
438 |
numRenders += currQueue.postprocess(this);
|
|
438 |
numRenders += currQueue.postprocess(mBuffer);
|
|
439 | 439 |
numRenders += blitWithDepth(time, mBuffer[quality]); |
440 | 440 |
} |
441 | 441 |
} |
... | ... | |
693 | 693 |
* @param fov Vertical 'field of view' of the Projection frustrum (in degrees). |
694 | 694 |
* Valid values: 0<=fov<180. FOV==0 means 'parallel projection'. |
695 | 695 |
* @param near Distance between the screen plane and the near plane. |
696 |
* Valid vaules: 0<near<1. When near==0, the Near Plane is exactly at the tip of the
|
|
697 |
* pyramid. When near==1 (illegal!) the near plane is equivalent to the screen plane. |
|
696 |
* Valid vaules: 0<near<1. When near==0 (illegal!), the Near Plane is exactly at the tip of
|
|
697 |
* the pyramid. When near==1 (illegal!) the near plane is equivalent to the screen plane.
|
|
698 | 698 |
*/ |
699 | 699 |
public void setProjection(float fov, float near) |
700 | 700 |
{ |
Also available in: Unified diff
A little progress making the postprocessing buffers static.