Skip to content

Commit

Permalink
use Makie.automatic in lighting docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Jan 8, 2024
1 parent 182c3fa commit dae619c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MakieCore/src/basic_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ end
"""
### 3D shading attributes
- `shading = automatic` sets the lighting algorithm used. Options are `NoShading` (no lighting), `FastShading` (AmbientLight + PointLight) or `MultiLightShading` (Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
- `shading = Makie.automatic` sets the lighting algorithm used. Options are `NoShading` (no lighting), `FastShading` (AmbientLight + PointLight) or `MultiLightShading` (Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
- `diffuse::Vec3f = Vec3f(1.0)` sets how strongly the red, green and blue channel react to diffuse (scattered) light.
- `specular::Vec3f = Vec3f(0.4)` sets how strongly the object reflects light in the red, green and blue channels.
- `shininess::Real = 32.0` sets how sharp the reflection is.
Expand Down
1 change: 1 addition & 0 deletions docs/reference/scene/lighting.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The possible options for `shading` are:
- `shading = NoShading` disables light calculations, resulting in the plain color of an object being shown.
- `shading = FastShading` enables a simplified lighting model which only allows for one `AmbientLight` and one `DirectionalLight`.
- `shading = MultiLightShading` is a GLMakie exclusive option which enables multiple light sources (as set in the `ScreenConfig`, default up to 64) as well as `PointLight` and `SpotLight`.
- `shading = Makie.automatic` derive one of the above options based on the lights in `scene.lights`

!!! note
You can access the underlying scene of an `Axis3` with `ax.scene`.
Expand Down
2 changes: 1 addition & 1 deletion src/lighting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function default_shading!(plot, lights::Vector{<: AbstractLight})
else
shading = automatic
end
@warn "`shading = $prev` is not valid. Use `automatic`, `NoShading`, `FastShading` or `MultiLightShading`. Defaulting to `$shading`."
@warn "`shading = $prev` is not valid. Use `Makie.automatic`, `NoShading`, `FastShading` or `MultiLightShading`. Defaulting to `$shading`."
end

# automatic conversion
Expand Down

0 comments on commit dae619c

Please sign in to comment.