file REDRenderShader.h

Header of the RED::RenderShader class. Specify a vertex / pixel program pair for the rendering. More...

Go to the source code of this file.

Namespaces:

namespaceRED

Classes:

classRenderShader
classRenderShaderData

Defines:

#defineRED_GID (RED_SHAD_TARGET_GI_DIFFUSE_COLOR)
#defineRED_GIN (RED_SHAD_TARGET_GI_NORMAL)
#defineRED_GIN_IND (RED_SHAD_TARGET_GI_NORMAL_INDIRECT)
#defineRED_GIR (RED_SHAD_TARGET_GI_REFLECTION_COLOR)
#defineRED_GIT (RED_SHAD_TARGET_GI_TRANSMISSION_COLOR)
#defineRED_L0 (RED_SHAD_TARGET_LIGHT_NO_LIGHT)
#defineRED_LA (RED_SHAD_TARGET_LIGHT_AREA)
#defineRED_LALL (RED_SHAD_TARGET_ANY_LIGHT)
#defineRED_LB (RED_SHAD_TARGET_LIGHT_BEAM)
#defineRED_LD (RED_SHAD_TARGET_LIGHT_DIRECTIONAL)
#defineRED_LE (RED_SHAD_TARGET_LIGHT_AREA_SPOT)
#defineRED_LIGHT_AMBIENT_LIGHT (0x00000200)
#defineRED_LIGHT_AREA (0x00000020)
#defineRED_LIGHT_AREA_SPOT (0x00000080)
#defineRED_LIGHT_BEAM (0x00000002)
#defineRED_LIGHT_DIRECTIONAL (0x00000001)
#defineRED_LIGHT_MOON_LIGHT (0x00000008)
#defineRED_LIGHT_NO_LIGHT (0x00000100)
#defineRED_LIGHT_PHYSICAL_LIGHT (0x00000800)
#defineRED_LIGHT_POINT (0x00000010)
#defineRED_LIGHT_POINT_SPOT (0x00000040)
#defineRED_LIGHT_SKY_LIGHT (0x00000400)
#defineRED_LIGHT_SUN_LIGHT (0x00000004)
#defineRED_LK (RED_SHAD_TARGET_LIGHT_SKY_LIGHT)
#defineRED_LP (RED_SHAD_TARGET_LIGHT_POINT)
#defineRED_LS (RED_SHAD_TARGET_LIGHT_POINT_SPOT)
#defineRED_SHAD_TARGET_ALL ( 0xffffffff )
#defineRED_SHAD_TARGET_ANY_LIGHT
#defineRED_SHAD_TARGET_BSDF ( 0x20000000 )
#defineRED_SHAD_TARGET_GI_DIFFUSE_COLOR ( 0x00100000 )
#defineRED_SHAD_TARGET_GI_NORMAL ( 0x00800000 )
#defineRED_SHAD_TARGET_GI_NORMAL_INDIRECT ( 0x02000000 )
#defineRED_SHAD_TARGET_GI_REFLECTION_COLOR ( 0x00200000 )
#defineRED_SHAD_TARGET_GI_TRANSMISSION_COLOR ( 0x00400000 )
#defineRED_SHAD_TARGET_INDIRECT_REFLECTION_CUTOFF ( 0x00020000 )
#defineRED_SHAD_TARGET_INDIRECT_REFLECTION_VECTOR ( 0x00002000 )
#defineRED_SHAD_TARGET_INDIRECT_REFRACTION_CUTOFF ( 0x00080000 )
#defineRED_SHAD_TARGET_INDIRECT_REFRACTION_VECTOR ( 0x00008000 )
#defineRED_SHAD_TARGET_LIGHT_AREA ( RED_LIGHT_AREA )
#defineRED_SHAD_TARGET_LIGHT_AREA_SPOT ( RED_LIGHT_AREA_SPOT )
#defineRED_SHAD_TARGET_LIGHT_BEAM ( RED_LIGHT_BEAM )
#defineRED_SHAD_TARGET_LIGHT_DIRECTIONAL ( RED_LIGHT_DIRECTIONAL )
#defineRED_SHAD_TARGET_LIGHT_NO_LIGHT ( RED_LIGHT_NO_LIGHT )
#defineRED_SHAD_TARGET_LIGHT_POINT ( RED_LIGHT_POINT )
#defineRED_SHAD_TARGET_LIGHT_POINT_SPOT ( RED_LIGHT_POINT_SPOT )
#defineRED_SHAD_TARGET_LIGHT_SKY_LIGHT ( RED_LIGHT_SKY_LIGHT )
#defineRED_SHAD_TARGET_REFLECTION_CUTOFF ( 0x00010000 )
#defineRED_SHAD_TARGET_REFLECTION_VECTOR ( 0x00001000 )
#defineRED_SHAD_TARGET_REFRACTION_CUTOFF ( 0x00040000 )
#defineRED_SHAD_TARGET_REFRACTION_VECTOR ( 0x00004000 )
#defineRED_SHAD_TARGET_SOFT_KILL ( 0x10000000 )
#defineRED_SHADER_INDIRECT_FACE_CULLING "ray_facing"
#defineRED_SHADER_INDIRECT_RAY_DIR "ray_dir"
#defineRED_SHADER_INDIRECT_RAY_POS "ray_pos"
#defineRED_SHADER_INDIRECT_RAY_TRIANGLE "ray_triangle"
#defineRED_SHADER_LIGHT_AMBCOL "light_amb_color"
#defineRED_SHADER_LIGHT_AREA_SAMPLE_POS "light_area_pos"
#defineRED_SHADER_LIGHT_ATTENUATION "light_att"
#defineRED_SHADER_LIGHT_BEAM_FALLOFF "beam_falloff"
#defineRED_SHADER_LIGHT_DIFCOL "light_dif_color"
#defineRED_SHADER_LIGHT_FRAGMENT_POS_JITTER "light_fragment_pos_jitter"
#defineRED_SHADER_LIGHT_POS "light_pos"
#defineRED_SHADER_LIGHT_PROJUV "light_projuv"
#defineRED_SHADER_LIGHT_RANGE "light_range"
#defineRED_SHADER_LIGHT_RIGHT "light_right"
#defineRED_SHADER_LIGHT_SHADOW_IMAGE "light_shadow"
#defineRED_SHADER_LIGHT_SIGHT "light_sight"
#defineRED_SHADER_LIGHT_SKY_SAMPLE_POS_JITTER "light_sky_pos_jitter"
#defineRED_SHADER_LIGHT_SKY_SMOOTH_CUBE "light_sky_smooth_cube"
#defineRED_SHADER_LIGHT_SPECOL "light_spec_color"
#defineRED_SHADER_LIGHT_SPOT_FALLOFF "spot_falloff"
#defineRED_SHADER_LIGHT_TOP "light_top"
#defineRED_SHADER_POLYGON_FACING "polygon_facing"
#defineRED_VMxTy (matx, uv)(8*(uv) + (matx))

Detailed description:

Header of the RED::RenderShader class. Specify a vertex / pixel program pair for the rendering.

Header file describing the RED::RenderShader class, that is the shader class leveraging programmable graphics hardware.

Defines documentation

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

#define RED_LIGHT_AMBIENT_LIGHT (0x00000200)

Type of a light indicating an ambient light.

#define RED_LIGHT_AREA (0x00000020)

Type of a light source identifying an area area light source. An area light source is made of lighting and shadowing samples. These lights produce smooth shadowing effects.

#define RED_LIGHT_AREA_SPOT (0x00000080)

Type of a light source identifying an area light spot. Is similar to the RED_LIGHT_POINT_SPOT. The apex of the spot cone is located at the center of the area light sphere, and therefore cuts its effect in its containment sphere.

#define RED_LIGHT_BEAM (0x00000002)

Type of a light source identifying a light beam. A light beam is a directional light whose effect area is reduced to a cylindrical region of space. The light source axis system defines the cylinder referential. The beam light may have an attenuation.

#define RED_LIGHT_DIRECTIONAL (0x00000001)

Type of a light source identifying a directional light. A directional light is defined by the light source axis system. It emits its light in the sight axis direction. A directional light has no attenuation equation, and emits lights in the whole scene space.

#define RED_LIGHT_MOON_LIGHT (0x00000008)

Type of a light source identifying a physical moon light.

#define RED_LIGHT_NO_LIGHT (0x00000100)

Flag used by the RenderShader to indicate that a parameter is not to be used with any kind of light.

#define RED_LIGHT_PHYSICAL_LIGHT (0x00000800)

Type of a light indicating a physical light.

#define RED_LIGHT_POINT (0x00000010)

Type of a light source identifying an omnidirectional light.

#define RED_LIGHT_POINT_SPOT (0x00000040)

Type of a light source identifying a point light spot. The spot uses the light source axis system . Spot direction is along the sight axis of the light's system. The maximal angle of a spot falloff is RED_PI/2 (the sum of the spot angle and falloff).

#define RED_LIGHT_SKY_LIGHT (0x00000400)

Type of a light indicating a sky light.

#define RED_LIGHT_SUN_LIGHT (0x00000004)

Type of a light source identifying a physical sun light.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

Shortcut version of some useful shader targets.

#define RED_SHAD_TARGET_ALL ( 0xffffffff )

Combination of all shader targets.

#define RED_SHAD_TARGET_BSDF ( 0x20000000 )

Shader target used by BSDF shaders. Those shaders are needed to support path tracing rendering in RED. Currently, this target is reserved for internal use.

#define RED_SHAD_TARGET_GI_DIFFUSE_COLOR ( 0x00100000 )

Shader target used to identify the diffusion color used for GI computations.

#define RED_SHAD_TARGET_GI_NORMAL ( 0x00800000 )

Shader target used to identify the normal direction used for GI computations.

#define RED_SHAD_TARGET_GI_NORMAL_INDIRECT ( 0x02000000 )

Shader target used to identify the normal direction used for GI computations.

Shader target used to identify the reflection color used for GI computations.

Shader target used to identify the transmission color used for GI computations.

Shader target flag indicating that we only focus on indirect reflection cutoff calculation parameters.

Shader target flag indicating that we only focus on indirect reflection vector calculation parameters.

Shader target flag indicating that we only focus on indirect refraction cutoff calculation parameters.

Shader target flag indicating that we only focus on indirect refraction vector calculation parameters.

Shader target flag indicating that we only target area lights parameters.

Shader target flag indicating that we only target area spot lights parameters.

Shader target flag indicating that we only target beam lights parameters.

Shader target flag indicating that we only target directional lights parameters.

Shader target flag indicating that we only target parameters that are not related to lighting.

Shader target flag indicating that we only target point lights parameters.

Shader target flag indicating that we only target point spot lights parameters.

#define RED_SHAD_TARGET_REFLECTION_CUTOFF ( 0x00010000 )

Shader target flag indicating that we only focus on direct reflection cutoff calculation parameters.

#define RED_SHAD_TARGET_REFLECTION_VECTOR ( 0x00001000 )

Shader target flag indicating that we only focus on direct reflection vector calculation parameters.

#define RED_SHAD_TARGET_REFRACTION_CUTOFF ( 0x00040000 )

Shader target flag indicating that we only focus on direct refraction cutoff calculation parameters.

#define RED_SHAD_TARGET_REFRACTION_VECTOR ( 0x00004000 )

Shader target flag indicating that we only focus on direct refraction vector calculation parameters.

#define RED_SHAD_TARGET_SOFT_KILL ( 0x10000000 )

Shader target used to identify software ray-tracer pixel kill shaders that mimic the behavior of the shader 'KIL' statement. This target goes to a regular rendering pass and not to the RED::MTL_RAYTRACE pass. Note that this target can't be associated to any state shader data. It only describes the parameters that are needed to decide on killing a fragment or not.

#define RED_SHADER_INDIRECT_RAY_DIR "ray_dir"
#define RED_SHADER_INDIRECT_RAY_POS "ray_pos"
#define RED_SHADER_INDIRECT_RAY_TRIANGLE "ray_triangle"
#define RED_SHADER_LIGHT_AMBCOL "light_amb_color"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light ambient color.

#define RED_SHADER_LIGHT_AREA_SAMPLE_POS "light_area_pos"

Parameter bound by RED::RenderShader::BindLight.
Name of the parameter used to bind the sample jittering data for an area light source.

#define RED_SHADER_LIGHT_ATTENUATION "light_att"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders using the light source attenuation ramp encoded as a mono dimension texture (however, sampled as RECT).

#define RED_SHADER_LIGHT_BEAM_FALLOFF "beam_falloff"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the falloff texture of a beam light to apply to the resulting shader pixel color.

#define RED_SHADER_LIGHT_DIFCOL "light_dif_color"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light diffuse color.

#define RED_SHADER_LIGHT_FRAGMENT_POS_JITTER "light_fragment_pos_jitter"

Parameter bound by RED::RenderShader::BindLight.
Name of the parameter used to bind the fragment position jittering data for an area or sky light source.

#define RED_SHADER_LIGHT_POS "light_pos"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light axis system.

#define RED_SHADER_LIGHT_PROJUV "light_projuv"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light uv projector matrix.

#define RED_SHADER_LIGHT_RANGE "light_range"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the range of the light source.

#define RED_SHADER_LIGHT_RIGHT "light_right"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light axis system.

#define RED_SHADER_LIGHT_SHADOW_IMAGE "light_shadow"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the per pixel shadow image to apply to the resulting shader pixel color.

#define RED_SHADER_LIGHT_SIGHT "light_sight"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light axis system.

#define RED_SHADER_LIGHT_SKY_SAMPLE_POS_JITTER "light_sky_pos_jitter"

Parameter bound by RED::RenderShader::BindLight.
Name of the parameter used to bind the sample jittering data for a sky light source.

#define RED_SHADER_LIGHT_SKY_SMOOTH_CUBE "light_sky_smooth_cube"

Parameter bound by RED::RenderShader::BindLight.
Name of the parameter used to bind the sky texture smooth cube used for diffuse GPU shading.

#define RED_SHADER_LIGHT_SPECOL "light_spec_color"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light specular color.

#define RED_SHADER_LIGHT_SPOT_FALLOFF "spot_falloff"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the falloff texture of a spot to apply to the resulting shader pixel color.

#define RED_SHADER_LIGHT_TOP "light_top"

Parameter bound by RED::RenderShader::BindLight.
Parameter used in all shaders that need an access to the light axis system.

#define RED_SHADER_POLYGON_FACING "polygon_facing"

Parameter used in many built-in engine vertex / pixel shaders. Used to specify which face (+1,+1,+1,+1) or (-1,-1,-1,-1) of the geometry is currently rendered.

#define RED_VMxTy(matx,
uv
)(8*(uv) + (matx))

Vertex program selection macro: indicates a number of matrix channels and texture channels to transform.