Project

General

Profile

« Previous | Next » 

Revision 7958d843

Added by Leszek Koltunski about 3 years ago

MeshBase's 'MAX_NUM_COMPONENTS' is not a constant - rename!

View differences:

src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
35 35
  {
36 36
  private static final int MAX_RADIUS = 50;
37 37

  
38
  private Data2D mGlowHaloAndRadius;
39
  private Data4D mColor;
38
  private final Data2D mGlowHaloAndRadius;
39
  private final Data4D mColor;
40 40

  
41 41
  private static final float[] GAUSSIAN =   // G(0.00), G(0.03), G(0.06), ..., G(3.00), 0
42 42
    {                                       // where G(x)= (1/(sqrt(2*PI))) * e^(-(x^2)/2). The last 0 terminates.
......
58 58
  // i.e. k(i)=floor((i+3)/2).  (the 'i' in k(i) means 'blur taking into account the present pixel and 'i' pixels
59 59
  // in all 4 directions)
60 60
  // We need room for MAX_BLUR of them, and sum(i=0...N, floor((i+3)/2)) = N + floor(N*N/4)
61
  private static float[] weightsCache = new float[MAX_RADIUS + MAX_RADIUS*MAX_RADIUS/4];
62
  private static float[] offsetsCache = new float[MAX_RADIUS + MAX_RADIUS*MAX_RADIUS/4];
63
  private static float[] mWeights = new float[MAX_RADIUS];
64
  private static float[] mOffsets = new float[MAX_RADIUS];
61
  private static final float[] weightsCache = new float[MAX_RADIUS + MAX_RADIUS*MAX_RADIUS/4];
62
  private static final float[] offsetsCache = new float[MAX_RADIUS + MAX_RADIUS*MAX_RADIUS/4];
63
  private static final float[] mWeights = new float[MAX_RADIUS];
64
  private static final float[] mOffsets = new float[MAX_RADIUS];
65 65

  
66 66
  private static DistortedProgram mProgram1, mProgram2;
67 67
  private static int mIndex1, mIndex2;

Also available in: Unified diff