forked from DingTo/OpenShadingLanguage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGES
1029 lines (927 loc) · 52.5 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Changes:
Release 1.6 -- in development (compared to 1.5)
-----------------------------------------------
Language, standard libary, and compiler changes (for shader writers):
* The "gabor" varieties of noise were found to have a serious mathematical
bug, which after fixing results in a change to the pattern. We are hoping
that they were rarely used, but beware a change in appearance. (1.6.1)
* We have clarified that shader metadata may be arrays (still not structs
or closures) and fixed the implementation to support this (in addition
to several other ways that metadata was brittle). (1.6.2)
* Spec clarification: emission() has units of radiance, so a surface
directly seen by the camera will directly reproduce the closure weight
in the final pixel, regardless of it being a surface or volume. Thus,
you don't need to weight it by PI. #427 (1.6.2)
API changes, new options, new ShadingSystem features (for renderer writers):
* New ShadingSystem attribute int "profile", if set to 1, will include
in the runtime statistics output a measure of how much total time was
spent executing shaders, as well as the identities and times of the 5
shader groups that spent the most time executing. Note that this
option is 0 (off) by default, since turning it on can add
significantly to total runtime for some scenes. #418 (1.6.2)
* New per-ShaderGroup attributes:
* You can retrieve information about all closures that an optimized group
might create using new queries "num_closures_needed", "closures_needed",
"unknown_closures_needed". This could be useful for renderers by, for
example, noticing that a material can't possibly call the "transparent"
closure, and thus concluding that it must be opaque everywhere and thus
shadow rays need not execute shaders to determine opacity. (#400) (1.6.0)
* You can retrieve information about all "globals" (P, N, etc.) that an
optimized group needs using new queries "num_globals_needed" and
"globals_needed". This could be useful for renderers for which
computing those globals is very expensive; examining which are truly
needed and only computing those. (#401) (1.6.0)
* It is now possible to specify per-group "renderer_outputs" in the form
"layername.paramname", thus designating a parameter of a specific layer
as a render output that should be preserved, but excluding identically
named output variables in other layers. #430 (1.6.2)
Performance improvements:
* Many noise() varieties have been sped up significantly on
architectures with SIMD vector instructions (such as SSE). Higher
speedups when returning vectors rather than scalars; higher speedups
when supplying derivatives as well, higher speedups the higher the
dimensionality of the domain. We're seeing 2x-3x improvement for
noise(point), depending on the specific variety, 3x-4x speedup for 4D
noise varieties. #415 #422 #423 (1.6.1, 1.6.2)
* Change many transcendental functions (sin, cos, exp, etc) to use
approximations that are must faster than the 100% correct versions in
libm. The new ones may differ from the old in the last decimal place,
which is probably undesirable if programming ICBM guidance systems,
but seems fine for rendering when the result is many times faster to
evaluate those functions. You can turn it back to the fully precise and
slow way by building with OSL_FAST_MATH=0. #413 (1.6.0)
Bug fixes and other improvements:
* oslinfo --param lets you ask for information on just one parameter of
a shader. #397 (1.6.0)
* oslc now properly catches and issues error messages if you define a struct
with duplicate field names. #398 (1.6.0)
* Some math speedups (especially those involving sqrt). (1.6.0)
* Improved detection of shader groups that optimize away to nothing. (1.6.2)
* Fix of possible (but never reported) bug with instancing merging.
#431 (1.6.2)
* Fix incorrect oslc code generation when assigining an element of an
array-of-structs to another element of array-of-structs. #432 (1.6.2)
Under the hood:
Build & test system improvements and developer goodies:
* Windows build fix for compiling shaders finding the right oslc.exe.
#399 (1.6.0/1.5.11)
* Fix thread contention issue in testshade that was making benchmarks
inaccurate. $407 (1.6.0)
* Build scripts better help messages. (1.6.0)
* Changes to build correctly against LLVM 3.5, though please note that
using LLVM 3.5 seems to require C++11. If you have C++98 toolchain, then
please continue using LLVM 3.4. #412 (1.6.0)
* testrender improvements: update the microfacet models to the latest
improved visible normal sampling technique of d'Eon & Heitz, stratified
sampling, simplification of Oren-Nayar, and speed improvements.
#425 (1.6.2)
Documentation:
* Short chapter added to spec describing the syntax of our serialization
protocol.
Release 1.5.11 -- 22 Sep 2014 (compared to 1.5.10)
--------------------------------------------------
* Windows compilations fixes for very MSVC 2013.
* Windows build fix for compiling shaders finding the right oslc.exe.
#399
* Speedup from telling gcc/clang to ignore the fact that math functions
can set errno (helps code generation of sqrtf in particular.
* Fix thread contention issue in testshade which could make it hard to
use testshade as a benchmark with many threads.
* Make it build properly with LLVM 3.5.
* Fix compiler warnings about signed/unsigned comparisons.
Release 1.5 -- Release candidate July 30, 2014 (compared to 1.4)
----------------------------------------------
Language, standard libary, and compiler changes (for shader writers):
* New closure function for microfacet BSDFs:
closure color microfacet (string distribution, normal N,
float alpha, float eta, int refract)
closure color microfacet (string distribution, normal N, vector U,
float xalpha, float yalpha, float eta, int refract)
These replace the growing zoo of microfacet_blah functions (using
different distribution values such as "beckmann" or "ggx", as well as
selecting refraction when refract!=0). The old varieties are now considered
deprecated and will eventually be removed (but will alow back-compatibility
of compiled oso files).
* Remove documentation about unimplemented hash() function -- it was never
implemented, and we can't figure out what it's good for. (#359) (1.5.7)
* Documented the specific names that should be used with getattribute() to
retrieve common camera parameters. We should expect these to be the same
for all renderers (though individual renderers may also support additional
attribute queries). #393 (1.5.9)
API changes, new options, new ShadingSystem features (for renderer writers):
* ShadingSystem API changes:
* ShadingSystem::Parameter() has a new variety that can set lockgeom=0
for a particular parameter at runtime, even if it was not declared
this way in the shader's metadata. This allows an app to effectively
say "I intend to vary this shader's parameter value, don't optimize as
if it were a a constant." (1.5.1)
* New ShadingSystem::ReParameter() lets you change the instance value of
a shader parameter after the shader group has already been declared
(but only if the shader has not yet been optimized, OR if the
parameter was declared with lockgeom=0). This, in combination with the
new SS::Parameter() variety, lets an app select a parameter for
variation, compile the shader network, and then continuously modify
the value and re-render without needing to redeclare and recompile the
shader group (though at a slightly higher execution cost than if the
parameter were fully optimized. (1.5.1)
* ShadingAttribState has been simlified and replaced with ShaderGroup.
And ShadingAttribStateRef replaced by ShaderGroupRef. (1.5.1)
* ShaderGroupBegin returns the ShaderGroupRef for the group, there is
no need to call state() to get the group reference. (1.5.1)
* New ShadingSystem::getattribute() and attribute() varieties that takes
a ShaderGroup* as a first argument, allows setting and retrieval of
attributes pertaining to a specific shader group. (#362, #368) (1.5.8)
SEE SECTION BELOW ON GROUP-SPECIFIC ATTRIBUTES
* New ShaderGroupBegin() variant takes a text description of a shader
group. (3.5.8) (#379) For example:
ShaderGroupBegin ("groupname", "surface",
"param float fin 3.14; " /*concatenate string*/
"shader a alayer;"
"shader b blayer;"
"connect alayer.f_out blayer.f_in;");
* ShadingSystem methods renderer() and texturesys() retrieve the
RendererServices and TextureSystem, respectively. (1.5.8)
* ShadingSystem statistics output now prints the version and major
runtime options. (1.5.8) (#369)
* New/changed ShadingSystem global attributes:
* Attributes "archive_groupname" and "archive_filename", when set, will
cause the named group to be fully archived into a .tar, .tar.gz, or
.zip file containing the serialized description of the group, and all
.oso files needed to reconstruct it. This is great for shipping
debugging or performance benchmark cases to the developers! It's also
a good way to "extract" a shader network from the midst of a complex
renderer and then be able to reconstitute it inside a debugging test
harness like testshade. (1.5.8) (#381) For more detail and explanation,
please see https://github.com/imageworks/OpenShadingLanguage/pull/381
* New per-ShaderGroup attributes:
* ShadingSystem::getattribute(group,...) allows queries that retrieve
all the names and types of userdata the compiled group may need
("num_userdata", "userdata_names", "userdata_types"), as well as the
names of all textures it might access and whether it's possible that
it will try to acccess textures whose names are not known without
executing the shader ("num_textures_needed", "textures_needed",
"unknown_textures_needed"). (#362) (1.5.8)
* Retrieving the group attribute "pickle" (as a string) gives you the
serialized description of the shader group in the same format that is
accepted by ShaderGroupBegin(). (1.5.8) (#381)
* Group-wise attribute "renderer_outputs" (array of strings) lets you
specify different renderer outputs for each shader group in addition
to the ShadingSystem-wide "renderer_outputs" that apply to all groups.
Remember that naming the renderer outputs prevents those from being
optimized away if they are not connected to downstream
shaders. (1.5.8) (#386)
* New group attribute queries: "groupname", "num_layers", "layer_names"
allow you to ask for the name of the group, how many layers there are,
and the names of all the layers.
* ShaderGlobals changes:
* Added a RendererServices pointer to ShaderGlobals, to eliminate a
bunch of pointless indirection during shader execution. (1.5.2)
* Split the definition of ShaderGlobals into its own header file,
shaderglobals.h. (1.5.1)
* RendererServices changes:
* RendererServices::get_texture_info method parameters have changed, now
includes an additional ShaderGlobals* parameter (as did all the other
texture functions already). (1.5.5)
* Split RendererServices definition into separate rendererservices.h. (1.5.6)
* Add RendererServices::texturesys() that returns a pointer to the
RS's TextureSystem. (1.5.6)
* Add a ShaderGlobals* parameter to the various get_matrix and
get_inverse_matrix methods. This makes it easier for renderers that
might need the ShaderGlobals (or access to the void* renderstate
contained therein) to look up matrices, especially if the renderer
supports different per-primitive transformation name bindings.
#396 (1.5.10)
* Change the last 4 RenderServices methods that took a void* renderstate
to instead take a ShaderGlobals *. It's more general, since the SG
does itself contain the renderstate pointer, and some implementations
or features might need the other contents of the SG. #396 (1.5.10)
* OSLQuery changes:
* OSLQuery::Parameter has a new 'structname' field, that for struct
parameters reveals the name of the structure type. The oslinfo utility
has also been updated to print this information. (1.5.4)
* OSLQuery now may be initialized by a ShaderGroup*, which allows an
app with a live shading system to query information about shaders
much more efficiently than reloading and parsing the .oso file from
disk. #387 (1.5.8)
* OSLQuery API has replaced most of its std::string parameters and
members with string_view and ustring, to speed it up and eliminate
lots of small allocations. This may introduce some small source
incompatibilities with the old OSLQuery, but they should be very
easy to fix in your code. #387 (1.5.8)
* Miscellaneous/general:
* Use OIIO's new string_view for many public API input parameters that
previously took a std::string& or a const char*. (1.5.7) (#361)
* De-virtualized OSLCompiler and ShadingSystem classes -- it is now safe to
construct them in the usual way, the create() and destroy() functions for
them are optional/deprecated. (#363) (1.5.8)
Performance improvements:
* Dramatically speed up LLVM optimization & JIT of small shaders --
reducing the per-shader-network compile overhead of small shaders
from 0.1-0.2s to less than 0.01s per shader group. (1.5.1)
* Runtime constant folding of substr(). (1.5.6)
* Improved code generation for texture calls, removing redundant setting
of optional texture parameters when they don't change from the default
values. (1.5.6)
* Remove lock from RendererServices texture calls that would create a big
thread botteneck (but only for renderers that used the RS base class
texture calls; those that overrode them would not notice). (1.5.6)
* Constant folding of certain assignments to individual components or
array elements. (#356) (1.5.7)
* Much more complete constant-folding of format(). (1.5.8) (#366)
* Enhanced simplification of component and array assignment, when
multiple assignments actually fill out the entire array or aggregate.
For example: 'color C; C[0] = 3.14; C[1] = 0; C[2] = 42.0;'
Now it recognizes that all components are assigned and will replace
the whole thing (and subsequent uses of C) with a constant
color. (1.5.8) (#367)
* Eliminate redundant retrieval of userdata within a shading
network. (1.5.8) (#373)
Bug fixes:
* testshade/testrender timer didn't properly break out execution time
from setup time. (1.4.1/1.5.1)
* Guard matrix*point transformations against possible division by zero.
(1.4.1/1.5.1)
* Fix subtle bug with splines taking arrays, where the number of knots
passed was less than the full length of the array, and the knots had
derivatives -- the derivatives would be looked up from the wrong spot
in the array (and could read uninitialized portions of the array).
(1.4.1/1.5.3)
* Fix incorrect function declarations for the no-bitcode case (only
affected Windows or if a site purposely built without precompiled
bitcode for llvm_ops.cpp). (1.4.1/1.5.3)
* When using Boost Wave for oslc's preprocessor, fixed it so that
variadic macros work. (1.5.4)
* Ensure that isconnected() works for struct parameters. (1.5.4)
* Fix incorrect data layout in heap for certain array parameters.
(1.5.5/1.4.2)
* oslc -D and -U did not work properly when OSL was built against
Boost Wave as the C preprocessor. (1.5.5/1.4.2)
* oslc bug fix for innitializing array elements inside a parameter that's a
struct. (1.5.6)
* Implementation of the luminance() function has been improved to
guarantee that all the components sum to exactly 1.0. (1.5.6)
* OSLQuery: for array parameters whose source code only specify default
values for partially initializing the array, nonetheless make the
default vectors be the correct length for the array (with zeroes for
array elements without explicit initialization). (1.5.6)
* oslc: negating closures resulted in hitting an assertion. (1.5.6)
* ShadingSystem - bug fix when Parameter() sets the same parameter twice
for the same instance, the second time back to the default
value. (1.5.8) (#370)
* Fix debug printing crash when group name was not set. (1.5.7)
* Bug fix with runtime optimization instance merging -- differing
"lockgeom" status of parameters should invalidate the merge. (1.5.8) (#378)
* Runtime optimizer bug fix: output parameter assignment elision was
overly aggressive when the output parameter in question was a renderer
output (and therefore should not be elided). (1.5.8) (#378)
* Fix printf("%f",whole_float_array) to work properly. (1.5.8) (#382)
* oslc improperly allowed ONE too many initializers for arrays. (1.5.8) (#383)
Under the hood:
* Internals refactor that separates the runtime optimization from the
LLVM generation and JIT. (1.5.1)
* Removed legacy built-in closures that weren't actually used. (1.5.1)
* Split all the direct calls to LLVM API into a separate LLVM_Util
class, which has no other OSL dependencies and may be used from other
apps to simpilfy use of LLVM to JIT code dynamically. (1.5.1)
* Stop using deprecated TypeDesc #defines. (1.5.4)
* A shader's printf, warning, and error output is now buffered so that
all the "console" output from a shader invocation will appear
contiguous in a log, rather than possibly line-by-line interspersed
with the output of another shader invocation running concurrently in a
different thread (1.5.5).
* By de-virtualizing OSLCompiler and ShadingSystem classes, we make it
much easier in the future to change both these classes (at least, adding
new methods) and changing the Impl internals, without breaking link
compatibility within release branches. (#363) (1.5.8)
* Eliminate the need for a special dlopen when using OSL from within
a DSO/DLL plugin of another app. (1.5.8) (#374, #384)
Build & test system improvements and developer goodies:
* Make OSL work with LLVM 3.4 (1.5.4)
* New llvm_util.h contains an LLVM_Util standalone utility class that can
be used from any app as a simplified wrapper for LLVM code generation
and JIT. (1.5.1)
* testshade consolidates --iparam, --fparam, --vparam, --sparam into
just --param that figures out the types (or could be explicitly
told. (1.5.1)
* More robust detection of clang, for older cmake versions.
(1.4.1/1.5.1)
* Handle 3-part version numbers for LLVM installations. (1.4.1/1.5.1)
* Fix USE_EXTERNAL_PUGIXML versus USING_OIIO_PUGI issue. (1.4.1/1.5.3)
* Remove all ehader include guards, switch to '#pragma once' (1.5.2)
* Adjust build to account for new library names in OpenEXR 2.1. (1.5.3)
* Make sure we include all OpenEXR and Ilmbase headers with <OpenEXR/foo.h>
and remove the addition of OpenEXR sub-folder from system search paths.
(1.5.1)
* Better detection of LLVM version number from the LLVM installation.
(1.5.1)
* Support for using LLVM's "MCJIT" instead of "old JIT" (controlled by
using the optional 'make USE_MCJIT=1'). This is mostly experimental,
and not recommended since performance of old JIT is still much better
than MCJIT. (1.5.6) Fixes in (1.5.8) (#385)
* Moved the source of all public header files to src/include/OSL, to more
closely mimic the install file layout. (1.5.6)
* Fixes for compilation warnings with newer gcc. (1.5.7) (#351)
* Fixes for IlmBase 2.1 build breakages. (#354) (1.5.7)
* Make testshade multithreaded, so it's always exercising the thread
safety of the shading system. (1.5.8) (#365)
* Compatibility with cmake 3.0. (1.5.8) (#377)
* Fix warnings with some gcc versions. (1.5.8)
* Make testrender accept the new shadergroup syntax. (1.5.9)
* Make testrender & testshade support all the standard camera getattribute
queries. (1.5.9)
* testshade/testrender: have get_attribute fall back on get_userdata,
and have get_userdata bind "s" and "t" to make it easy to test
shader that rely on userdata. #395 (1.5.10)
* Fixes for Boost 1.55 + Linux combination, where it needed -lrt on the
link line. #394 (1.5.10)
* Windows build fix for compiling shaders finding the right oslc.exe.
#399 (1.5.11)
Documentation:
* Clarified docs about floor(). (1.5.8)
* Clarified that oren_nayar() is the name of the function, not
orennayar (it was not consistent). (1.5.8) (#375)
* backfacing() was previously left out of the docs. (1.5.8) (#376)
* Documented the specific names that should be used with getattribute() to
retrieve common camera parameters. We should expect these to be the same
for all renderers (though individual renderers may also support additional
attribute queries). #393 (1.5.9)
* Clarify that we intend for getattribute() to be able to retrieve
"userdata" (aka primitive variables) if no attribute is found with the
matching name. #395 (1.5.10)
Release 1.4.1 - 19 Dec 2013 (compared to 1.4.0)
-----------------------------------------------
* Guard matrix*point transformations against possible division by zero.
* Fix subtle bug with splines taking arrays, where the number of knots
passed was less than the full length of the array, and the knots had
derivatives -- the derivatives would be looked up from the wrong spot
in the array (and could read uninitialized portions of the array).
* testshade/testrender - Fix timer call that wasn't correctly reporting
execution time versus total time.
* Fix incorrect function declarations for the no-bitcode case (only
affected Windows or if a site purposely built without precompiled
bitcode for llvm_ops.cpp).
* Build: more robust detection of clang, for older cmake versions.
* Build: handle 3-part version numbers for LLVM installations.
* Build: Fix USE_EXTERNAL_PUGIXML versus USING_OIIO_PUGI issue.
Release 1.4.0 - 12 November 2013 (compared to 1.3)
--------------------------------------------------
Language, standard libary, and compiler changes (for shader writers):
* Simplex noise: new noise varieties "simplex" and "usimplex" are
faster than Perlin noise (and MUCH faster for the 4-D variety),
but has a somewhat different appearance. Judge for yourself, use
whichever noise suits your purpose.
* oslc now catches mismatches between the format string and the types
of arguments to format(), printf(), fprintf(), warning(), and error().
* oslc now gives a compile error when trying to use a function as
if it were an ordinary variable. (1.3.2)
* Improvement to oslc function type checking -- allow more nuanced
matching of polymorphism based on return types. First we check for
identical return types, then we test allowing non-identical spatial
triples to match, then finally we allow any return type to match.
* New ShadingSystem attribute "debug_uninit", which when set to nonzero
tries to detect use of uninitialized variables at runtime. (Off by
default because it's very expensive, just use if you are debugging.)
* Implemented the OSL aastep() function, which was always described in
the docs but never implemented.
* The texture lookup functions all take new optional parameters,
"missingtexture", (color), "missingalpha", (float), which when supplied
will substitute that color and alpha for missing or broken textures,
rather than treating it as an error condition.
* New gettextureinfo() queries: "datawindow", "displaywindow" (both take
an int[4] as destination argument).
ShadingSystem API changes and new options (for renderer writers):
* New ShadingSystem attribute "renderer_outputs" enumerates the renderer
outputs (AOVs) explicitly, so that elision of unused outputs can be done
with full understanding of which params will or will not be sued.
Beware: if you enable "opt_elide_unconnected_outputs", you MUST pass
"renderer_outputs" or your AOVs may be eliminated!
Performance improvements:
* "Middleman" optimization notices when you have 3 layers A,B,C with
connections A.Aout -> B.Bin and B.Bout -> C.Cin, an Bout is simply
copied unconditionally from Bin. In this case, Aout is connected
directly to Cin, potentially leading to further optimizations, including
layer B getting culled entirely.
* Layer-to-layer global propagation: Notice cases where an upstream
output is guaranteed to be aassigned a global variable (such as N or u)
and then alias the downstream parameter to that global (eliminating
the connection and possibly culling the upstream layer entirely).
* Improve constant propagation from layer to layer (it used to do so only
if the output of the earlier layer was never used in the upstream layer;
but actually it's ok for it to be read, as long as it's not rewritten).
* Runtime constant-folding of cellnoise() calls.
* Local variables that are arrays initialized with float, int, or string
constants have been greatly optimized. If that's the only time anything
is written into the array, it will be turned into a true static constant
with no per-shader-invocation initialization or allocation costs.
Thus, it is no longer expensive to use a large array of constants as a
table... it may look like a per-shade cost to set up the array, but by
the time the optimizer gets done with it, it is not.
* Improved runtime constant-folding of max/min (now works for the integer
case, as well as previously working for the float-based types).
* Runtime constant-folding of cos, sin, acos, asin, normalize, inversesqrt,
exp, exp2, expm1, log, log2, log10, logb, erf, erfc, radians, degrees.
* Optimization that speeds up certain closure manipulations and can
cut overhead especially for relatively simple shaders.
* New peephole optimizations for two common patterns:
(1) add A B C ; sub D A C => [add A B C;] assign D B
and the same if the order of add & sub are switched.
(2) OP A B... ; assign A C => OP C B... as long as A is not subsequently
used and OP fully overwrites A and writes to no other variables.
* Constant folding of Dx, Dy, Dz, area, and filterwidth, when passed a
constant (the deriv will be 0 in that case).
* Substantial multithread speedups by eliminating testing of some shared
variables.
* Constant folding of add & sub for the mixed float/triple cases.
* Speed up closure construction by combining the closure primitive with
its (nearly inevitable) multiplication by weight, into a single internal
operation.
* The OSLQuery library has been sped up by 20x when querying the parameters
of large shaders.
Bug fixes:
* Fix 'debugnan' tendency to give false positives for certain assignments
to arrays and multi-component variables (colors, points, etc.).
* The integer versions of min(), max(), and clamp() were not working
properly. (1.3.1)
* fmod(triple,triple,float) was not working properly in Windows. (1.3.2)
* Avoid incorrect heap addressing when retrieving a symbol's address. (1.3.2)
* Fix for a bug where an early 'return' from a shader could lead to
output parameters not being properly copied to the inputs of their
downstream connections. (1.3.2)
* Fix bug where filterwidth() didn't properly mark itself as needing
derivatives of its argument. (1.3.2)
* Bug fix: Was not properly initializing the default values of output
params if they were written but never subsequently read.
* Better error handling for missing pointclouds.
* Fixed improper initialization of arrays of closures.
* Fixed constant folding bug for the split() function.
* Fixed constant folding bug for pow(x,2.0).
Under the hood:
* Eliminate use of custom DEBUG preprocessor symbol in favor of the more
standard NDEBUG (beware: its sense is reversed).
* All references to and vestiges of TBB have been removed.
Build & test system improvements and developer goodies:
* testshade: --options lets you set arbitrary options to the ShadingSystem
for test runs.
* Added CMake option 'ENABLERTTI' that enables use of RTTI for sites that
must link against an RTTI-enabled LLVM (the default is to assume LLVM
is built without RTTI, so we don't use it either). (1.3.1)
* Fix some ambiguity about which variety of shared_ptr we are using --
this could produce problems in apps that include the OSL headers but also
use different shared_ptr varieties.
* Fix a variety of build issues and warnings under Windows.
* Work around CMake bug where on some platforms, CMake doesn't define the
'NDEBUG' when making the 'RelWithDebInfo' target (which is sometimes
used for profiling). (1.3.1)
* Add Make/CMake option 'USE_EXTERNAL_PUGIXML' which if set to nonzero
will find and use a system-installed PugiXML rather than assuming that
it's included in libOpenImageIO. When used, it will also use the
environment variable PUGIXML_HOME (if set) as a hint for where to find
it, in case it's not in a usual system library directory. (1.3.1)
* Nicer debug printing (for developers) when an op doesn't have an
associated source line. (1.3.2)
* Reorder include directories for building LLVM bitcode so that the
openimageio, ilmbase and boost directories are ahead of any system
directories given by llvm-config --cxxflags. This avoids the LLVM
bitcode getting compiled against different library versions than the
rest of the code if multiple versions are installed.
* Have debug_groupname and debug_layername apply to LLVM debugging info
as well.
* Support for LLVM 3.3.
* Fix compiler warnings for clang 3.3 and libc++.
* CMake files now more carefully quote assembled file paths to more
gracefully handle paths with spaces in them.
* CMakeLists.txt has been moved to the top level (not in src/) to conform
to the usual CMake conventions.
Documentation:
* Eliminate references to OSL random() function; it was never
implemented and nobody seemed to miss it or have a compelling use
case. (1.3.1)
Release 1.3.3 - 11 July 2013 (compared to 1.3.2)
------------------------------------------------
* Fix bug in the implementation of filterwidth() when passed a constant
(for which no derivative could be taken).
* Changes to support LLVM 3.3.
Release 1.3.2 - 19 Jun 2013 (compared to 1.3.1)
-----------------------------------------------
* fmod(triple,triple,float) was not working properly in Windows.
* Nicer debug printing (for developers) when an op doesn't have an
associated source line.
* Avoid incorrect heap addressing when retrieving a symbol's address.
* oslc new gives a compile error when trying to use a function as
if it were an ordinary variable.
* Fix for a bug where an early 'return' from a shader could lead to
output parameters not being properly copied to the inputs of their
downstream connections.
* Fix bug where filterwidth() didn't properly mark itself as needing
derivatives of its argument.
Release 1.3.1 - 15 May 2013 (compared to 1.3.0)
-----------------------------------------------
* The integer versions of min(), max(), and clamp() were not working
properly.
* Added CMake option 'ENABLERTTI' that enables use of RTTI for sites that
must link against an RTTI-enabled LLVM (the default is to assume LLVM
is built without RTTI, so we don't use it either).
* Work around CMake bug where on some platforms, CMake doesn't define the
'NDEBUG' when making the 'RelWithDebInfo' target (which is sometimes
used for profiling).
* Docs: Eliminated discussion of random(), which was never implemented
and we can't think of a good use case.
* Add Make/CMake option 'USE_EXTERNAL_PUGIXML' which if set to nonzero
will find and use a system-installed PugiXML rather than assuming that
it's included in libOpenImageIO. When used, it will also use the
environment variable PUGIXML_HOME (if set) as a hint for where to find
it, in case it's not in a usual system library directory.
Release 1.3.0 - 14 Feb 2013 (compared to 1.2)
----------------------------------------------
Language, standard libary, and compiler changes (for shader writers):
* pointcloud_write() allows shaders to write data and save it as a point
cloud.
* spline now accepts a "constant" interpolation type, which interpolates
with discrete steps.
* isconnected(var) returns true if var is a shader parameter and is
connected to an earlier layer. This is helpful in having shader logic
that can discern between a connected parameter versus a default.
* Whole-array assignment is now supported. That is, if A and B are arrays
of the same type and length(A) >= length(B), it is legal to write
A=B without needing to write a loop to copy each element separately.
* stoi() and stof() convert strings to int or float types, respectively
(just like the identically-named functions in C++11). These do properly
constant-fold during runtime optimization if their inputs can be deduced.
* split() splits a string into tokens and stores them in the elements of an
array of strings (and does constant-fold!).
* distance(point A, point B, point Q) gives the distance from Q to the
line segment joining A and B. This was described by the OSL spec all
along, but somehow was not properly implemented.
ShadingSystem API changes and new options (for renderer writers):
* Default implementation of all the pointcloud_*() functions in
RendererServices, if Partio is found at build time.
* ShadingSystem attribute "compile_report" controls whether information
should be sent to the renderer for each shading group as it compiles.
(The default is now to be more silent, set this to nonzero if you want
to see the old per-group status messages.)
* ShadingSystem attribute "countlayerexecs" adds debugging code to count
the total number of shader layer executions (off by default; it slows
shader execution down slightly, is only meant for debugging).
* Add a parameter to OSLCompiler::compile to specify the path to the
stdosl.h file.
* New call: ShadingSystem::LoadMemoryCompiledShader() loads a shader with
OSO data from a memory buffer, rather than from a file.
Performance improvements:
* Reduce instance symbol memory use, lowering OSL-related memory by 1/2-2/3
for large scenes.
* Identical shader instances within a shader group are automatically
merged -- this can have substiantial performance and memory
improvements for very complex shader groups that may (inadvertently,
for convenience, or as an artifact of certain lookdev tools) have
multiple instances with identical input parameters and connections.
We have seen some shots that render up to 20% faster with this change.
* Better constant-folding for pointcloud_get (if indices are known).
* Speed up implementation of exp() for some Linux platform (works around
a known glibc issue).
* Speed up of mix() by making it a built-in function (rather than defined
in stdosl.h) and doing aggressive constant folding on it. Also some special
cases to try to avoid having mix() unnecessarily trigger execution of
earlier layers when one or both of its arguments is a connected shader
param and the mix value turns out to be 0 or 1.
* Runtime optimization now includes constant-folding of getattribute()
calls, for those attributes which are scene-wide (such as renderer options
that apply to the whole frame).
* Improvements in the algorithm that tracks which symbols need to carry
derivatives around results in MUCH faster compile times for extremely
complex shaders.
* Improve bad performance for shaders that call warning() prolifically, by
imposing a maximum number of shader warnings that are echoed back to the
renderer (controlled by ShadingSystem attribute "max_warnings_per_thread",
which defaults to 100; 0 means that there is no maximum).
Bug fixes and minor improvements:
* Fix incorrect oso output of matrix parameter initialization. (This did
not affect shader execution, but could result in oslquery/oslinfo not
reporting default matrix parameter values correctly.)
* Bug fix: oslinfo didn't print int metadata values properly.
* oslc better error checking when calling a variable as if it were a
function.
* Parsing of oso files was broken for compiled shaders that had string
metadata whose metadata value contained the '}' character.
* Pointcloud function bug fixes: now robust to being passed empty filenames,
or calling pointcloud_get when count=0.
* Fix crash with C preprocessor when #include fails or no shader function
is defined.
* Improve error reporting when parsing oso, especially in improving the
error messages when an old renderer tries to load a .oso file created by
a "newer" oslc, and the oso contains new instruction opcodes that the
older renderer didn't know about.
* oslc now gives a helpful error message, rather than hitting an assertion,
if you try to index into a non-array or non-component type.
* Broken "XYZ" color space transformations because of confusion between
"xyz" and "XYZ" names.
* oslc: correctly catch errors with integer literals that overflow.
* oslc: proper error, rather than assertion, for
'closure color * closure color'.
* oslc: proper handling of preprocessor errors when stdosl.h is in a path
containing spaces.
* Fix bugs in the OSL exit() function.
* Don't error/warn if metadata name masks a global scope name.
Under the hood:
* Simplify code generation of binary ops involving closures.
Build & test system improvements and developer goodies:
* Many, many fixes to enable building and correct running of OSL on
Windows. Too many to list individually, let's just say that OSL 1.3
builds and runs pretty robustly on Windows, older versions did not.
* Remove unused OpenGL and GLEW searching from CMake files.
* Fix a variety of compiler warnings, particularly on newer compilers,
32 bit platforms, and Windows.
* Find LLVM correctly even when using "svn" LLVM versions.
* Adjust failure threshold on some tests to account for minor platform
differences.
* New minimum OIIO version: 1.1.
* CMake fixes: Simplify searching for and using IlmBase, and remove
unneeded search for OpenEXR.
* Find Partio (automatically, or using 'make PARTIO_HOME=...'), and if
found, use it to provide default RendererServices implementations of
all the pointcloud-related functions.
* Make/CMake STOP_ON_WARNING flag (set to 0 or 1) controls whether the
build will stop upon any compiler warning (default) or if it should
keep going (=0).
* Fixed bad interaction between weave preprocessor, OIIO::Strutil::format,
and gcc 4.7.2.
* Fixes for static linkage of liboslcomp.
* Addressed compilation errors on g++ 4.7.2.
* Improved logic and error reporting for finding OpenImageIO at build time.
* Add support for linking to static LLVM libraries, and for specifying
a particular LLVM version to be used.
* New BUILDSTATIC option for CMake/Make allows building of static OSL
libraries.
* Fixes to allow OSL to use LLVM 3.2.
* Fixes to allow OSL to be compiled by clang 3.2.
* Fixes to allow building on Windows with MinGW.
* Fix for building from a chroot where the host may be, e.g., 64 bit, but
the target is 32 bit.
* Minimize cmake output clutter for things that aren't errors, unless
VERBOSE=1.
* Various fixes to get OSL building and running on FreeBSD.
* Cmake/make option USE_LLVM_BITCODE to be able to force LLVM bitcode
compilation on or off (defaults to on for Windows, off for Unix/Linux).
Documentation:
* Clarify that documentation is licensed under Creative Commons 3.0 BY.
* Clean up OSL Spec discussion of built-in material closures.
* Overhaul the suggested metadata conventions in the OSL spec (now
conforms to the conventions used by Katana).
Release 1.2.1 - 6 Nov, 2012 (compared to 1.2.0)
-----------------------------------------------
* Fix incorrect oso output of matrix parameter initialization. (This did
not affect shader execution, but could result in oslquery/oslinfo not
reporting default matrix parameter values correctly.)
* Build: remove unused OpenGL and GLEW searching from CMake files.
* Build: Fix a variety of compiler warnings, particularly on newer compilers,
32 bit platforms, and Windows.
* Build: Find LLVM correctly even when using "svn" LLVM versions.
* Bug fix: oslinfo didn't print int metadata values properly.
Release 1.2.0 - Aug 30, 2012 (compared to 1.1)
----------------------------------------------
Note: this is more or less the production-hardened version of OSL that
was used to complete Men in Black 3, The Amazing Spider-Man, and Hotel
Transylvania.
New tools/utilities:
* New program "testrender" is a tiny ray-tracing renderer that uses OSL
for shading. Features are very minimal (only spheres are permitted at
this time) and there has been no attention to performance, but it
demonstrates how the OSL libraries may be integrated into a working
renderer, what interfaces the renderer needs to supply, and how the
BSDFs/radiance closures should be evaluated and integrated (including
with multiple importance sampling).
* shaders/ubersurface.osl is an example of a general purpose surface
shader.
Language, standard libary, and compiler changes:
* texture()/texture3d() support for subimage/face selection by name as
well as by numeric index.
* getattribute() performs automatic type conversions that mostly
correspond to the kind of automatic type casting you would get from
ordinary assignments in OSL. For example, getattribute("attrib",mycolor)
used to fail if "attrib" turned out to be a float rather than a color;
but now it succeeds and copies the float value to all three channels
of mycolor.
ShadingSystem API changes and new options:
* Remove unused 'size' parameter from the register_closure API.
Optimization improvements:
* Constant-fold pointcloud_search calls when the position is a constant if
the search returns few enough results, by doing the query at optimization
time and putting the results into new constant arrays.
* Matrix parameters initialized by m=matrix(constA,constB,...) now
statically initialize, and no longer need to run initialization code
each time the shader executes.
Bug fixes and minor improvements:
* Fix pointcloud_search to optionally take a 'sort' parameter, as
originally documented.
* Unit tests weren't properly run as part of the testsuite.
* Track local+temp memory usage of optimized shaders and consider it an
error if a shader needs more than a maximum amount at runtime, set with
the "max_local_mem_KB" attribute.
* Add pointcloud statistics.
* Fix derivative error for sincos() when the inputs have no derivatives but
the outputs do.
* Bug fix to vector-returning Gabor noise (it could previously generate
different values for different platforms).
* printf() of closures built from other closures allows for proper
recursive printing of the closure tree.
Build & test system improvements and developer goodies:
* Simplify the namespace scheme.
* Remove support for certain old dependencies: OIIO versions < 0.10,
LLVM < 3.0, and Boost < 1.40.
* Lots of little fixes to solve compiler warnings on various compilers.
* Support for newer OSX releases, particularly if /usr/bin/cpp-4.2 is not
found.
* Better support for Boost::wave (portable C preprocessor replacement).
Build with 'make USE_BOOST_WAVE=1' to force Wave use instead of system
cpp.
* You can select a custom LLVM namespace with 'make LLVM_NAMESPACE=...'.
* Symbols that are not part of the OSL public APIs are now hidden from the
linker in Linux/OSX if the CMake variable HIDE_SYMBOLS is on.
* New Makefile/CMake option LLVM_STATIC can be used to use static LLVM
libraries rather than the default dynamic libraries.
* Support for LLVM 3.1.
* Support for building with Clang 3.1 (lots of warning fixes).
* Makefile/CMake variable EXTRA_CPP_DEFINITIONS allows you to inject
additional compiler flags that you may need to customize the build for
your site or a choice of unusual compiler.
* Add support for 'PROFILE=1' builds that are appropriate for use with
a profile.
Release 1.1.0 - Mar 14, 2012 (compared to 1.0.0)
------------------------------------------------
Language, standard libary, and compiler changes:
* Allow closures as parameters to closures.
* New constants: M_2PI, M_4PI
* Generic noise: noise("noisetype",coords,...)
* Gabor noise (anisotropic, automatically antialiased) via noise("gabor").
* Fix mod/fmod discrepancy: fmod() now matches C, mod() always returns a
positive result like in RSL.
* Allow "if (closure): and "if (!closure)" to test if a closure is empty
or not.
* New optional parameter to trace(): "traceset" allows you to specify a
named geometry set for tracing.
ShadingSystem API changes and new options:
* New "greedyjit" option will optimize & JIT all shader groups up front,
concurrently, without locking.
* Add a way to name shader groups.
* attribute("options",...) lets you set a bunch of options at once.
* Options to enable/disable individual optimizations (mostly useful for
debugging)
Optimization improvements:
* Allow block alias tracking on non-constants when it's safe.
* Track "stale" values to eliminate pointless assignments.
* Eliminate redundant "useparam" ops.
* Assignments to output parameters that are not connected to any
downstream layers are now eliminated.
* More aggressive elision of ops that only write to symbols that won't
be subsequently used.
* More careful identification and removal of parameters (input and output)
that are both unused in the shader and not connected downstream.
Bug fixes and minor improvements:
* Minor blackbody fixes.
* Bug fix: don't mark constants as having their derivatives taken.
* Clamp splineinverse() for out-of-knot-range x input.
* Bug fix: the optimization of "a=b; a=c" was incorrect if c was an
alias for a (it incorrectly eliminated the first assignment).
* Bug fix: work around LLVM thread safety issues during JIT.
* Bug fix: symbol_data() wasn't returning the right address for non-heap
parameters.
* Bug fix: optimization errors related to break, continue, and return not
properly marking the next instruction as a new basic block.
* Bug fix: luminance() with derivatives didn't work.
* Bug fix: in code generation of structure initializers.
* Improved error messages from ConnectShaders.
* Bug fix: type checking bug could case non-exactly-matching polymorphic
functions to coerce a return value even when that was not intended.
* Type checking improvements: Make sure point-point is a vector
expression, and point+vector & point-vector are point expressions.
Build & test system improvements and developer goodies:
* testsuite overhauls:
- run each test both optimized and not
- generate all tests in build, not directly in ./testsuite
- greatly simplify the run.py scripts
* Much more detailed debugging logs of the optimization process.
* Upgrade to clang/llvm 3.0.
* Lots of infrastructure to make debugging the optimizer easier.
Including new options debug_groupname, debug_layername, only_groupname.
* Improved the build system's LLVM-finding logic.
* Fix warnings from gcc 4.6.
Release 1.0.0 - Oct 12, 2011
----------------------------
* Modified testshade (and the underlying SimpleRender class) to handle
several standard named coordinate systems such as "camera", "screen",
"NDC", "raster."
* blackbody() and wavelength_color().
* New ShadingSystem configuration attribute: "colorspace" lets you explain
to OSL what RGB really means (e.g., "Rec709", "sRGB", "NTSC", etc.).
The luminance(), blackbody(), wavelength_color, and conversion to/from
XYZ now takes this into account correctly.
* rotate() (always in spec, never implemented)
Release 0.6.2 - Sept 29, 2011
-----------------------------
* Statistics overhaul -- added optimization stats, eliminated unused ones.
* Allow a shader parameter to mask a global built-in function with
only a warning, and improve scope conflict errors by pointing out the
file and line of the previous definition.
* Altered the RendererServices API to add transform_points() method, which
allows renderers to support nonlinear transformations (i.e., those that
are not expressible as a 4x4 matrix).
* Issue a renderer error when unknown coordinate system names are used
(can be turned of by setting the new ShadingSystem attribute
"unknown_coordsys_error" to false).
* New OSL built-in function: splineinverse().
Release 0.6.1 - Sept 20, 2011
-----------------------------
* Be more aggressive in freeing shader instance memory that's no longer
needed after optimization and LLVM JIT. This greatly reduces
OSL-related memory consumption for scenes with large numbers of very
complicated shading networks.
* Add Dz() which is helpful for apps that use OSL to shade volumes. At
present, we only correctly compute Dz(P), all other Dz() queries
return 0.
* Additional statistics on how many instances and groups compile, and
how many are empty after all optimizations are performed.
* Make sure all the relevant statistics can be queried via
ShadingSystem::getattribute.
Release 0.6.0 - Sept 9, 2011
----------------------------
* ShadeExec API overhaul -- an app using it no longer needs
ShadingSystemImpl internal knowledge.
* Thread-parallel runtime optimization and LLVM JIT of different shader
groups.
* Optimizations: runtime constant folding of arraylength and regex_search,
new instruction 'arraycopy' will copy an entire array at once.
* Renamed patterns.h to oslutil.h.
* Do not generate unnecessary code when optional texture parameters are set
to their default values.
* Restore long-lost ability for layers to run unconditionally (not lazily)
if they were marked as "non-lazy" (for example, if they write to globals.
* Make the "debugnan" attribute work again -- when turned on, code will
be inserted after every op to be sure that no NaN or Inf values are
generated, and also verify that shader inputs (globals) don't have NaN
or Inf values passed in by the renderer. A similar facility existed a
long time ago, but we lost that functionality when we switched from
the interpreter to LLVM.
* Looks for release versions of LLVM-2.9 (allows using a Macports LLVM
installation).
Release 0.5.4 - Jul 21, 2011
----------------------------
* Several fixes related to arrays of structs, and structs containing
other structs.
* Fixed arrays of closures.
* Removed support for old LLVM 2.7, nobody seemed to be using it any more.
* Changed the definition of dict_find() to return -1 for an invalid
dictionary, to distinguish it from 0 meaning that the query failed but
the dictionary itself was valid.
* Make array parameters safe to convert to constants during runtime
optimization.
* Support derivatives in pointcloud searches.
* Fixed several runtime optimizer bugs.
* Fixed a bug where environment() calls with an optional "alpha" parameter
that has derivatives was overwriting memory.
* Fixed code generation bug for a*=b and a/=b.
* Automatically initialize all local string variables to NULL, to avoid
bad pointers for uninitialized strings.
* Bug fix: dict_value() wasn't properly marking its argument as writable.
* Automatic range checking of array and component access.
* Fix uninitialized derivatives for pointcloud().
* Speed up getattribute() calls by caching information about failed
getattribute queries in the ShadingContext.
* Fix to constant folding of gettextureinfo: a failed lookup should not
fold, because we want the error to occur in shader execution, not during
optimization.
* Refactor, clean up, and comment testshade.
* oslc now gives an error on non-void functions that fail to return a value.
* Fixed implementation of area() that could generate an assertion.
* Fix escape sequences in string literals: we were handling it correctly
for printf-like format strings, but not other string literals.
* break and continue now work properly (just like in C/C++).
* You can now return from anywhere in a user function (multiple times if
you want), just like C/C++, and are no longer restricted to the only
return statement being the last statement of the function.
* New include file for shaders: patterns.h. Now, it only includes a handy
'wireframe()' function, but will expand for other useful things.
* New function: int getmatrix(from,to,M) is like the matrix(from,to)
constructor, but returns a success value so a shader can tell if the
named coordinate systems failed to be found by the renderer.