Class TBGRAShader3D

Unit

Declaration

type TBGRAShader3D = class(TObject)

Description

Shader for 3D software rendering

Hierarchy

Overview

Fields

Protected FAmbiantLightColor: TColorInt65536;
Protected FAmbiantLightness: integer;
Protected FContext: PBasicLightingContext;
Protected FContextBlock: TMemoryBlockAlign128;
Protected FInt65536ShaderFunc: TInt65536ShaderFunction3D;
Protected FLights: TList;
Protected FOnlyDirectionalLights: boolean;
Protected FShaderFunc: TShaderFunction3D;
Protected FUseAmbiantColor: boolean;
Protected FWhiteMaterial: boolean;

Methods

Public constructor Create(const AAmbiantLightColorF: TColorF; ALights: TList);
Public destructor Destroy; override;
Public function Apply(APosition: TPoint3D_128; ANormal: TPoint3D_128; AColor: TBGRAPixel): TBGRAPixel;
Public function Int65536Apply(APosition: TPoint3D_128; ANormal: TPoint3D_128; AColor: TBGRAPixel): TColorInt65536;
Protected function ApplyLightingWithAmbiantLightnessOnly(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;
Protected function ApplyLightingWithDiffuseAndSpecularColor(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;
Protected function ApplyLightingWithDiffuseColor(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;
Protected function ApplyLightingWithLightness(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;
Protected function ApplyNoLighting(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;
Protected function Int65536ApplyLightingWithAmbiantLightnessOnly(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;
Protected function Int65536ApplyLightingWithDiffuseAndSpecularColor(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;
Protected function Int65536ApplyLightingWithDiffuseColor(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;
Protected function Int65536ApplyLightingWithLightness(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;
Protected function Int65536ApplyNoLighting(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;
Public procedure Prepare(constref ADescription: TFaceRenderingDescription);
Protected procedure ComputeDiffuseAndSpecularLight(Context: PSceneLightingContext); inline;
Protected procedure ComputeDiffuseLight(Context: PSceneLightingContext); inline;
Protected procedure ComputeDiffuseLightness(Context: PSceneLightingContext); inline;

Properties

Public property Context: PBasicLightingContext read FContext;
Public property Int65536ShaderFunction: TInt65536ShaderFunction3D read FInt65536ShaderFunc;
Public property OnlyDirectionalLights: boolean read FOnlyDirectionalLights;
Public property ShaderFunction: TShaderFunction3D read FShaderFunc;

Description

Fields

Protected FAmbiantLightColor: TColorInt65536;

This item has no description.

Protected FAmbiantLightness: integer;

This item has no description.

Protected FContext: PBasicLightingContext;

This item has no description.

Protected FContextBlock: TMemoryBlockAlign128;

This item has no description.

Protected FInt65536ShaderFunc: TInt65536ShaderFunction3D;

This item has no description.

Protected FLights: TList;

This item has no description.

Protected FOnlyDirectionalLights: boolean;

This item has no description.

Protected FShaderFunc: TShaderFunction3D;

This item has no description.

Protected FUseAmbiantColor: boolean;

This item has no description.

Protected FWhiteMaterial: boolean;

This item has no description.

Methods

Public constructor Create(const AAmbiantLightColorF: TColorF; ALights: TList);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function Apply(APosition: TPoint3D_128; ANormal: TPoint3D_128; AColor: TBGRAPixel): TBGRAPixel;

This item has no description.

Public function Int65536Apply(APosition: TPoint3D_128; ANormal: TPoint3D_128; AColor: TBGRAPixel): TColorInt65536;

This item has no description.

Protected function ApplyLightingWithAmbiantLightnessOnly(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;

This item has no description.

Protected function ApplyLightingWithDiffuseAndSpecularColor(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;

This item has no description.

Protected function ApplyLightingWithDiffuseColor(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;

This item has no description.

Protected function ApplyLightingWithLightness(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;

This item has no description.

Protected function ApplyNoLighting(Context: PSceneLightingContext; Color: TBGRAPixel): TBGRAPixel;

This item has no description.

Protected function Int65536ApplyLightingWithAmbiantLightnessOnly(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;

This item has no description.

Protected function Int65536ApplyLightingWithDiffuseAndSpecularColor(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;

This item has no description.

Protected function Int65536ApplyLightingWithDiffuseColor(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;

This item has no description.

Protected function Int65536ApplyLightingWithLightness(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;

This item has no description.

Protected function Int65536ApplyNoLighting(Context: PSceneLightingContext; Color: TBGRAPixel): TColorInt65536;

This item has no description.

Public procedure Prepare(constref ADescription: TFaceRenderingDescription);

This item has no description.

Protected procedure ComputeDiffuseAndSpecularLight(Context: PSceneLightingContext); inline;

This item has no description.

Protected procedure ComputeDiffuseLight(Context: PSceneLightingContext); inline;

This item has no description.

Protected procedure ComputeDiffuseLightness(Context: PSceneLightingContext); inline;

This item has no description.

Properties

Public property Context: PBasicLightingContext read FContext;

This item has no description.

Public property Int65536ShaderFunction: TInt65536ShaderFunction3D read FInt65536ShaderFunc;

This item has no description.

Public property OnlyDirectionalLights: boolean read FOnlyDirectionalLights;

This item has no description.

Public property ShaderFunction: TShaderFunction3D read FShaderFunc;

This item has no description.