ogre-python 14.5.0__cp314-cp314-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. Ogre/Bites.py +14 -0
  2. Ogre/Bullet.py +14 -0
  3. Ogre/Codec_Assimp.dll +0 -0
  4. Ogre/Codec_STBI.dll +0 -0
  5. Ogre/HighPy.py +389 -0
  6. Ogre/ImGui.py +12 -0
  7. Ogre/Numpy.py +80 -0
  8. Ogre/Ogre.py +12 -0
  9. Ogre/OgreBites.dll +0 -0
  10. Ogre/OgreBullet.dll +0 -0
  11. Ogre/OgreMain.dll +0 -0
  12. Ogre/OgreOverlay.dll +0 -0
  13. Ogre/OgrePaging.dll +0 -0
  14. Ogre/OgreRTShaderSystem.dll +0 -0
  15. Ogre/OgreTerrain.dll +0 -0
  16. Ogre/Overlay.py +14 -0
  17. Ogre/Plugin_DotScene.dll +0 -0
  18. Ogre/Plugin_GLSLangProgramManager.dll +0 -0
  19. Ogre/Plugin_OctreeSceneManager.dll +0 -0
  20. Ogre/Plugin_ParticleFX.dll +0 -0
  21. Ogre/RTShader.py +14 -0
  22. Ogre/RenderSystem_Direct3D11.dll +0 -0
  23. Ogre/RenderSystem_GL.dll +0 -0
  24. Ogre/RenderSystem_GL3Plus.dll +0 -0
  25. Ogre/RenderSystem_GLES2.dll +0 -0
  26. Ogre/RenderSystem_Tiny.dll +0 -0
  27. Ogre/RenderSystem_Vulkan.dll +0 -0
  28. Ogre/SDL2.dll +0 -0
  29. Ogre/Terrain.py +14 -0
  30. Ogre/_Bites.pyd +0 -0
  31. Ogre/_Bullet.pyd +0 -0
  32. Ogre/_ImGui.pyd +0 -0
  33. Ogre/_Ogre.pyd +0 -0
  34. Ogre/_Overlay.pyd +0 -0
  35. Ogre/_RTShader.pyd +0 -0
  36. Ogre/_Terrain.pyd +0 -0
  37. Ogre/__init__.py +2 -0
  38. Ogre/zlib.dll +0 -0
  39. ogre_python-14.5.0.data/data/Media/Main/DefaultShaders.metal +38 -0
  40. ogre_python-14.5.0.data/data/Media/Main/GLSL_GL3Support.glsl +110 -0
  41. ogre_python-14.5.0.data/data/Media/Main/HLSL_SM4Support.hlsl +124 -0
  42. ogre_python-14.5.0.data/data/Media/Main/OgreUnifiedShader.h +201 -0
  43. ogre_python-14.5.0.data/data/Media/Main/Shadow.material +85 -0
  44. ogre_python-14.5.0.data/data/Media/Main/ShadowBlend.frag +11 -0
  45. ogre_python-14.5.0.data/data/Media/Main/ShadowBlend.vert +12 -0
  46. ogre_python-14.5.0.data/data/Media/Main/ShadowExtrudeDirLight.vert +18 -0
  47. ogre_python-14.5.0.data/data/Media/Main/ShadowExtrudeDirLightFinite.vert +22 -0
  48. ogre_python-14.5.0.data/data/Media/Main/ShadowExtrudePointLight.vert +19 -0
  49. ogre_python-14.5.0.data/data/Media/Main/ShadowExtrudePointLightFinite.vert +22 -0
  50. ogre_python-14.5.0.data/data/Media/Main/ShadowVolumeExtude.program +41 -0
  51. ogre_python-14.5.0.data/data/Media/Main/spot_shadow_fade.dds +0 -0
  52. ogre_python-14.5.0.data/data/Media/RTShaderLib/FFPLib_AlphaTest.glsl +45 -0
  53. ogre_python-14.5.0.data/data/Media/RTShaderLib/FFPLib_Fog.glsl +92 -0
  54. ogre_python-14.5.0.data/data/Media/RTShaderLib/FFPLib_Texturing.glsl +150 -0
  55. ogre_python-14.5.0.data/data/Media/RTShaderLib/FFPLib_Transform.glsl +100 -0
  56. ogre_python-14.5.0.data/data/Media/RTShaderLib/RTSLib_Colour.glsl +16 -0
  57. ogre_python-14.5.0.data/data/Media/RTShaderLib/RTSLib_IBL.glsl +90 -0
  58. ogre_python-14.5.0.data/data/Media/RTShaderLib/RTSLib_LTC.glsl +114 -0
  59. ogre_python-14.5.0.data/data/Media/RTShaderLib/RTSLib_Lighting.glsl +18 -0
  60. ogre_python-14.5.0.data/data/Media/RTShaderLib/RTSSamplers.material +18 -0
  61. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_CookTorrance.glsl +238 -0
  62. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_DualQuaternion.glsl +172 -0
  63. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_IntegratedPSSM.glsl +198 -0
  64. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_LayeredBlending.glsl +825 -0
  65. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_NormalMap.glsl +125 -0
  66. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_PerPixelLighting.glsl +183 -0
  67. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_TriplanarTexturing.glsl +47 -0
  68. ogre_python-14.5.0.data/data/Media/RTShaderLib/SGXLib_WBOIT.glsl +19 -0
  69. ogre_python-14.5.0.data/data/Media/RTShaderLib/dfgLUTmultiscatter.dds +0 -0
  70. ogre_python-14.5.0.data/data/Media/RTShaderLib/ltc_1.dds +0 -0
  71. ogre_python-14.5.0.data/data/Media/RTShaderLib/ltc_2.dds +0 -0
  72. ogre_python-14.5.0.data/data/Media/Terrain/TerrainSurface.glsl +91 -0
  73. ogre_python-14.5.0.data/data/Media/Terrain/TerrainTransforms.glsl +36 -0
  74. ogre_python-14.5.0.data/data/Media/packs/SdkTrays.zip +0 -0
  75. ogre_python-14.5.0.data/data/Media/packs/profiler.zip +0 -0
  76. ogre_python-14.5.0.data/data/bin/plugins.cfg +27 -0
  77. ogre_python-14.5.0.data/data/bin/resources.cfg +12 -0
  78. ogre_python-14.5.0.dist-info/METADATA +148 -0
  79. ogre_python-14.5.0.dist-info/RECORD +83 -0
  80. ogre_python-14.5.0.dist-info/WHEEL +5 -0
  81. ogre_python-14.5.0.dist-info/licenses/AUTHORS +313 -0
  82. ogre_python-14.5.0.dist-info/licenses/LICENSE +21 -0
  83. ogre_python-14.5.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,825 @@
1
+ /*
2
+ ** layered blending & misc math
3
+ ** Blending modes, RGB/HSL/Contrast/Desaturate, levels control
4
+ **
5
+ ** The shaders below are base on the shaders created by:
6
+ ** Romain Dura | Romz
7
+ ** Blog: http://blog.mouaif.org
8
+ ** Post: http://blog.mouaif.org/?p=94
9
+ */
10
+
11
+
12
+ /*
13
+ ** Desaturation
14
+ */
15
+
16
+ vec4 Desaturate(in vec3 color, in float Desaturation)
17
+ {
18
+ vec3 grayXfer = vec3(0.3, 0.59, 0.11);
19
+ float grayf = dot(grayXfer, color);
20
+ vec3 gray = vec3(grayf, grayf, grayf);
21
+ return vec4(mix(color, gray, Desaturation), 1.0);
22
+ }
23
+
24
+
25
+ /*
26
+ ** Hue, saturation, luminance
27
+ */
28
+
29
+ vec3 RGBToHSL(in vec3 color)
30
+ {
31
+ vec3 hsl; // init to 0 to avoid warnings ? (and reverse if + remove first part)
32
+
33
+ float fmin = min(min(color.r, color.g), color.b); //Min. value of RGB
34
+ float fmax = max(max(color.r, color.g), color.b); //Max. value of RGB
35
+ float delta = fmax - fmin; //Delta RGB value
36
+
37
+ hsl.z = (fmax + fmin) / 2.0; // Luminance
38
+
39
+ if (delta == 0.0) //This is a gray, no chroma...
40
+ {
41
+ hsl.x = 0.0; // Hue
42
+ hsl.y = 0.0; // Saturation
43
+ }
44
+ else //Chromatic data...
45
+ {
46
+ if (hsl.z < 0.5)
47
+ hsl.y = delta / (fmax + fmin); // Saturation
48
+ else
49
+ hsl.y = delta / (2.0 - fmax - fmin); // Saturation
50
+
51
+ float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;
52
+ float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;
53
+ float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;
54
+
55
+ if (color.r == fmax )
56
+ hsl.x = deltaB - deltaG; // Hue
57
+ else if (color.g == fmax)
58
+ hsl.x = (1.0 / 3.0) + deltaR - deltaB; // Hue
59
+ else if (color.b == fmax)
60
+ hsl.x = (2.0 / 3.0) + deltaG - deltaR; // Hue
61
+
62
+ if (hsl.x < 0.0)
63
+ hsl.x += 1.0; // Hue
64
+ else if (hsl.x > 1.0)
65
+ hsl.x -= 1.0; // Hue
66
+ }
67
+
68
+ return hsl;
69
+ }
70
+
71
+ float HueToRGB(in float f1, in float f2, in float hue)
72
+ {
73
+ if (hue < 0.0)
74
+ hue += 1.0;
75
+ else if (hue > 1.0)
76
+ hue -= 1.0;
77
+ float res;
78
+ if ((6.0 * hue) < 1.0)
79
+ res = f1 + (f2 - f1) * 6.0 * hue;
80
+ else if ((2.0 * hue) < 1.0)
81
+ res = f2;
82
+ else if ((3.0 * hue) < 2.0)
83
+ res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0;
84
+ else
85
+ res = f1;
86
+ return res;
87
+ }
88
+
89
+ vec3 HSLToRGB(in vec3 hsl)
90
+ {
91
+ vec3 rgb;
92
+
93
+ if (hsl.y == 0.0)
94
+ rgb = hsl.zzz; // Luminance
95
+ else
96
+ {
97
+ float f2;
98
+
99
+ if (hsl.z < 0.5)
100
+ f2 = hsl.z * (1.0 + hsl.y);
101
+ else
102
+ f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z);
103
+
104
+ float f1 = 2.0 * hsl.z - f2;
105
+
106
+ rgb.r = HueToRGB(f1, f2, hsl.x + (1.0/3.0));
107
+ rgb.g = HueToRGB(f1, f2, hsl.x);
108
+ rgb.b = HueToRGB(f1, f2, hsl.x - (1.0/3.0));
109
+ }
110
+
111
+ return rgb;
112
+ }
113
+
114
+
115
+ /*
116
+ ** Contrast, saturation, brightness
117
+ ** Code of this function is from TGM's shader pack
118
+ ** http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=21057
119
+ */
120
+
121
+ // For all settings: 1.0 = 100% 0.5=50% 1.5 = 150%
122
+ vec3 ContrastSaturationBrightness(in vec3 color, in float brt, in float sat, in float con)
123
+ {
124
+ // Increase or decrease these values to adjust r, g and b color channels separately
125
+ const float AvgLumR = 0.5;
126
+ const float AvgLumG = 0.5;
127
+ const float AvgLumB = 0.5;
128
+
129
+ const vec3 LumCoeff = vec3(0.2125, 0.7154, 0.0721);
130
+
131
+ vec3 AvgLumin = vec3(AvgLumR, AvgLumG, AvgLumB);
132
+ vec3 brtColor = color * brt;
133
+ float intensityf = dot(brtColor, LumCoeff);
134
+ vec3 intensity = vec3(intensityf, intensityf, intensityf);
135
+ vec3 satColor = mix(intensity, brtColor, sat);
136
+ vec3 conColor = mix(AvgLumin, satColor, con);
137
+ return conColor;
138
+ }
139
+
140
+ /*
141
+ ** Float blending modes
142
+ ** Adapted from here: http://www.nathanm.com/photoshop-blending-math/
143
+ ** But I modified the HardMix (wrong condition), Overlay, SoftLight, ColorDodge, ColorBurn, VividLight, PinLight (inverted layers) ones to have correct results
144
+ */
145
+
146
+ #define BlendLinearDodgef BlendAddf
147
+ #define BlendLinearBurnf BlendSubtractf
148
+ #define BlendAddf(base, blend) min(base + blend, 1.0)
149
+ #define BlendSubtractf(base, blend) max(base + blend - 1.0, 0.0)
150
+ #define BlendLightenf(base, blend) max(blend, base)
151
+ #define BlendDarkenf(base, blend) min(blend, base)
152
+ #define BlendScreenf(base, blend) (1.0 - ((1.0 - base) * (1.0 - blend)))
153
+ #define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))
154
+ #define BlendSoftLightf(base, blend) ((blend < 0.5) ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)))
155
+ #define BlendColorDodgef(base, blend) ((blend == 1.0) ? blend : min(base / (1.0 - blend), 1.0))
156
+ #define BlendColorBurnf(base, blend) ((blend == 0.0) ? blend : max((1.0 - ((1.0 - base) / blend)), 0.0))
157
+ #define BlendHardMixf(base, blend) ((BlendVividLightf(base, blend) < 0.5) ? 0.0 : 1.0)
158
+
159
+
160
+
161
+ /*
162
+ ** Vector3 blending modes
163
+ */
164
+
165
+ // Component wise blending
166
+ #define Blend1(base, blend, funcf) funcf(base, blend)
167
+ #define Blend3(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))
168
+ #define Blend4(base, blend, funcf) vec4(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b), funcf(base.a, blend.a))
169
+
170
+ #define BlendNormal(base, blend) (base)
171
+ #define BlendMultiply(base, blend) (base * blend)
172
+ #define BlendAverage(base, blend) ((base + blend) / 2.0)
173
+ #define BlendAdd(base, blend) min(base + blend, 1.0)
174
+ #define BlendSubtract(base, blend) max(base + blend - 1.0, 0.0)
175
+ #define BlendDifference(base, blend) abs(base - blend)
176
+ #define BlendNegation(base, blend) (1.0 - abs(1.0 - base - blend))
177
+ #define BlendExclusion(base, blend) (base + blend - 2.0 * base * blend)
178
+ #define BlendPhoenix(base, blend) (min(base, blend) - max(base, blend) + 1.0)
179
+ #define BlendOpacity(base, blend, F, O) (F(base, blend) * O + blend * (1.0 - O))
180
+
181
+ // Hue Blend mode creates the result color by combining the luminance and saturation of the base color with the hue of the blend color.
182
+ float BlendHue1(in float base, in float blend)
183
+ {
184
+ return base;
185
+ }
186
+
187
+ vec3 BlendHue3(in vec3 base, in vec3 blend)
188
+ {
189
+ vec3 baseHSL = RGBToHSL(base);
190
+ return HSLToRGB(vec3(RGBToHSL(blend).r, baseHSL.g, baseHSL.b));
191
+ }
192
+
193
+ vec4 BlendHue4(in vec4 base, in vec4 blend)
194
+ {
195
+ vec3 hue = BlendHue3(base.xyz, blend.xyz);
196
+ return vec4(hue.x, hue.y, hue.z, BlendHue1(base.w, blend.w));
197
+ }
198
+
199
+ // Saturation Blend mode creates the result color by combining the luminance and hue of the base color with the saturation of the blend color.
200
+ float BlendSaturation1(in float base, in float blend)
201
+ {
202
+ return base;
203
+ }
204
+
205
+ vec3 BlendSaturation3(in vec3 base, in vec3 blend)
206
+ {
207
+ vec3 baseHSL = RGBToHSL(base);
208
+ return HSLToRGB(vec3(baseHSL.r, RGBToHSL(blend).g, baseHSL.b));
209
+ }
210
+
211
+ vec4 BlendSaturation4(in vec4 base, in vec4 blend)
212
+ {
213
+ vec3 hue = BlendSaturation3(base.xyz, blend.xyz);
214
+ return vec4(hue.x, hue.y, hue.z, BlendSaturation1(base.w, blend.w));
215
+ }
216
+
217
+ // Color Mode keeps the brightness of the base color and applies both the hue and saturation of the blend color.
218
+ float BlendColor1(in float base, in float blend)
219
+ {
220
+ return base;
221
+ }
222
+
223
+ vec3 BlendColor3(in vec3 base, in vec3 blend)
224
+ {
225
+ vec3 blendHSL = RGBToHSL(blend);
226
+ return HSLToRGB(vec3(blendHSL.r, blendHSL.g, RGBToHSL(base).b));
227
+ }
228
+
229
+ vec4 BlendColor4(in vec4 base, in vec4 blend)
230
+ {
231
+ vec3 hue = BlendColor3(base.xyz, blend.xyz);
232
+ return vec4(hue.x, hue.y, hue.z, BlendColor1(base.w, blend.w));
233
+ }
234
+
235
+
236
+ // Luminosity Blend mode creates the result color by combining the hue and saturation of the base color with the luminance of the blend color.
237
+ float BlendLuminosity1(in float base, in float blend)
238
+ {
239
+ return base;
240
+ }
241
+
242
+ vec3 BlendLuminosity3(in vec3 base, in vec3 blend)
243
+ {
244
+ vec3 baseHSL = RGBToHSL(base);
245
+ return HSLToRGB(vec3(baseHSL.r, baseHSL.g, RGBToHSL(blend).b));
246
+ }
247
+
248
+ vec4 BlendLuminosity4(in vec4 base, in vec4 blend)
249
+ {
250
+ vec3 hue = BlendLuminosity3(base.xyz, blend.xyz);
251
+ return vec4(hue.x, hue.y, hue.z, BlendLuminosity1(base.w, blend.w));
252
+ }
253
+
254
+ float BlendLinearLightf(in float s1, in float s2)
255
+ {
256
+ float oColor;
257
+
258
+ if (s2 < 0.5)
259
+ {
260
+ float s2x = (2.0 * s2);
261
+ oColor = BlendSubtractf(s1, s2x);
262
+ }
263
+ else
264
+ {
265
+ float s2x = (2.0 * (s2 - 0.5));
266
+ oColor = BlendAddf(s1, s2x);
267
+ }
268
+
269
+ return oColor;
270
+ }
271
+
272
+ float BlendVividLightf(in float s1, in float s2)
273
+ {
274
+ float oColor;
275
+
276
+ if (s2 < 0.5)
277
+ {
278
+ float s2x = (2.0 * s2);
279
+ oColor = BlendColorBurnf(s1, s2x);
280
+ }
281
+ else
282
+ {
283
+ float s2x = (2.0 * (s2 - 0.5));
284
+ oColor = BlendColorDodgef(s1, s2x);
285
+ }
286
+
287
+ return oColor;
288
+ }
289
+
290
+ float BlendPinLightf(in float s1, in float s2)
291
+ {
292
+ float oColor;
293
+
294
+ if (s2 < 0.5)
295
+ {
296
+ float s2x = (2.0 * s2);
297
+ oColor = BlendDarkenf(s1, s2x);
298
+ }
299
+ else
300
+ {
301
+ float s2x = (2.0 * (s2 - 0.5));
302
+ oColor = BlendLightenf(s1, s2x);
303
+ }
304
+
305
+ return oColor;
306
+ }
307
+
308
+ float BlendReflectf(in float s1, in float s2)
309
+ {
310
+ float oColor;
311
+
312
+ if (s2 == 1.0)
313
+ {
314
+ oColor = s2;
315
+ }
316
+ else
317
+ {
318
+ float s1x = (s1 * s1) / (1.0 - s2);
319
+
320
+ oColor = min(s1x, 1.0);
321
+ }
322
+
323
+ return oColor;
324
+ }
325
+
326
+ //------------------------------------
327
+ // Interface for RTShader
328
+ //------------------------------------
329
+
330
+
331
+ void SGX_blend_normal(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
332
+ {
333
+ oColor = BlendNormal(basePixel, blendPixel);
334
+ }
335
+
336
+ void SGX_blend_normal(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
337
+ {
338
+ oColor = BlendNormal(basePixel, blendPixel);
339
+ }
340
+
341
+ void SGX_blend_normal(in float basePixel, in float blendPixel, out float oColor)
342
+ {
343
+ oColor = BlendNormal(basePixel, blendPixel);
344
+ }
345
+
346
+
347
+ void SGX_blend_lighten(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
348
+ {
349
+ oColor = BlendLightenf(basePixel, blendPixel);
350
+ }
351
+
352
+ void SGX_blend_lighten(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
353
+ {
354
+ oColor = BlendLightenf(basePixel, blendPixel);
355
+ }
356
+
357
+ void SGX_blend_lighten(in float basePixel, in float blendPixel, out float oColor)
358
+ {
359
+ oColor = BlendLightenf(basePixel, blendPixel);
360
+ }
361
+
362
+
363
+ void SGX_blend_darken(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
364
+ {
365
+ oColor = BlendDarkenf(basePixel, blendPixel);
366
+ }
367
+
368
+ void SGX_blend_darken(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
369
+ {
370
+ oColor = BlendDarkenf(basePixel, blendPixel);
371
+ }
372
+
373
+ void SGX_blend_darken(in float basePixel, in float blendPixel, out float oColor)
374
+ {
375
+ oColor = BlendDarkenf(basePixel, blendPixel);
376
+ }
377
+
378
+
379
+ void SGX_blend_multiply(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
380
+ {
381
+ oColor = BlendMultiply(basePixel, blendPixel);
382
+ }
383
+
384
+ void SGX_blend_multiply(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
385
+ {
386
+ oColor = BlendMultiply(basePixel, blendPixel);
387
+ }
388
+
389
+ void SGX_blend_multiply(in float basePixel, in float blendPixel, out float oColor)
390
+ {
391
+ oColor = BlendMultiply(basePixel, blendPixel);
392
+ }
393
+
394
+
395
+ void SGX_blend_average(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
396
+ {
397
+ oColor = BlendAverage(basePixel, blendPixel);
398
+ }
399
+
400
+ void SGX_blend_average(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
401
+ {
402
+ oColor = BlendAverage(basePixel, blendPixel);
403
+ }
404
+
405
+ void SGX_blend_average(in float basePixel, in float blendPixel, out float oColor)
406
+ {
407
+ oColor = BlendAverage(basePixel, blendPixel);
408
+ }
409
+
410
+
411
+ void SGX_blend_add(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
412
+ {
413
+ oColor = BlendAdd(basePixel, blendPixel);
414
+ }
415
+
416
+ void SGX_blend_add(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
417
+ {
418
+ oColor = BlendAdd(basePixel, blendPixel);
419
+ }
420
+
421
+ void SGX_blend_add(in float basePixel, in float blendPixel, out float oColor)
422
+ {
423
+ oColor = BlendAdd(basePixel, blendPixel);
424
+ }
425
+
426
+
427
+ void SGX_blend_subtract(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
428
+ {
429
+ oColor = BlendSubtract(basePixel, blendPixel);
430
+ }
431
+
432
+ void SGX_blend_subtract(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
433
+ {
434
+ oColor = BlendSubtract(basePixel, blendPixel);
435
+ }
436
+
437
+ void SGX_blend_subtract(in float basePixel, in float blendPixel, out float oColor)
438
+ {
439
+ oColor = BlendSubtract(basePixel, blendPixel);
440
+ }
441
+
442
+
443
+ void SGX_blend_difference(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
444
+ {
445
+ oColor = BlendDifference(basePixel, blendPixel);
446
+ }
447
+ void SGX_blend_difference(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
448
+ {
449
+ oColor = BlendDifference(basePixel, blendPixel);
450
+ }
451
+ void SGX_blend_difference(in float basePixel, in float blendPixel, out float oColor)
452
+ {
453
+ oColor = BlendDifference(basePixel, blendPixel);
454
+ }
455
+
456
+
457
+ void SGX_blend_negation(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
458
+ {
459
+ oColor = BlendNegation(basePixel, blendPixel);
460
+ }
461
+ void SGX_blend_negation(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
462
+ {
463
+ oColor = BlendNegation(basePixel, blendPixel);
464
+ }
465
+ void SGX_blend_negation(in float basePixel, in float blendPixel, out float oColor)
466
+ {
467
+ oColor = BlendNegation(basePixel, blendPixel);
468
+ }
469
+
470
+
471
+ void SGX_blend_exclusion(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
472
+ {
473
+ oColor = BlendExclusion(basePixel, blendPixel);
474
+ }
475
+ void SGX_blend_exclusion(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
476
+ {
477
+ oColor = BlendExclusion(basePixel, blendPixel);
478
+ }
479
+ void SGX_blend_exclusion(in float basePixel, in float blendPixel, out float oColor)
480
+ {
481
+ oColor = BlendExclusion(basePixel, blendPixel);
482
+ }
483
+
484
+
485
+ void SGX_blend_screen(in vec4 s1, in vec4 s2, out vec4 oColor)
486
+ {
487
+ oColor = vec4(BlendScreenf(s1.r, s2.r),
488
+ BlendScreenf(s1.g, s2.g),
489
+ BlendScreenf(s1.b, s2.b),
490
+ BlendScreenf(s1.a, s2.a));
491
+ }
492
+ void SGX_blend_screen(in vec3 s1, in vec3 s2, out vec3 oColor)
493
+ {
494
+ oColor = vec3(BlendScreenf(s1.r, s2.r),
495
+ BlendScreenf(s1.g, s2.g),
496
+ BlendScreenf(s1.b, s2.b));
497
+ }
498
+ void SGX_blend_screen(in float s1, in float s2, out float oColor)
499
+ {
500
+ oColor = BlendScreenf(s1, s2);
501
+ }
502
+
503
+
504
+ void SGX_blend_overlay(in vec4 s1, in vec4 s2, out vec4 oColor)
505
+ {
506
+ oColor = vec4(BlendOverlayf(s1.r, s2.r),
507
+ BlendOverlayf(s1.g, s2.g),
508
+ BlendOverlayf(s1.b, s2.b),
509
+ BlendOverlayf(s1.a, s2.a));
510
+ }
511
+ void SGX_blend_overlay(in vec3 s1, in vec3 s2, out vec3 oColor)
512
+ {
513
+ oColor = vec3(BlendOverlayf(s1.r, s2.r),
514
+ BlendOverlayf(s1.g, s2.g),
515
+ BlendOverlayf(s1.b, s2.b));
516
+ }
517
+ void SGX_blend_overlay(in float s1, in float s2, out float oColor)
518
+ {
519
+ oColor = BlendOverlayf(s1, s2);
520
+ }
521
+
522
+
523
+ void SGX_blend_softLight(in vec4 s1, in vec4 s2, out vec4 oColor)
524
+ {
525
+ oColor = vec4(BlendSoftLightf(s1.r, s2.r),
526
+ BlendSoftLightf(s1.g, s2.g),
527
+ BlendSoftLightf(s1.b, s2.b),
528
+ BlendSoftLightf(s1.a, s2.a));
529
+ }
530
+ void SGX_blend_softLight(in vec3 s1, in vec3 s2, out vec3 oColor)
531
+ {
532
+ oColor = vec3(BlendSoftLightf(s1.r, s2.r),
533
+ BlendSoftLightf(s1.g, s2.g),
534
+ BlendSoftLightf(s1.b, s2.b));
535
+ }
536
+ void SGX_blend_softLight(in float s1, in float s2, out float oColor)
537
+ {
538
+ oColor = BlendSoftLightf(s1, s2);
539
+ }
540
+
541
+
542
+ void SGX_blend_hardLight(in vec4 s1, in vec4 s2, out vec4 oColor)
543
+ {
544
+ oColor = vec4(BlendOverlayf(s1.r, s2.r),
545
+ BlendOverlayf(s1.g, s2.g),
546
+ BlendOverlayf(s1.b, s2.b),
547
+ BlendOverlayf(s1.a, s2.a));
548
+ }
549
+ void SGX_blend_hardLight(in vec3 s1, in vec3 s2, out vec3 oColor)
550
+ {
551
+ oColor = vec3(BlendOverlayf(s1.r, s2.r),
552
+ BlendOverlayf(s1.g, s2.g),
553
+ BlendOverlayf(s1.b, s2.b));
554
+ }
555
+ void SGX_blend_hardLight(in float s1, in float s2, out float oColor)
556
+ {
557
+ oColor = BlendOverlayf(s1, s2);
558
+ }
559
+
560
+
561
+ void SGX_blend_colorDodge(in vec4 s1, in vec4 s2, out vec4 oColor)
562
+ {
563
+ oColor = vec4(BlendColorDodgef(s1.r, s2.r),
564
+ BlendColorDodgef(s1.g, s2.g),
565
+ BlendColorDodgef(s1.b, s2.b),
566
+ BlendColorDodgef(s1.a, s2.a));
567
+ }
568
+ void SGX_blend_colorDodge(in vec3 s1, in vec3 s2, out vec3 oColor)
569
+ {
570
+ oColor = vec3(BlendColorDodgef(s1.r, s2.r),
571
+ BlendColorDodgef(s1.g, s2.g),
572
+ BlendColorDodgef(s1.b, s2.b));
573
+ }
574
+ void SGX_blend_colorDodge(in float s1, in float s2, out float oColor)
575
+ {
576
+ oColor = BlendColorDodgef(s1, s2);
577
+ }
578
+
579
+
580
+ void SGX_blend_colorBurn(in vec4 s1, in vec4 s2, out vec4 oColor)
581
+ {
582
+ oColor = vec4(BlendColorBurnf(s1.r, s2.r),
583
+ BlendColorBurnf(s1.g, s2.g),
584
+ BlendColorBurnf(s1.b, s2.b),
585
+ BlendColorBurnf(s1.a, s2.a));
586
+ }
587
+ void SGX_blend_colorBurn(in vec3 s1, in vec3 s2, out vec3 oColor)
588
+ {
589
+ oColor = vec3(BlendColorBurnf(s1.r, s2.r),
590
+ BlendColorBurnf(s1.g, s2.g),
591
+ BlendColorBurnf(s1.b, s2.b));
592
+ }
593
+ void SGX_blend_colorBurn(in float s1, in float s2, out float oColor)
594
+ {
595
+ oColor = BlendColorBurnf(s1, s2);
596
+ }
597
+
598
+
599
+ void SGX_blend_linearDodge(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
600
+ {
601
+ oColor = BlendAddf(basePixel, blendPixel);
602
+ }
603
+ void SGX_blend_linearDodge(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
604
+ {
605
+ oColor = BlendAddf(basePixel, blendPixel);
606
+ }
607
+ void SGX_blend_linearDodge(in float basePixel, in float blendPixel, out float oColor)
608
+ {
609
+ oColor = BlendAddf(basePixel, blendPixel);
610
+ }
611
+
612
+
613
+ void SGX_blend_linearBurn(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
614
+ {
615
+ oColor = BlendSubtractf(basePixel, blendPixel);
616
+ }
617
+ void SGX_blend_linearBurn(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
618
+ {
619
+ oColor = BlendSubtractf(basePixel, blendPixel);
620
+ }
621
+ void SGX_blend_linearBurn(in float basePixel, in float blendPixel, out float oColor)
622
+ {
623
+ oColor = BlendSubtractf(basePixel, blendPixel);
624
+ }
625
+
626
+
627
+ void SGX_blend_linearLight(in vec4 s1, in vec4 s2, out vec4 oColor)
628
+ {
629
+ oColor = vec4(BlendLinearLightf(s1.r, s2.r),
630
+ BlendLinearLightf(s1.g, s2.g),
631
+ BlendLinearLightf(s1.b, s2.b),
632
+ BlendLinearLightf(s1.a, s2.a));
633
+ }
634
+ void SGX_blend_linearLight(in vec3 s1, in vec3 s2, out vec3 oColor)
635
+ {
636
+ oColor = vec3(BlendLinearLightf(s1.r, s2.r),
637
+ BlendLinearLightf(s1.g, s2.g),
638
+ BlendLinearLightf(s1.b, s2.b));
639
+ }
640
+ void SGX_blend_linearLight(in float s1, in float s2, out float oColor)
641
+ {
642
+ oColor = BlendLinearLightf(s1, s2);
643
+ }
644
+
645
+
646
+ void SGX_blend_vividLight(in vec4 s1, in vec4 s2, out vec4 oColor)
647
+ {
648
+ oColor = vec4(BlendVividLightf(s1.r, s2.r),
649
+ BlendVividLightf(s1.g, s2.g),
650
+ BlendVividLightf(s1.b, s2.b),
651
+ BlendVividLightf(s1.a, s2.a));
652
+ }
653
+ void SGX_blend_vividLight(in vec3 s1, in vec3 s2, out vec3 oColor)
654
+ {
655
+ oColor = vec3(BlendVividLightf(s1.r, s2.r),
656
+ BlendVividLightf(s1.g, s2.g),
657
+ BlendVividLightf(s1.b, s2.b));
658
+ }
659
+ void SGX_blend_vividLight(in float s1, in float s2, out float oColor)
660
+ {
661
+ oColor = BlendVividLightf(s1, s2);
662
+ }
663
+
664
+
665
+ void SGX_blend_pinLight(in vec4 s1, in vec4 s2, out vec4 oColor)
666
+ {
667
+ oColor = vec4(BlendPinLightf(s1.r, s2.r),
668
+ BlendPinLightf(s1.g, s2.g),
669
+ BlendPinLightf(s1.b, s2.b),
670
+ BlendPinLightf(s1.a, s2.a));
671
+ }
672
+ void SGX_blend_pinLight(in vec3 s1, in vec3 s2, out vec3 oColor)
673
+ {
674
+ oColor = vec3(BlendPinLightf(s1.r, s2.r),
675
+ BlendPinLightf(s1.g, s2.g),
676
+ BlendPinLightf(s1.b, s2.b));
677
+ }
678
+ void SGX_blend_pinLight(in float s1, in float s2, out float oColor)
679
+ {
680
+ oColor = BlendPinLightf(s1, s2);
681
+ }
682
+
683
+
684
+ void SGX_blend_hardMix(in vec4 s1, in vec4 s2, out vec4 oColor)
685
+ {
686
+ oColor = vec4(BlendHardMixf(s1.r, s2.r),
687
+ BlendHardMixf(s1.g, s2.g),
688
+ BlendHardMixf(s1.b, s2.b),
689
+ BlendHardMixf(s1.a, s2.a));
690
+ }
691
+ void SGX_blend_hardMix(in vec3 s1, in vec3 s2, out vec3 oColor)
692
+ {
693
+ oColor = vec3(BlendHardMixf(s1.r, s2.r),
694
+ BlendHardMixf(s1.g, s2.g),
695
+ BlendHardMixf(s1.b, s2.b));
696
+ }
697
+ void SGX_blend_hardMix(in float s1, in float s2, out float oColor)
698
+ {
699
+ oColor = BlendHardMixf(s1, s2);
700
+ }
701
+
702
+ void SGX_blend_reflect(in vec4 s1, in vec4 s2, out vec4 oColor)
703
+ {
704
+ oColor = vec4(BlendReflectf(s1.r, s2.r),
705
+ BlendReflectf(s1.g, s2.g),
706
+ BlendReflectf(s1.b, s2.b),
707
+ BlendReflectf(s1.a, s2.a));
708
+ }
709
+ void SGX_blend_reflect(in vec3 s1, in vec3 s2, out vec3 oColor)
710
+ {
711
+ oColor = vec3(BlendReflectf(s1.r, s2.r),
712
+ BlendReflectf(s1.g, s2.g),
713
+ BlendReflectf(s1.b, s2.b));
714
+ }
715
+ void SGX_blend_reflect(in float s1, in float s2, out float oColor)
716
+ {
717
+ oColor = BlendReflectf(s1, s2);
718
+ }
719
+
720
+
721
+ void SGX_blend_glow(in vec4 s1, in vec4 s2, out vec4 oColor)
722
+ {
723
+ oColor = vec4(BlendReflectf(s1.r, s2.r),
724
+ BlendReflectf(s1.g, s2.g),
725
+ BlendReflectf(s1.b, s2.b),
726
+ BlendReflectf(s1.a, s2.a));
727
+ }
728
+ void SGX_blend_glow(in vec3 s1, in vec3 s2, out vec3 oColor)
729
+ {
730
+ oColor = vec3(BlendReflectf(s1.r, s2.r),
731
+ BlendReflectf(s1.g, s2.g),
732
+ BlendReflectf(s1.b, s2.b));
733
+ }
734
+ void SGX_blend_glow(in float s1, in float s2, out float oColor)
735
+ {
736
+ oColor = BlendReflectf(s1, s2);
737
+ }
738
+
739
+
740
+ void SGX_blend_phoenix(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
741
+ {
742
+ oColor = BlendPhoenix(basePixel, blendPixel);
743
+ }
744
+ void SGX_blend_phoenix(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
745
+ {
746
+ oColor = BlendPhoenix(basePixel, blendPixel);
747
+ }
748
+ void SGX_blend_phoenix(in float basePixel, in float blendPixel, out float oColor)
749
+ {
750
+ oColor = BlendPhoenix(basePixel, blendPixel);
751
+ }
752
+
753
+
754
+ void SGX_blend_saturation(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
755
+ {
756
+ oColor = BlendSaturation4(basePixel, blendPixel);
757
+ }
758
+ void SGX_blend_saturation(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
759
+ {
760
+ oColor = BlendSaturation3(basePixel, blendPixel);
761
+ }
762
+ void SGX_blend_saturation(in float basePixel, in float blendPixel, out float oColor)
763
+ {
764
+ oColor = BlendSaturation1(basePixel, blendPixel);
765
+ }
766
+
767
+
768
+ void SGX_blend_color(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
769
+ {
770
+ oColor = BlendColor4(basePixel, blendPixel);
771
+ }
772
+ void SGX_blend_color(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
773
+ {
774
+ oColor = BlendColor3(basePixel, blendPixel);
775
+ }
776
+ void SGX_blend_color(in float basePixel, in float blendPixel, out float oColor)
777
+ {
778
+ oColor = BlendColor1(basePixel, blendPixel);
779
+ }
780
+
781
+
782
+ void SGX_blend_luminosity(in vec4 basePixel, in vec4 blendPixel, out vec4 oColor)
783
+ {
784
+ oColor = BlendLuminosity4(basePixel, blendPixel);
785
+ }
786
+ void SGX_blend_luminosity(in vec3 basePixel, in vec3 blendPixel, out vec3 oColor)
787
+ {
788
+ oColor = BlendLuminosity3(basePixel, blendPixel);
789
+ }
790
+ void SGX_blend_luminosity(in float basePixel, in float blendPixel, out float oColor)
791
+ {
792
+ oColor = BlendLuminosity1(basePixel, blendPixel);
793
+ }
794
+
795
+
796
+ ////////////////////////////////////////////////////////////////////////////////////
797
+ /// Source modification functions
798
+ ////////////////////////////////////////////////////////////////////////////////////
799
+
800
+
801
+ void SGX_src_mod_modulate(in vec4 iColor, in vec4 controlVal, out vec4 oColor)
802
+ {
803
+ oColor = iColor * controlVal;
804
+ }
805
+ void SGX_src_mod_modulate(in vec3 iColor, in vec3 controlVal, out vec3 oColor)
806
+ {
807
+ oColor = iColor * controlVal;
808
+ }
809
+ void SGX_src_mod_modulate(in float iColor, in float controlVal, out float oColor)
810
+ {
811
+ oColor = iColor * controlVal;
812
+ }
813
+
814
+ void SGX_src_mod_inv_modulate(in vec4 iColor, in vec4 controlVal, out vec4 oColor)
815
+ {
816
+ oColor = mix(iColor, vec4(1.0,1.0,1.0,1.0), controlVal);
817
+ }
818
+ void SGX_src_mod_inv_modulate(in vec3 iColor, in vec3 controlVal, out vec3 oColor)
819
+ {
820
+ oColor = mix(iColor, vec3(1.0,1.0,1.0), controlVal);
821
+ }
822
+ void SGX_src_mod_inv_modulate(in float iColor, in float controlVal, out float oColor)
823
+ {
824
+ oColor = mix(iColor, 1.0, controlVal);
825
+ }