| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final float | |
| private final float | |
| private BaseTransform | |
| private final boolean | |
| private static final int[] | |
| private float | |
| private BaseTransform | |
| private float[] | |
| private Color4f | |
| private RenderState. | |
| private final float | |
| private final int | |
| private boolean | |
| private int | |
| private FloatBuffer | |
| private float | |
| private float |
| Access | Constructor and Description |
|---|---|
| public | BoxRenderState(float hsize, float vsize, int blurPasses, float spread, boolean isShadow, Color4f shadowColor, BaseTransform filtertx)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public RenderState. | getEffectTransformSpace()
Implements com. Return a hint indicating which coordinate space should be used for the pixel filtering for this particular filtering operation. |
| public Rectangle | getInputClip(int i, Rectangle filterClip)
Implements com. Return the clip for the indicated input based on the indicated output clip. |
| public int | getInputKernelSize(int pass)
Implements abstract com. Returns the size of the desired convolution kernel for the given pass
as it would be applied in the coordinate space indicated by the
|
| public BaseTransform | getInputTransform(BaseTransform filterTransform)
Implements com. Return the transform that should be used to obtain pixel input from the
|
| public static int | |
| public static int | |
| public int | getPassKernelSize()
Implements abstract com. Returns the appropriate kernel size for the pass that was last validated using validateInput(). |
| public EffectPeer | getPassPeer(Renderer r, FilterContext fctx)
Overrides com. Return the |
| public Rectangle | getPassResultBounds(Rectangle srcdimension, Rectangle outputClip)
Implements abstract com. Returns the size of the scaled result image needed to hold the output for the currently validated pass with the indicated input dimensions and output clip. |
| public float[] | getPassShadowColorComponents()
Implements abstract com. For a shadow convolution operation, return the 4 float versions of
the color components, in the range |
| public float[] | getPassVector()
Implements abstract com. Returns an array of 4 floats used to initialize a float4 Shader constant with the relative starting location of the first weight in the convolution kernel and the incremental offset between each sample to be weighted and accumulated. |
| public FloatBuffer | getPassWeights()
Implements abstract com. A |
| public int | getPassWeightsArrayLength()
Implements abstract com. Returns the maximum number of valid float4 elements that should be referenced from the buffer returned by getWeights() for the currently validated pass. |
| public BaseTransform | getResultTransform(BaseTransform filterTransform)
Implements com. Return the transform that should be used to transform the results of the filter operation. |
| public Color4f | getShadowColor()
Implements abstract com. Returns the |
| public float | |
| public boolean | isNop()
Implements abstract com. Returns true if the resulting operation is globally a NOP operation. |
| public boolean | isPassNop()
Implements abstract com. Returns true if the operation of the currently validated pass would be a NOP operation. |
| public boolean | isShadow()
Implements abstract com. Returns true if this is a shadow convolution operation where a constant color is substituted for the color components of the output. |
| public ImageData | validatePassInput(ImageData src, int pass)
Implements abstract com. Validates the |
| private void |
| blurPasses | back to summary |
|---|---|
| private final int blurPasses | |
| inputSizeH | back to summary |
|---|---|
| private final float inputSizeH | |
| inputSizeV | back to summary |
|---|---|
| private final float inputSizeV | |
| inputtx | back to summary |
|---|---|
| private BaseTransform inputtx | |
| isShadow | back to summary |
|---|---|
| private final boolean isShadow | |
| MAX_BOX_SIZES | back to summary |
|---|---|
| private static final int[] MAX_BOX_SIZES | |
| passSize | back to summary |
|---|---|
| private float passSize | |
| resulttx | back to summary |
|---|---|
| private BaseTransform resulttx | |
| samplevectors | back to summary |
|---|---|
| private float[] samplevectors | |
| shadowColor | back to summary |
|---|---|
| private Color4f shadowColor | |
| space | back to summary |
|---|---|
| private RenderState. | |
| spread | back to summary |
|---|---|
| private final float spread | |
| spreadPass | back to summary |
|---|---|
| private final int spreadPass | |
| swCompatible | back to summary |
|---|---|
| private boolean swCompatible | |
| validatedPass | back to summary |
|---|---|
| private int validatedPass | |
| weights | back to summary |
|---|---|
| private FloatBuffer weights | |
| weightsValidSize | back to summary |
|---|---|
| private float weightsValidSize | |
| weightsValidSpread | back to summary |
|---|---|
| private float weightsValidSpread | |
| BoxRenderState | back to summary |
|---|---|
| public BoxRenderState(float hsize, float vsize, int blurPasses, float spread, boolean isShadow, Color4f shadowColor, BaseTransform filtertx) | |
| getBlurPasses | back to summary |
|---|---|
| public int getBlurPasses() | |
| getBoxPixelSize | back to summary |
|---|---|
| public int getBoxPixelSize(int pass) | |
| getEffectTransformSpace | back to summary |
|---|---|
| public RenderState. Implements com. Doc from com. Return a hint indicating which coordinate space should be used for
the pixel filtering for this particular filtering operation.
The
| |
| getInputClip | back to summary |
|---|---|
| public Rectangle getInputClip(int i, Rectangle filterClip) Implements com. Doc from com. Return the clip for the indicated input based on the indicated output clip.
| |
| getInputKernelSize | back to summary |
|---|---|
| public int getInputKernelSize(int pass) Implements abstract com. Doc from com. Returns the size of the desired convolution kernel for the given pass
as it would be applied in the coordinate space indicated by the
| |
| getInputTransform | back to summary |
|---|---|
| public BaseTransform getInputTransform(BaseTransform filterTransform) Implements com. Doc from com. Return the transform that should be used to obtain pixel input from the
| |
| getKernelSize | back to summary |
|---|---|
| public static int getKernelSize(int passSize, int blurPasses) | |
| getMaxSizeForKernelSize | back to summary |
|---|---|
| public static int getMaxSizeForKernelSize(int kernelSize, int blurPasses) | |
| getPassKernelSize | back to summary |
|---|---|
| public int getPassKernelSize() Implements abstract com. Doc from com. Returns the appropriate kernel size for the pass that was last validated using validateInput().
| |
| getPassPeer | back to summary |
|---|---|
| public EffectPeer Overrides com. Doc from com. Return the
| |
| getPassResultBounds | back to summary |
|---|---|
| public Rectangle getPassResultBounds(Rectangle srcdimension, Rectangle outputClip) Implements abstract com. Doc from com. Returns the size of the scaled result image needed to hold the output for the currently validated pass with the indicated input dimensions and output clip. The image may be further scaled after the shader operation is through to obtain the final result bounds. This value is only of use to the actual shader to understand exactly how much room to allocate for the shader result.
| |
| getPassShadowColorComponents | back to summary |
|---|---|
| public float[] getPassShadowColorComponents() Implements abstract com. Doc from com. For a shadow convolution operation, return the 4 float versions of
the color components, in the range
| |
| getPassVector | back to summary |
|---|---|
| public float[] getPassVector() Implements abstract com. Doc from com. Returns an array of 4 floats used to initialize a float4 Shader constant with the relative starting location of the first weight in the convolution kernel and the incremental offset between each sample to be weighted and accumulated. The values are stored in the array in the following order:
shadervec.x = vector[0] = incdx // X delta between subsequent samples
shadervec.y = vector[1] = incdy // Y delta between subsequent samples
shadervec.z = vector[2] = startdx // X offset to first convolution sample
shadervec.w = vector[3] = startdy // Y offset to first convolution sample
These values are used in the shader loop as follows:
samplelocation = outputpixellocation.xy + shadervec.zw;
for (each weight) {
sum += weight * sample(samplelocation.xy);
samplelocation.xy += shadervec.xy;
}
The values are relative to the texture coordinate space which are
normalized to the range [0,1] over the source texture.
| |
| getPassWeights | back to summary |
|---|---|
| public FloatBuffer getPassWeights() Implements abstract com. Doc from com. A
| |
| getPassWeightsArrayLength | back to summary |
|---|---|
| public int getPassWeightsArrayLength() Implements abstract com. Doc from com. Returns the maximum number of valid float4 elements that should be referenced from the buffer returned by getWeights() for the currently validated pass.
| |
| getResultTransform | back to summary |
|---|---|
| public BaseTransform getResultTransform(BaseTransform filterTransform) Implements com. Doc from com. Return the transform that should be used to transform the results of
the filter operation.
The returned transform is combined with the resulting filter result
texture to produce an output ImageData object.
Typically, the output of
| |
| getShadowColor | back to summary |
|---|---|
| public Color4f getShadowColor() Implements abstract com. Doc from com. Returns the
| |
| getSpread | back to summary |
|---|---|
| public float getSpread() | |
| isNop | back to summary |
|---|---|
| public boolean isNop() Implements abstract com. Doc from com. Returns true if the resulting operation is globally a NOP operation. This condition is calculated at the start of the render operation and is based on whether the perturbations of the convolution kernel would be noticeable at all in the coordinate space of the output.
| |
| isPassNop | back to summary |
|---|---|
| public boolean isPassNop() Implements abstract com. Doc from com. Returns true if the operation of the currently validated pass would be a NOP operation.
| |
| isShadow | back to summary |
|---|---|
| public boolean isShadow() Implements abstract com. Doc from com. Returns true if this is a shadow convolution operation where a
constant color is substituted for the color components of the
output.
This value is dependent only on the original
| |
| validatePassInput | back to summary |
|---|---|
| public ImageData validatePassInput(ImageData src, int pass) Implements abstract com. Doc from com. Validates the
| |
| validateWeights | back to summary |
|---|---|
| private void validateWeights() | |