-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGaborNoise.oso
99 lines (99 loc) · 6.6 KB
/
GaborNoise.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
91
92
93
94
95
96
97
98
99
OpenShadingLanguage 1.00
# Compiled by oslc 1.13.0.1dev
# options: -o C:\Users\MYSTER~1\AppData\Local\Temp\tmpqsuj08kc.oso -IC:\Program Files (x86)\Steam\steamapps\common\Blender\3.5\scripts\addons\cycles\shader
shader GaborNoise
param string Dimensions "4D" %meta{string,widget,"mapper"} %meta{string,options,"1D (X):1D|2D (X, Y):2D|3D (X, Y, Z):3D|4D (X, Y, Z, W):4D"} %read{3,12} %write{2147483647,-1}
param float Minimum 0 %read{16,24} %write{2147483647,-1}
param float Maximum 1 %read{17,24} %write{2147483647,-1}
param point Position_XYZ 0 0 0 %meta{string,label,"Position XYZ"} %read{1,1} %write{0,0} %derivs %initexpr
param float Position_W 0 %meta{string,label,"Position W"} %read{2,2} %write{2147483647,-1} %derivs
param vector Scale_XYZ 1 1 1 %meta{string,label,"Scale XYZ"} %read{1,1} %write{2147483647,-1} %derivs
param float Scale_W 1 %meta{string,label,"Scale W"} %read{2,2} %write{2147483647,-1} %derivs
param int Anisotropic 0 %meta{string,widget,"mapper"} %meta{string,options,"Isotropic:0|Anisotropic Along:1|Anisotropic Radial:2"} %read{6,15} %write{2147483647,-1}
param vector Direction 0 0 0 %read{6,15} %write{2147483647,-1}
param float Bandwidth 1 %read{6,15} %write{2147483647,-1}
param float Impulses 16 %read{6,15} %write{2147483647,-1}
param int Do_Filter 1 %meta{string,label,"Do Filter"} %meta{string,widget,"checkBox"} %read{6,15} %write{2147483647,-1}
oparam color Color 0 0 0 %read{2147483647,-1} %write{20,20}
oparam float Float 0 %read{2147483647,-1} %write{24,24}
global point P %read{0,0} %write{2147483647,-1} %derivs
local point pos %read{5,15} %write{1,1} %derivs
local float w %read{15,15} %write{2,2} %derivs
local color result %read{18,21} %write{6,15}
const string $const1 "1D" %read{3,3} %write{2147483647,-1}
temp int $tmp1 %read{4,4} %write{3,3}
const string $const2 "gabor" %read{6,15} %write{2147483647,-1}
const int $const3 0 %read{5,21} %write{2147483647,-1}
temp float $tmp2 %read{6,6} %write{5,5} %derivs
const string $const4 "anisotropic" %read{6,15} %write{2147483647,-1}
const string $const5 "direction" %read{6,15} %write{2147483647,-1}
const string $const6 "bandwidth" %read{6,15} %write{2147483647,-1}
const string $const7 "impulses" %read{6,15} %write{2147483647,-1}
const string $const8 "do_filter" %read{6,15} %write{2147483647,-1}
const string $const9 "2D" %read{7,7} %write{2147483647,-1}
temp int $tmp3 %read{8,8} %write{7,7}
temp float $tmp4 %read{11,11} %write{9,9} %derivs
const int $const10 1 %read{10,10} %write{2147483647,-1}
temp float $tmp5 %read{11,11} %write{10,10} %derivs
const string $const11 "3D" %read{12,12} %write{2147483647,-1}
temp int $tmp6 %read{13,13} %write{12,12}
temp vector $tmp7 %read{20,20} %write{16,16}
temp vector $tmp8 %read{20,20} %write{17,17}
const float $const12 0.5 %read{18,23} %write{2147483647,-1}
temp color $tmp9 %read{19,19} %write{18,18}
temp color $tmp10 %read{20,20} %write{19,19}
temp float $tmp11 %read{22,22} %write{21,21}
temp float $tmp12 %read{23,23} %write{22,22}
temp float $tmp13 %read{24,24} %write{23,23}
code Position_XYZ
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:8
# [[ string label = "Position XYZ" ]],
assign Position_XYZ P %filename{"C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl"} %line{8} %argrw{"wr"}
code ___main___
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:28
# float w = Position_W * Scale_W;
mul pos Position_XYZ Scale_XYZ %filename{"C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl"} %line{28} %argrw{"wrr"}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:29
# color result;
mul w Position_W Scale_W %line{29} %argrw{"wrr"}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:31
# result = noise("gabor", pos[0], "anisotropic", Anisotropic, "direction", Direction, "bandwidth", Bandwidth, "impulses", Impulses, "do_filter", Do_Filter);
eq $tmp1 Dimensions $const1 %line{31} %argrw{"wrr"}
if $tmp1 7 16 %argrw{"r"}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:32
# } else if (Dimensions == "2D") {
compref $tmp2 pos $const3 %line{32} %argrw{"wrr"}
noise result $const2 $tmp2 $const4 Anisotropic $const5 Direction $const6 Bandwidth $const7 Impulses $const8 Do_Filter %argrw{"wrrrrrrrrrrrr"} %argderivs{2}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:33
# result = noise("gabor", pos[0], pos[1], "anisotropic", Anisotropic, "direction", Direction, "bandwidth", Bandwidth, "impulses", Impulses, "do_filter", Do_Filter);
eq $tmp3 Dimensions $const9 %line{33} %argrw{"wrr"}
if $tmp3 12 16 %argrw{"r"}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:34
# } else if (Dimensions == "3D") {
compref $tmp4 pos $const3 %line{34} %argrw{"wrr"}
compref $tmp5 pos $const10 %argrw{"wrr"}
noise result $const2 $tmp4 $tmp5 $const4 Anisotropic $const5 Direction $const6 Bandwidth $const7 Impulses $const8 Do_Filter %argrw{"wrrrrrrrrrrrrr"} %argderivs{2,3}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:35
# result = noise("gabor", pos, "anisotropic", Anisotropic, "direction", Direction, "bandwidth", Bandwidth, "impulses", Impulses, "do_filter", Do_Filter);
eq $tmp6 Dimensions $const11 %line{35} %argrw{"wrr"}
if $tmp6 15 16 %argrw{"r"}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:36
# } else {
noise result $const2 pos $const4 Anisotropic $const5 Direction $const6 Bandwidth $const7 Impulses $const8 Do_Filter %line{36} %argrw{"wrrrrrrrrrrrr"} %argderivs{2}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:38
# }
noise result $const2 pos w $const4 Anisotropic $const5 Direction $const6 Bandwidth $const7 Impulses $const8 Do_Filter %line{38} %argrw{"wrrrrrrrrrrrrr"} %argderivs{2,3}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:41
# Float = mix(Minimum, Maximum, result[0] * 0.5 + 0.5);
assign $tmp7 Minimum %line{41} %argrw{"wr"}
assign $tmp8 Maximum %argrw{"wr"}
mul $tmp9 result $const12 %argrw{"wrr"}
add $tmp10 $tmp9 $const12 %argrw{"wrr"}
mix Color $tmp7 $tmp8 $tmp10 %argrw{"wrrr"}
# C:\\Users\\MysteryPancake\\Desktop\\custom_shaders\\Blender\\GaborNoise.osl:42
# }
compref $tmp11 result $const3 %line{42} %argrw{"wrr"}
mul $tmp12 $tmp11 $const12 %argrw{"wrr"}
add $tmp13 $tmp12 $const12 %argrw{"wrr"}
mix Float Minimum Maximum $tmp13 %argrw{"wrrr"}
end