Revision 638b5b5c
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedFramebuffer.java | ||
---|---|---|
225 | 225 |
{ |
226 | 226 |
return mColorH[0]; |
227 | 227 |
} |
228 |
|
|
229 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
230 |
/** |
|
231 |
* Set mipmap level. |
|
232 |
* <p> |
|
233 |
* Trick for speeding up your renders - one can create a pyramid of DistortedFramebuffer objects, |
|
234 |
* each next one some constant FACTOR smaller than the previous (0.5 is the common value), then set |
|
235 |
* the Mipmap Level of the i-th object to be FACTOR^i (we start counting from 0). When rendering any |
|
236 |
* scene into such prepared Framebuffer, the library will make sure to scale any Effects used so that |
|
237 |
* the end scene will end up looking identical no matter which object we render to. Identical, that |
|
238 |
* is, except for the loss of quality and gain in speed associated with rendering to a smaller surface. |
|
239 |
* |
|
240 |
* @param mipmap The mipmap level. Acceptable range: 0<mipmap<infinity, although mipmap>1 |
|
241 |
* does not make any sense (that would result in loss of speed and no gain in quality) |
|
242 |
*/ |
|
243 |
public void setMipmap(float mipmap) |
|
244 |
{ |
|
245 |
mMipmap = mipmap; |
|
246 |
} |
|
247 | 228 |
} |
Also available in: Unified diff
More MIPMAP work.