Revision d58407a8
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/library/effect/PostprocessEffect.java | ||
---|---|---|
70 | 70 |
|
71 | 71 |
private static class Source |
72 | 72 |
{ |
73 |
private String mName, mVertexShader, mFragmentShader; |
|
73 |
private final String mName, mVertexShader, mFragmentShader;
|
|
74 | 74 |
|
75 | 75 |
Source(String name, String vertex, String fragment) |
76 | 76 |
{ |
... | ... | |
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
static ArrayList<DistortedProgram> mPrograms = new ArrayList<>(); |
84 |
private static ArrayList<Source> mSources = new ArrayList<>(); |
|
84 |
private final static ArrayList<Source> mSources = new ArrayList<>();
|
|
85 | 85 |
private static int mNumSources = 0; |
86 | 86 |
|
87 | 87 |
private static class Job |
... | ... | |
96 | 96 |
} |
97 | 97 |
} |
98 | 98 |
|
99 |
private ArrayList<Job> mJobs = new ArrayList<>(); |
|
99 |
private final ArrayList<Job> mJobs = new ArrayList<>();
|
|
100 | 100 |
private int mQualityLevel; |
101 | 101 |
|
102 | 102 |
float mQualityScale; |
... | ... | |
141 | 141 |
|
142 | 142 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
143 | 143 |
/** |
144 |
* At this moment the 'buffer' contains a) preprocessed object b) real object rendered 'on top' of |
|
145 |
* the preprocessed one. |
|
146 |
* Postprocess buffer. What this means exactly depends on the effect - |
|
147 |
* |
|
144 | 148 |
* Only for use by the library itself. |
145 | 149 |
* |
146 | 150 |
* @y.exclude |
147 | 151 |
*/ |
148 |
public abstract int apply(float[] uniforms, int index, DistortedFramebuffer buffer);
|
|
152 |
public abstract int postprocess(float[] uniforms, int index, DistortedFramebuffer buffer);
|
|
149 | 153 |
|
150 | 154 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
151 | 155 |
/** |
... | ... | |
153 | 157 |
* |
154 | 158 |
* @y.exclude |
155 | 159 |
*/ |
156 |
public abstract boolean getRender(); |
|
160 |
public abstract boolean getRenderDirectly();
|
|
157 | 161 |
|
158 | 162 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
159 | 163 |
/** |
Also available in: Unified diff
New postprocess effect 'Border' (not working yet) and adding it to the testing app 'Triblur'.