Project

General

Profile

« Previous | Next » 

Revision a31dbc5c

Added by Leszek Koltunski almost 7 years ago

Beginnings of support for the GLOW effect.

View differences:

src/main/java/org/distorted/library/EffectNames.java
241 241

  
242 242
  /////////////////////////////////////////////////////////////////////////////////
243 243
  // POSTPROCESSING EFFECTS.
244
  // Always 4 Uniforms: 4 per-effect interpolated values.
244
  // Always 5 Uniforms: 5 per-effect interpolated values.
245 245
 /**
246 246
   * Blur the area around the center.
247 247
   * <p>
248
   * Uniforms: (radius,UNUSED,UNUSED,UNUSED)
248
   * Uniforms: (radius,UNUSED,UNUSED,UNUSED,UNUSED)
249 249
   * <p>
250 250
   * Unity: radius = 0
251 251
   */
252
  BLUR             ( EffectTypes.POSTPROCESS,new float[] {0.0f}          , 1, false, false );
252
  BLUR             ( EffectTypes.POSTPROCESS,new float[] {0.0f}          , 1, false, false ),
253
/**
254
   * Make the object Glow with a certain color and configurable radius of the halo around it.
255
   * <p>
256
   * Uniforms: (A,R,G,B,radius)
257
   * <p>
258
   * Unity: radius = 0
259
   */
260
  GLOW             ( EffectTypes.POSTPROCESS,new float[] {0.0f}          , 5, false, false );
253 261

  
254 262
///////////////////////////////////////////////////////////////////////////////////////////////////
255 263
  
256
  private static final int MAXDIM = 4;  // maximum supported dimension of an effect  
257
  
264
  private static final int MAXDIM = 4;  // maximum supported dimension of the Unity of an Effect
265
                                        // (not to be confused with dimension of the Effect itself!)
258 266
  private final EffectTypes type;
259 267
  private final float[] unity;
260 268
  private final int dimension;

Also available in: Unified diff