cats-oss / android-gpuimage

Android filters based on OpenGL (idea from GPUImage for iOS)
8.98k stars 2.26k forks source link

GPUImageLevelsFilter is setting fixed value in onInitialized() that will reset our custom values #470

Open andj207 opened 5 years ago

andj207 commented 5 years ago

The GPUImageLevelsFilter is setting fixed value in onInitialized() function so when I create an instance and set my values they will be reset by fixed value when the onInitialized() is called. The current GPUImageLevelsFilter's source is:

@Override
public void onInitialized() {
    super.onInitialized();
    setMin(0.0f, 1.0f, 1.0f, 0.0f, 1.0f);
    updateUniforms();
}

My fix is to create new class that overwrite the onInitialized() function to remove the fixed value. Hope anyone here can update it to the repo.