Exemplo n.º 1
0
 /// <summary>
 ///   Converts a height map into a normal map. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture.
 /// </summary>
 /// <param name = "source">The source height map texture.</param>
 /// <param name = "destination">The destination texture.</param>
 /// <param name = "flags">One or more flags that control generation of normal maps.</param>
 /// <param name = "channel">One or more flag specifying the source of height information.</param>
 /// <param name = "amplitude">Constant value multiplier that increases (or decreases) the values in the normal map. Higher values usually make bumps more visible, lower values usually make bumps less visible.</param>
 /// <returns>A <see cref = "T:SharpDX.Result" /> object describing the result of the operation.</returns>
 public static void ComputeNormalMap(Texture2D source, Texture2D destination,
                                       NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX10.ComputeNormalMap(source, flags, channel, amplitude, destination);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Computes the normal map.
 /// </summary>
 /// <param name="texture">The texture.</param>
 /// <param name="sourceTexture">The source texture.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="amplitude">The amplitude.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXComputeNormalMap([In] IDirect3DTexture9* pTexture,[In] IDirect3DTexture9* pSrcTexture,[Out, Buffer] const PALETTEENTRY* pSrcPalette,[In] unsigned int Flags,[In] unsigned int Channel,[In] float Amplitude)</unmanaged>
 public static void ComputeNormalMap(Texture texture, Texture sourceTexture, NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX9.ComputeNormalMap(texture, sourceTexture, null, (int)flags, (int)channel, amplitude);
 }
Exemplo n.º 3
0
 /// <summary>
 ///   Converts a height map into a normal map. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture.
 /// </summary>
 /// <param name = "source">The source height map texture.</param>
 /// <param name = "destination">The destination texture.</param>
 /// <param name = "flags">One or more flags that control generation of normal maps.</param>
 /// <param name = "channel">One or more flag specifying the source of height information.</param>
 /// <param name = "amplitude">Constant value multiplier that increases (or decreases) the values in the normal map. Higher values usually make bumps more visible, lower values usually make bumps less visible.</param>
 /// <returns>A <see cref = "T:SharpDX.Result" /> object describing the result of the operation.</returns>
 public static void ComputeNormalMap(Texture2D source, Texture2D destination,
                                     NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX10.ComputeNormalMap(source, flags, channel, amplitude, destination);
 }
Exemplo n.º 4
0
 /// <summary>
 ///   Converts a height map into a normal map. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture.
 /// </summary>
 /// <param name = "context">The device used to create the normal map.</param>
 /// <param name = "source">The source height map texture.</param>
 /// <param name = "destination">The destination texture.</param>
 /// <param name = "flags">One or more flags that control generation of normal maps.</param>
 /// <param name = "channel">One or more flag specifying the source of height information.</param>
 /// <param name = "amplitude">Constant value multiplier that increases (or decreases) the values in the normal map. Higher values usually make bumps more visible, lower values usually make bumps less visible.</param>
 /// <returns>A <see cref = "T:SharpDX.Result" /> object describing the result of the operation.</returns>
 public static void ComputeNormalMap(DeviceContext context, Texture2D source, Texture2D destination,
                                     NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX11.ComputeNormalMap(context, source, flags, channel, amplitude, destination);
 }
Exemplo n.º 5
0
 /// <summary>
 ///   Converts a height map into a normal map. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture.
 /// </summary>
 /// <param name = "context">The device used to create the normal map.</param>
 /// <param name = "source">The source height map texture.</param>
 /// <param name = "destination">The destination texture.</param>
 /// <param name = "flags">One or more flags that control generation of normal maps.</param>
 /// <param name = "channel">One or more flag specifying the source of height information.</param>
 /// <param name = "amplitude">Constant value multiplier that increases (or decreases) the values in the normal map. Higher values usually make bumps more visible, lower values usually make bumps less visible.</param>
 /// <returns>A <see cref = "T:SharpDX.Result" /> object describing the result of the operation.</returns>
 public static void ComputeNormalMap(DeviceContext context, Texture2D source, Texture2D destination,
                                       NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX11.ComputeNormalMap(context, source, flags, channel, amplitude, destination);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Computes the normal map.
 /// </summary>
 /// <param name="texture">The texture.</param>
 /// <param name="sourceTexture">The source texture.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="amplitude">The amplitude.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXComputeNormalMap([In] IDirect3DTexture9* pTexture,[In] IDirect3DTexture9* pSrcTexture,[Out, Buffer] const PALETTEENTRY* pSrcPalette,[In] unsigned int Flags,[In] unsigned int Channel,[In] float Amplitude)</unmanaged>
 public static void ComputeNormalMap(Texture texture, Texture sourceTexture, NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX9.ComputeNormalMap(texture, sourceTexture, null, (int)flags, (int)channel, amplitude);
 }