FresnelSettings Class
As part of a LightSettings, describes how to apply a Fresnel effect to the contents of the view. The "Fresnel effect" is based on the observation that the reflectivity of a surface varies based on the angle between the surface and the viewer's line of sight. For example, a flat surface will appear more reflective when viewed at a glancing angle than it will when viewed from above; and a sphere will appear more reflective around its edges than at its center.
This principle can be used to improve photorealism, but the implementation provided here is intended to produce non-realistic but aesthetically-pleasing results.
@see fresnel.
Methods
Name | Description | |
---|---|---|
clone(changedProps?: FresnelSettingsProps): FresnelSettings | Create a copy of these settings, modified to match any properties explicitly specified by changedProps . |
|
equals(rhs: FresnelSettings): boolean | Return true if these settings are equivalent to rhs . |
|
toJSON(): undefined | FresnelSettingsProps | Convert to JSON representation. | |
create(intensity: number0, invert: booleanfalse): FresnelSettings Static | Create a new FresnelSettings. | |
fromJSON(props?: FresnelSettingsProps): FresnelSettings Static | Create from JSON representation, using default values for any unspecified or undefined properties. |
Properties
Name | Type | Description | |
---|---|---|---|
intensity Readonly | number | The strength of the effect in terms of how much brighter the surface becomes. | |
invert Readonly | boolean | If true, inverts the effect's intensity such that maximum intensity is produced when the viewer's line of sight is parallel to the vector between |
Defined in
- core/common/src/LightSettings.ts Line 309
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.