Method | Description | |
---|---|---|
createBlurredGrayscaleTexture ( Microsoft.Xna.Framework.Color srcData, int width, int height, double deviation = 1 ) : Microsoft.Xna.Framework.Color[] | ||
createBlurredGrayscaleTexture ( Microsoft.Xna.Framework.Graphics.Texture2D image, double deviation = 1 ) : Microsoft.Xna.Framework.Graphics.Texture2D |
creates a new texture that is a gaussian blurred version of the original in grayscale
|
|
createBlurredTexture ( Microsoft.Xna.Framework.Color srcData, int width, int height, double deviation = 1 ) : Microsoft.Xna.Framework.Color[] | ||
createBlurredTexture ( Microsoft.Xna.Framework.Graphics.Texture2D image, double deviation = 1 ) : Microsoft.Xna.Framework.Graphics.Texture2D |
creates a new texture that is a gaussian blurred version of the original
|
|
createFlatHeightmap ( Microsoft.Xna.Framework.Color srcData, Microsoft.Xna.Framework.Color opaqueColor, Microsoft.Xna.Framework.Color transparentColor ) : Microsoft.Xna.Framework.Color[] | ||
createFlatHeightmap ( Microsoft.Xna.Framework.Graphics.Texture2D image, Microsoft.Xna.Framework.Color opaqueColor, Microsoft.Xna.Framework.Color transparentColor ) : Microsoft.Xna.Framework.Graphics.Texture2D |
processes each pixel of the passed in Texture and in the output texture transparent pixels will be transparentColor and opaque pixels will be opaqueColor. This is useful for creating normal maps for rim lighting by applying a grayscale blur then using createNormalMap* by doing something like the following. The first step is used only for making rim lighting normal maps: - var maskTex = createFlatHeightmap( tex, Color.White, Color.Black ) - var blurredTex = createBlurredGrayscaleTexture( maskTex, 1 ) - createNormalMap( blurredTex, 50f )
|
|
createNormalMap ( Microsoft.Xna.Framework.Color srcData, EdgeDetectionFilter filter, int width, int height, float normalStrength = 1f, bool invertX = false, bool invertY = false ) : Microsoft.Xna.Framework.Color[] | ||
createNormalMap ( Microsoft.Xna.Framework.Graphics.Texture2D image, EdgeDetectionFilter filter, float normalStrength = 1f, bool invertX = false, bool invertY = false ) : Microsoft.Xna.Framework.Graphics.Texture2D |
generates a normal map from a height map calculating it with a sobel filter
|
public static createBlurredGrayscaleTexture ( Microsoft.Xna.Framework.Color srcData, int width, int height, double deviation = 1 ) : Microsoft.Xna.Framework.Color[] | ||
srcData | Microsoft.Xna.Framework.Color | |
width | int | |
height | int | |
deviation | double | |
return | Microsoft.Xna.Framework.Color[] |
public static createBlurredGrayscaleTexture ( Microsoft.Xna.Framework.Graphics.Texture2D image, double deviation = 1 ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
image | Microsoft.Xna.Framework.Graphics.Texture2D | Image. |
deviation | double | Deviation. |
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public static createBlurredTexture ( Microsoft.Xna.Framework.Color srcData, int width, int height, double deviation = 1 ) : Microsoft.Xna.Framework.Color[] | ||
srcData | Microsoft.Xna.Framework.Color | |
width | int | |
height | int | |
deviation | double | |
return | Microsoft.Xna.Framework.Color[] |
public static createBlurredTexture ( Microsoft.Xna.Framework.Graphics.Texture2D image, double deviation = 1 ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
image | Microsoft.Xna.Framework.Graphics.Texture2D | Image. |
deviation | double | Deviation. |
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public static createFlatHeightmap ( Microsoft.Xna.Framework.Color srcData, Microsoft.Xna.Framework.Color opaqueColor, Microsoft.Xna.Framework.Color transparentColor ) : Microsoft.Xna.Framework.Color[] | ||
srcData | Microsoft.Xna.Framework.Color | |
opaqueColor | Microsoft.Xna.Framework.Color | |
transparentColor | Microsoft.Xna.Framework.Color | |
return | Microsoft.Xna.Framework.Color[] |
public static createFlatHeightmap ( Microsoft.Xna.Framework.Graphics.Texture2D image, Microsoft.Xna.Framework.Color opaqueColor, Microsoft.Xna.Framework.Color transparentColor ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
image | Microsoft.Xna.Framework.Graphics.Texture2D | Image. |
opaqueColor | Microsoft.Xna.Framework.Color | Opaque color. |
transparentColor | Microsoft.Xna.Framework.Color | Transparent color. |
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public static createNormalMap ( Microsoft.Xna.Framework.Color srcData, EdgeDetectionFilter filter, int width, int height, float normalStrength = 1f, bool invertX = false, bool invertY = false ) : Microsoft.Xna.Framework.Color[] | ||
srcData | Microsoft.Xna.Framework.Color | |
filter | EdgeDetectionFilter | |
width | int | |
height | int | |
normalStrength | float | |
invertX | bool | |
invertY | bool | |
return | Microsoft.Xna.Framework.Color[] |
public static createNormalMap ( Microsoft.Xna.Framework.Graphics.Texture2D image, EdgeDetectionFilter filter, float normalStrength = 1f, bool invertX = false, bool invertY = false ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
image | Microsoft.Xna.Framework.Graphics.Texture2D | Image. |
filter | EdgeDetectionFilter | |
normalStrength | float | Normal strength. |
invertX | bool | |
invertY | bool | |
return | Microsoft.Xna.Framework.Graphics.Texture2D |