public class GPUImageSphereRefractionFilter extends GPUImageFilter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SPHERE_FRAGMENT_SHADER |
NO_FILTER_FRAGMENT_SHADER, NO_FILTER_VERTEX_SHADER| Constructor and Description |
|---|
GPUImageSphereRefractionFilter() |
GPUImageSphereRefractionFilter(android.graphics.PointF center,
float radius,
float refractiveIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
onInit() |
void |
onInitialized() |
void |
onOutputSizeChanged(int width,
int height) |
void |
setCenter(android.graphics.PointF center)
The center about which to apply the distortion, with a default of (0.5, 0.5)
|
void |
setRadius(float radius)
The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25
|
void |
setRefractiveIndex(float refractiveIndex)
The index of refraction for the sphere, with a default of 0.71
|
convertStreamToString, destroy, getAttribPosition, getAttribTextureCoordinate, getOutputHeight, getOutputWidth, getProgram, getUniformTexture, ifNeedInit, isInitialized, loadShader, onDestroy, onDraw, onDrawArraysPre, runOnDraw, runPendingOnDrawTasks, setFloat, setFloatArray, setFloatVec2, setFloatVec3, setFloatVec4, setInteger, setPoint, setUniformMatrix3f, setUniformMatrix4fpublic static final java.lang.String SPHERE_FRAGMENT_SHADER
public GPUImageSphereRefractionFilter()
public GPUImageSphereRefractionFilter(android.graphics.PointF center,
float radius,
float refractiveIndex)
public void onInit()
onInit in class GPUImageFilterpublic void onInitialized()
onInitialized in class GPUImageFilterpublic void onOutputSizeChanged(int width,
int height)
onOutputSizeChanged in class GPUImageFilterpublic void setRefractiveIndex(float refractiveIndex)
refractiveIndex - default 0.71public void setCenter(android.graphics.PointF center)
center - default (0.5, 0.5)public void setRadius(float radius)
radius - from 0.0 to 1.0, default 0.25