mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
Update osl.html.markdown
This commit is contained in:
parent
ce2db25b7e
commit
12c079a122
@ -326,6 +326,10 @@ volume multiply(float a = 0.0, float b = 0.0, output float c = 0.0){
|
||||
color c = r.rgb; // Read from a structure field
|
||||
|
||||
// 12. closure
|
||||
// Used to store data that aren't considered during Shader's execution
|
||||
// Can't be manipulated, nor read
|
||||
// A null closure can always be assigned
|
||||
closure color(255,255,255);
|
||||
|
||||
// Global Variables
|
||||
// Contains info that the renderer knows
|
||||
@ -402,5 +406,18 @@ for (int i = 0; i < 5; i += 1) {
|
||||
/* Computes the Reflection (R) and Transmission (T) vectors, along with the
|
||||
scaling factors for reflected (Kr) and transmitted (Kt) light. */
|
||||
|
||||
// Rotating a point along a given axis
|
||||
point rotate (point Q, float angle, vector axis)
|
||||
// Rotating a point along a line made by 2 points
|
||||
point rotate (point Q, float angle, point P0, point P1)
|
||||
// Transforming units is easy
|
||||
float transformu ("cm", float x) // converts to cm
|
||||
float transformu ("cm", "m", float y) // converts cm to m
|
||||
|
||||
// Displacement Functions
|
||||
void displace (float 5); // Displace by 5 amp units
|
||||
void bump (float 10); // Bump by 10 amp units
|
||||
|
||||
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user