Header menu logo Nu

LightMap Module

Light map operations.

Functions and values

Function or value Description

LightMap.createEnvironmentFilterMap resolution environmentFilterSurface sampler colorFormat environmentFilterPipeline getCommandBuffer advanceCommandBufferWhenNeeded context

Full Usage: LightMap.createEnvironmentFilterMap resolution environmentFilterSurface sampler colorFormat environmentFilterPipeline getCommandBuffer advanceCommandBufferWhenNeeded context

Parameters:
Returns: Texture

Create an environment filter map.

resolution : int
environmentFilterSurface : CubeMapSurface
sampler : Sampler
colorFormat : ImageFormat
environmentFilterPipeline : EnvironmentFilterPipeline
getCommandBuffer : unit -> VkCommandBuffer
advanceCommandBufferWhenNeeded : unit -> unit
context : VulkanContext
Returns: Texture

LightMap.createEnvironmentFilterPipeline shaderPath colorAttachmentFormat context

Full Usage: LightMap.createEnvironmentFilterPipeline shaderPath colorAttachmentFormat context

Parameters:
Returns: EnvironmentFilterPipeline

Create an EnvironmentFilterPipeline.

shaderPath : string
colorAttachmentFormat : VkFormat
context : VulkanContext
Returns: EnvironmentFilterPipeline

LightMap.createIrradianceMap resolution cubeMapSurface sampler colorFormat irradiancePipeline getCommandBuffer advanceCommandBufferWhenNeeded context

Full Usage: LightMap.createIrradianceMap resolution cubeMapSurface sampler colorFormat irradiancePipeline getCommandBuffer advanceCommandBufferWhenNeeded context

Parameters:
Returns: Texture
resolution : int
cubeMapSurface : CubeMapSurface
sampler : Sampler
colorFormat : ImageFormat
irradiancePipeline : CubeMapPipeline
getCommandBuffer : unit -> VkCommandBuffer
advanceCommandBufferWhenNeeded : unit -> unit
context : VulkanContext
Returns: Texture

LightMap.createLightMap enabled origin ambientColor ambientBrightness bounds irradianceMap environmentFilterMap

Full Usage: LightMap.createLightMap enabled origin ambientColor ambientBrightness bounds irradianceMap environmentFilterMap

Parameters:
    enabled : bool
    origin : Vector3
    ambientColor : Color
    ambientBrightness : single
    bounds : Box3
    irradianceMap : Texture
    environmentFilterMap : Texture

Returns: LightMap

Create a light map with existing irradiance and environment filter maps.

enabled : bool
origin : Vector3
ambientColor : Color
ambientBrightness : single
bounds : Box3
irradianceMap : Texture
environmentFilterMap : Texture
Returns: LightMap

LightMap.createReflectionMap render resolution origin ambientColor ambientBrightness getCommandBuffer context

Full Usage: LightMap.createReflectionMap render resolution origin ambientColor ambientBrightness getCommandBuffer context

Parameters:
Returns: Texture

Create a reflection map.

render : bool -> ('a * 'b) option -> Vector3 -> Matrix4x4 -> Matrix4x4 -> Frustum -> Matrix4x4 -> Matrix4x4 -> VkRect2D -> int32 -> VkImage -> unit
resolution : int
origin : Vector3
ambientColor : 'a
ambientBrightness : 'b
getCommandBuffer : unit -> VkCommandBuffer
context : VulkanContext
Returns: Texture

LightMap.destroyEnvironmentFilterPipeline environmentFilterPipeline context

Full Usage: LightMap.destroyEnvironmentFilterPipeline environmentFilterPipeline context

Parameters:

Destroy an EnvironmentFilterPipeline.

environmentFilterPipeline : EnvironmentFilterPipeline
context : VulkanContext

LightMap.destroyLightMap lightMap context

Full Usage: LightMap.destroyLightMap lightMap context

Parameters:

Destroy a light map, including its irradiance environment filter maps.

lightMap : LightMap
context : VulkanContext

LightMap.drawEnvironmentFilter eyeCenter view projectionUnflipped roughness resolution flipped cubeMap sampler geometry colorAttachment pipeline getCommandBuffer advanceCommandBufferWhenNeeded context

Full Usage: LightMap.drawEnvironmentFilter eyeCenter view projectionUnflipped roughness resolution flipped cubeMap sampler geometry colorAttachment pipeline getCommandBuffer advanceCommandBufferWhenNeeded context

Parameters:

Draw an environment filter.

eyeCenter : Vector3
view : Matrix4x4
projectionUnflipped : Matrix4x4
roughness : single
resolution : single
flipped : bool
cubeMap : Texture
sampler : Sampler
geometry : CubeMapGeometry
colorAttachment : VkImageView
pipeline : EnvironmentFilterPipeline
getCommandBuffer : unit -> VkCommandBuffer
advanceCommandBufferWhenNeeded : unit -> unit
context : VulkanContext

Type something to start searching.