-
Notifications
You must be signed in to change notification settings - Fork 32
/
jiBubbles.oso
executable file
·90 lines (90 loc) · 4.04 KB
/
jiBubbles.oso
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
OpenShadingLanguage 1.00
# Compiled by oslc 1.7.4.pixar38bde12
# options:
shader jiBubbles
param color Position 0 0 0 %read{0,0} %write{2147483647,-1}
param point offset 0 0 0 %read{0,0} %write{2147483647,-1}
param int seed 0 %read{5,10} %write{2147483647,-1}
param int maxNum 10 %read{4,4} %write{2147483647,-1}
param float minSize 0.5 %read{13,16} %write{2147483647,-1}
param float maxSize 1.5 %read{13,13} %write{2147483647,-1}
param float gamma 1 %read{22,22} %write{2147483647,-1}
param point spread 1 1 1 %read{7,8} %write{2147483647,-1}
oparam color outRGB 0 0 0 %read{2147483647,-1} %write{4,26}
local color Pos %read{4,26} %write{0,0}
local float bubbles %read{4,26} %write{1,26}
local float ___305_i %read{4,26} %write{3,26}
local color ___306_randPos %read{4,26} %write{4,26}
local float ___306_randSize %read{4,26} %write{4,26}
const int $const1 0 %read{1,1} %write{2147483647,-1}
const float $const2 0 %read{3,21} %write{2147483647,-1}
temp int $tmp1 %read{2,26} %write{3,26}
temp color $tmp2 %read{4,26} %write{4,26}
temp float $tmp3 %read{4,26} %write{4,26}
temp color $tmp4 %read{4,26} %write{4,26}
temp point $tmp5 %read{4,26} %write{4,26}
const float $const4 2 %read{8,8} %write{2147483647,-1}
temp float $tmp6 %read{4,26} %write{4,26}
const int $const5 847 %read{10,10} %write{2147483647,-1}
temp int $tmp7 %read{4,26} %write{4,26}
temp float $tmp8 %read{4,26} %write{4,26}
temp float $tmp9 %read{4,26} %write{4,26}
temp float $tmp10 %read{4,26} %write{4,26}
temp float $tmp11 %read{4,26} %write{4,26}
const float $const7 1 %read{15,26} %write{2147483647,-1}
temp float $tmp12 %read{4,26} %write{4,26}
temp float $tmp13 %read{4,26} %write{4,26}
temp float $tmp14 %read{4,26} %write{4,26}
temp color $tmp15 %read{4,26} %write{4,26}
const string $const8 "clamp" %read{19,19} %write{2147483647,-1}
temp float $tmp16 %read{4,26} %write{4,26}
temp float $tmp17 %read{4,26} %write{4,26}
code ___main___
# jiBubbles.osl:25
# color Pos = Position - offset;
sub Pos Position offset %filename{"jiBubbles.osl"} %line{25} %argrw{"wrr"}
# jiBubbles.osl:27
# float bubbles = 0;
assign bubbles $const1 %line{27} %argrw{"wr"}
# jiBubbles.osl:29
# for (float i = 0.0; i < maxNum ; ++i) {
for $tmp1 4 5 26 27 %line{29} %argrw{"r"}
assign ___305_i $const2 %argrw{"wr"}
lt $tmp1 ___305_i maxNum %argrw{"wrr"}
# jiBubbles.osl:30
# color randPos = cellnoise(i,seed) * spread - (spread/2);
assign $tmp3 seed %line{30} %argrw{"wr"}
cellnoise $tmp2 ___305_i $tmp3 %argrw{"wrr"}
mul $tmp4 $tmp2 spread %argrw{"wrr"}
div $tmp5 spread $const4 %argrw{"wrr"}
sub ___306_randPos $tmp4 $tmp5 %argrw{"wrr"}
# jiBubbles.osl:31
# float randSize = minSize + cellnoise(i,seed+847) * (maxSize - minSize) / 1;
add $tmp7 seed $const5 %line{31} %argrw{"wrr"}
assign $tmp8 $tmp7 %argrw{"wr"}
cellnoise $tmp6 ___305_i $tmp8 %argrw{"wrr"}
sub $tmp9 maxSize minSize %argrw{"wrr"}
mul $tmp10 $tmp6 $tmp9 %argrw{"wrr"}
div $tmp11 $tmp10 $const7 %argrw{"wrr"}
add ___306_randSize minSize $tmp11 %argrw{"wrr"}
# jiBubbles.osl:32
# bubbles = max( bubbles, 1-( pow( clamp(distance(randPos,Pos/randSize),0,1), gamma)) );
div $tmp15 Pos ___306_randSize %line{32} %argrw{"wrr"}
distance $tmp14 ___306_randPos $tmp15 %argrw{"wrr"}
functioncall $const8 22 %argrw{"r"}
# /opt/pixar/RenderManProServer-21.3/lib/osl/include/stdosl.h:144
# PERCOMP1 (inversesqrt)
min $tmp16 $tmp14 $const7 %filename{"/opt/pixar/RenderManProServer-21.3/lib/osl/include/stdosl.h"} %line{144} %argrw{"wrr"}
max $tmp13 $tmp16 $const2 %argrw{"wrr"}
# jiBubbles.osl:32
# bubbles = max( bubbles, 1-( pow( clamp(distance(randPos,Pos/randSize),0,1), gamma)) );
pow $tmp12 $tmp13 gamma %filename{"jiBubbles.osl"} %line{32} %argrw{"wrr"}
sub $tmp17 $const7 $tmp12 %argrw{"wrr"}
max bubbles bubbles $tmp17 %argrw{"wrr"}
# jiBubbles.osl:33
# outRGB = bubbles;
assign outRGB bubbles %line{33} %argrw{"wr"}
# jiBubbles.osl:29
# for (float i = 0.0; i < maxNum ; ++i) {
add ___305_i ___305_i $const7 %line{29} %argrw{"wrr"}
end