Search in sources :

Example 51 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class RedEyeFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mRedEyeShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            mProgram.setHostValue("intensity", DEFAULT_RED_INTENSITY);
            break;
        default:
            throw new RuntimeException("Filter RedEye does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 52 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class LomoishFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mLomoishShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 53 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class FisheyeFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mFisheyeShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter FisheyeFilter does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 54 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class FlipFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = ShaderProgram.createIdentity(context);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
    updateParameters();
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 55 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class GrainFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mNoiseShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mNoiseProgram = shaderProgram;
            shaderProgram = new ShaderProgram(context, mGrainShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mGrainProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Aggregations

ShaderProgram (android.filterfw.core.ShaderProgram)198 Frame (android.filterfw.core.Frame)18 MutableFrameFormat (android.filterfw.core.MutableFrameFormat)18 Quad (android.filterfw.geometry.Quad)18 FrameFormat (android.filterfw.core.FrameFormat)12 Point (android.filterfw.geometry.Point)12 NativeFrame (android.filterfw.core.NativeFrame)1