Project

General

Profile

« Previous | Next » 

Revision dd89c7f4

Added by Leszek Koltunski about 5 years ago

Bugfix: default, MAX region cannot be of Float.MAX_VALUE radius - then in the shader we can have an overflow. Make it 1000000 in radius.

View differences:

src/main/java/org/distorted/library/effect/FragmentEffectBrightness.java
62 62
    super(smooth?EffectName.SMOOTH_BRIGHTNESS:EffectName.BRIGHTNESS);
63 63
    mBrightness = brightness;
64 64
    mCenter = center;
65
    mRegion = (region==null ? new Static3D(Float.MAX_VALUE,Float.MAX_VALUE, Float.MAX_VALUE) : region);
65
    mRegion = (region==null ? MAX_REGION : region);
66 66
    }
67 67

  
68 68
///////////////////////////////////////////////////////////////////////////////////////////////////
......
76 76
    super(EffectName.BRIGHTNESS);
77 77
    mBrightness = brightness;
78 78
    mCenter = new Static3D(0,0,0);
79
    mRegion = new Static3D(Float.MAX_VALUE,Float.MAX_VALUE, Float.MAX_VALUE);
79
    mRegion = MAX_REGION;
80 80
    }
81 81

  
82 82
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff