02_user_tutorials:20_light:01_first_steps:04_light-modeling-light-shader
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| 02_user_tutorials:20_light:01_first_steps:04_light-modeling-light-shader [2026/03/20 16:22] – Tim | 02_user_tutorials:20_light:01_first_steps:04_light-modeling-light-shader [2026/11/13 04:39] (current) – MH | ||
|---|---|---|---|
| Line 111: | Line 111: | ||
| * **setEmissive** | * **setEmissive** | ||
| * **setInterpolatedTransparency** switch to turn on or off the interpolation of transmitted radiation | * **setInterpolatedTransparency** switch to turn on or off the interpolation of transmitted radiation | ||
| + | |||
| + | |||
| + | Note: setDiffuse, setSpecular, | ||
| + | setShininess is not an energy fraction. It controls how concentrated the specular highlight is: higher values produce a sharper highlight. | ||
| + | |||
| + | With the default interpolatedTransparency = true, GroIMP multiplies both reflection channels by the non-transmitted fraction: | ||
| + | |||
| + | effectiveDiffuse = diffuse × (1 − transparency) | ||
| + | |||
| + | effectiveSpecular = specular × (1 − transparency) | ||
| + | |||
| + | For example, with diffuse 0.6, specular 0.2, and transparency 0.5, the effective diffuse and specular contributions become 0.3 and 0.1. So transparency does not change the settings; it reduces how much of each reflection contribution is used. This is calculated per colour channel. The diffuse colour’s alpha and Fresnel reflection add further detail to the final result. | ||
| Alternatively, | Alternatively, | ||
| Line 122: | Line 134: | ||
| {{ : | {{ : | ||
| - | Note: In modern Phong shader implementations, | ||
| === Common Shader Definitions === | === Common Shader Definitions === | ||
02_user_tutorials/20_light/01_first_steps/04_light-modeling-light-shader.txt · Last modified: by MH
