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/FragmentEffectAlpha.java
63 63
    super(smooth? EffectName.SMOOTH_ALPHA:EffectName.ALPHA);
64 64
    mAlpha  = alpha;
65 65
    mCenter = center;
66
    mRegion = (region==null ? new Static3D(Float.MAX_VALUE,Float.MAX_VALUE, Float.MAX_VALUE) : region);
66
    mRegion = (region==null ? MAX_REGION : region);
67 67
    }
68 68

  
69 69
///////////////////////////////////////////////////////////////////////////////////////////////////
......
78 78
    super(EffectName.ALPHA);
79 79
    mAlpha  = alpha;
80 80
    mCenter = new Static3D(0,0,0);
81
    mRegion = new Static3D(Float.MAX_VALUE,Float.MAX_VALUE, Float.MAX_VALUE);
81
    mRegion = MAX_REGION;
82 82
    }
83 83

  
84 84
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff