Revision 42e08626
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/library/EffectQueueFragment.java | ||
---|---|---|
141 | 141 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
142 | 142 |
// Do various post-processing on already computed effects. |
143 | 143 |
// 1) move all Points and scale all Region radii by a ModelView matrix |
144 |
// 2) in case of macroblock, pre-compute some values so that we don't have to do it in the fragment shader. |
|
145 |
|
|
144 |
|
|
146 | 145 |
void postprocess(float[] MVmatrix) |
147 | 146 |
{ |
148 | 147 |
if( mNumEffects>0 ) |
... | ... | |
160 | 159 |
mUniforms[NUM_UNIFORMS*i+5] = MVmatrix[1]*tx + MVmatrix[5]*ty + MVmatrix[13]; // |
161 | 160 |
mUniforms[NUM_UNIFORMS*i+6] = w*mBuf[4*i+2]; // in fragment shader rx and ry radii are the last two values of the second vec4 |
162 | 161 |
mUniforms[NUM_UNIFORMS*i+7] = h*mBuf[4*i+3]; // |
163 |
|
|
164 |
if( mName[i]==EffectNames.MACROBLOCK.ordinal() ) // fill up the .y and .z components of the Interpolated values already to avoid having to compute this in the fragment shader |
|
165 |
{ |
|
166 |
mUniforms[NUM_UNIFORMS*i+1] = 2.0f*mObjHalfX/mUniforms[NUM_UNIFORMS*i]; |
|
167 |
mUniforms[NUM_UNIFORMS*i+2] = 2.0f*mObjHalfY/mUniforms[NUM_UNIFORMS*i]; |
|
168 |
} |
|
169 | 162 |
} |
170 | 163 |
} |
171 | 164 |
} |
172 | 165 |
|
173 | 166 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
174 |
// macroblock, alpha, brightness, contrast, saturation
|
|
167 |
// alpha, brightness, contrast, saturation |
|
175 | 168 |
|
176 | 169 |
synchronized long add(EffectNames eln, Data1D data) |
177 | 170 |
{ |
... | ... | |
201 | 194 |
} |
202 | 195 |
|
203 | 196 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
204 |
// macroblock, alpha, brightness, contrast, saturation
|
|
197 |
// alpha, brightness, contrast, saturation |
|
205 | 198 |
|
206 | 199 |
synchronized long add(EffectNames eln, Data1D data, Data4D region) |
207 | 200 |
{ |
Also available in: Unified diff
Remove the MACROBLOCK Effect altogether.