Advertisement
Guest User

Untitled

a guest
Apr 24th, 2025
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.54 KB | None | 0 0
  1. #version 120
  2. /*
  3. CRT-interlaced
  4.  
  5. Copyright (C) 2010-2012 cgwg, Themaister and DOLLS
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the Free
  9. Software Foundation; either version 2 of the License, or (at your option)
  10. any later version.
  11.  
  12. (cgwg gave their consent to have the original version of this shader
  13. distributed under the GPL in this message:
  14.  
  15. http://board.byuu.org/viewtopic.php?p=26075#p26075
  16.  
  17. "Feel free to distribute my shaders under the GPL. After all, the
  18. barrel distortion code was taken from the Curvature shader, which is
  19. under the GPL."
  20. )
  21. This shader variant is pre-configured with screen curvature
  22. */
  23.  
  24. #pragma parameter CRTgamma "CRTGeom Target Gamma" 2.4 0.1 5.0 0.1
  25. #pragma parameter monitorgamma "CRTGeom Monitor Gamma" 2.2 0.1 5.0 0.1
  26. #pragma parameter d "CRTGeom Distance" 1.6 0.1 3.0 0.1
  27. #pragma parameter CURVATURE "CRTGeom Curvature Toggle" 1.0 0.0 1.0 1.0
  28. #pragma parameter R "CRTGeom Curvature Radius" 2.0 0.1 10.0 0.1
  29. #pragma parameter cornersize "CRTGeom Corner Size" 0.03 0.001 1.0 0.005
  30. #pragma parameter cornersmooth "CRTGeom Corner Smoothness" 1000.0 80.0 2000.0 100.0
  31. #pragma parameter x_tilt "CRTGeom Horizontal Tilt" 0.0 -0.5 0.5 0.05
  32. #pragma parameter y_tilt "CRTGeom Vertical Tilt" 0.0 -0.5 0.5 0.05
  33. #pragma parameter overscan_x "CRTGeom Horiz. Overscan %" 100.0 -125.0 125.0 1.0
  34. #pragma parameter overscan_y "CRTGeom Vert. Overscan %" 100.0 -125.0 125.0 1.0
  35. #pragma parameter DOTMASK "CRTGeom Dot Mask Strength" 0.3 0.0 1.0 0.1
  36. #pragma parameter SHARPER "CRTGeom Sharpness" 1.0 1.0 3.0 1.0
  37. #pragma parameter scanline_weight "CRTGeom Scanline Weight" 0.3 0.1 0.5 0.05
  38. #pragma parameter lum "CRTGeom Luminance" 0.0 0.0 1.0 0.01
  39. #pragma parameter interlace_detect "CRTGeom Interlacing Simulation" 1.0 0.0 1.0 1.0
  40. #pragma parameter SATURATION "CRTGeom Saturation" 1.0 0.0 2.0 0.05
  41.  
  42. #ifndef PARAMETER_UNIFORM
  43. #define CRTgamma 2.4
  44. #define monitorgamma 2.2
  45. #define d 1.6
  46. #define CURVATURE 1.0
  47. #define R 2.0
  48. #define cornersize 0.03
  49. #define cornersmooth 1000.0
  50. #define x_tilt 0.0
  51. #define y_tilt 0.0
  52. #define overscan_x 100.0
  53. #define overscan_y 100.0
  54. #define DOTMASK 0.3
  55. #define SHARPER 1.0
  56. #define scanline_weight 0.3
  57. #define lum 0.0
  58. #define interlace_detect 0.0
  59. #define SATURATION 1.0
  60. #endif
  61.  
  62. #if defined(VERTEX)
  63.  
  64. #if __VERSION__ >= 130
  65. #define COMPAT_VARYING out
  66. #define COMPAT_ATTRIBUTE in
  67. #define COMPAT_TEXTURE texture
  68. #else
  69. #define COMPAT_VARYING varying
  70. #define COMPAT_ATTRIBUTE attribute
  71. #define COMPAT_TEXTURE texture2D
  72. #endif
  73.  
  74. #ifdef GL_ES
  75. #define COMPAT_PRECISION mediump
  76. #else
  77. #define COMPAT_PRECISION
  78. #endif
  79.  
  80. COMPAT_ATTRIBUTE vec4 a_position;
  81. COMPAT_VARYING vec2 v_texCoord;
  82.  
  83. uniform COMPAT_PRECISION vec2 rubyOutputSize;
  84. uniform COMPAT_PRECISION vec2 rubyTextureSize;
  85. uniform COMPAT_PRECISION vec2 rubyInputSize;
  86.  
  87. vec4 _oPosition1;
  88. uniform mat4 MVPMatrix;
  89. uniform COMPAT_PRECISION int FrameDirection;
  90. uniform COMPAT_PRECISION int FrameCount;
  91. uniform COMPAT_PRECISION vec2 OutputSize;
  92. uniform COMPAT_PRECISION vec2 TextureSize;
  93. uniform COMPAT_PRECISION vec2 InputSize;
  94.  
  95. COMPAT_VARYING vec2 overscan;
  96. COMPAT_VARYING vec2 aspect;
  97. COMPAT_VARYING vec3 stretch;
  98. COMPAT_VARYING vec2 sinangle;
  99. COMPAT_VARYING vec2 cosangle;
  100. COMPAT_VARYING vec2 one;
  101. COMPAT_VARYING float mod_factor;
  102. COMPAT_VARYING vec2 ilfac;
  103.  
  104. #ifdef PARAMETER_UNIFORM
  105. uniform COMPAT_PRECISION float CRTgamma;
  106. uniform COMPAT_PRECISION float monitorgamma;
  107. uniform COMPAT_PRECISION float d;
  108. uniform COMPAT_PRECISION float CURVATURE;
  109. uniform COMPAT_PRECISION float R;
  110. uniform COMPAT_PRECISION float cornersize;
  111. uniform COMPAT_PRECISION float cornersmooth;
  112. uniform COMPAT_PRECISION float x_tilt;
  113. uniform COMPAT_PRECISION float y_tilt;
  114. uniform COMPAT_PRECISION float overscan_x;
  115. uniform COMPAT_PRECISION float overscan_y;
  116. uniform COMPAT_PRECISION float DOTMASK;
  117. uniform COMPAT_PRECISION float SHARPER;
  118. uniform COMPAT_PRECISION float scanline_weight;
  119. uniform COMPAT_PRECISION float lum;
  120. uniform COMPAT_PRECISION float interlace_detect;
  121. uniform COMPAT_PRECISION float SATURATION;
  122. #endif
  123.  
  124. #define FIX(c) max(abs(c), 1e-5);
  125.  
  126. float intersect(vec2 xy)
  127. {
  128. float A = dot(xy,xy)+d*d;
  129. float B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);
  130. float C = d*d + 2.0*R*d*cosangle.x*cosangle.y;
  131. return (-B-sqrt(B*B-4.0*A*C))/(2.0*A);
  132. }
  133.  
  134. vec2 bkwtrans(vec2 xy)
  135. {
  136. float c = intersect(xy);
  137. vec2 point = vec2(c)*xy;
  138. point -= vec2(-R)*sinangle;
  139. point /= vec2(R);
  140. vec2 tang = sinangle/cosangle;
  141. vec2 poc = point/cosangle;
  142. float A = dot(tang,tang)+1.0;
  143. float B = -2.0*dot(poc,tang);
  144. float C = dot(poc,poc)-1.0;
  145. float a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);
  146. vec2 uv = (point-a*sinangle)/cosangle;
  147. float r = R*acos(a);
  148. return uv*r/sin(r/R);
  149. }
  150.  
  151. vec2 fwtrans(vec2 uv)
  152. {
  153. float r = FIX(sqrt(dot(uv,uv)));
  154. uv *= sin(r/R)/r;
  155. float x = 1.0-cos(r/R);
  156. float D = d/R + x*cosangle.x*cosangle.y+dot(uv,sinangle);
  157. return d*(uv*cosangle-x*sinangle)/D;
  158. }
  159.  
  160. vec3 maxscale()
  161. {
  162. vec2 c = bkwtrans(-R * sinangle / (1.0 + R/d*cosangle.x*cosangle.y));
  163. vec2 a = vec2(0.5,0.5)*aspect;
  164. vec2 lo = vec2(fwtrans(vec2(-a.x,c.y)).x, fwtrans(vec2(c.x,-a.y)).y)/aspect;
  165. vec2 hi = vec2(fwtrans(vec2(+a.x,c.y)).x, fwtrans(vec2(c.x,+a.y)).y)/aspect;
  166. return vec3((hi+lo)*aspect*0.5,max(hi.x-lo.x,hi.y-lo.y));
  167. }
  168.  
  169. void main()
  170. {
  171. // START of parameters
  172.  
  173. // gamma of simulated CRT
  174. // CRTgamma = 1.8;
  175. // gamma of display monitor (typically 2.2 is correct)
  176. // monitorgamma = 2.2;
  177. // overscan (e.g. 1.02 for 2% overscan)
  178. overscan = vec2(1.00,1.00);
  179. // aspect ratio
  180. aspect = vec2(1.0, 0.75);
  181. // lengths are measured in units of (approximately) the width
  182. // of the monitor simulated distance from viewer to monitor
  183. // d = 2.0;
  184. // radius of curvature
  185. // R = 1.5;
  186. // tilt angle in radians
  187. // (behavior might be a bit wrong if both components are
  188. // nonzero)
  189. const vec2 angle = vec2(0.0,0.0);
  190. // size of curved corners
  191. // cornersize = 0.03;
  192. // border smoothness parameter
  193. // decrease if borders are too aliased
  194. // cornersmooth = 1000.0;
  195.  
  196. // END of parameters
  197.  
  198. //vec4 _oColor;
  199. //vec2 _otexCoord;
  200. //gl_Position = VertexCoord.x * MVPMatrix[0] + VertexCoord.y * MVPMatrix[1] + VertexCoord.z * MVPMatrix[2] + VertexCoord.w * MVPMatrix[3];
  201. //_oPosition1 = gl_Position;
  202. //_oColor = COLOR;
  203. //_otexCoord = TexCoord.xy*1.0001;
  204. //COL0 = COLOR;
  205. //TEX0.xy = TexCoord.xy*1.0001;
  206.  
  207. gl_Position = a_position;
  208. v_texCoord = vec2(a_position.x + 1.0, 1.0 - a_position.y) / 2.0 * rubyInputSize / rubyTextureSize;
  209.  
  210. // Precalculate a bunch of useful values we'll need in the fragment
  211. // shader.
  212. sinangle = sin(vec2(x_tilt, y_tilt)) + vec2(0.001);//sin(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));
  213. cosangle = cos(vec2(x_tilt, y_tilt)) + vec2(0.001);//cos(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));
  214. stretch = maxscale();
  215.  
  216. ilfac = vec2(1.0,clamp(floor(rubyInputSize.y/200.0), 1.0, 2.0));
  217.  
  218. // The size of one texel, in texture-coordinates.
  219. vec2 sharpTextureSize = vec2(SHARPER * rubyTextureSize.x, rubyTextureSize.y);
  220. one = ilfac / sharpTextureSize;
  221.  
  222. // Resulting X pixel-coordinate of the pixel we're drawing.
  223. mod_factor = v_texCoord.x * rubyTextureSize.x * rubyOutputSize.x / rubyInputSize.x;
  224.  
  225. }
  226.  
  227. #elif defined(FRAGMENT)
  228.  
  229. #if __VERSION__ >= 130
  230. #define COMPAT_VARYING in
  231. #define COMPAT_TEXTURE texture
  232. out vec4 FragColor;
  233. #else
  234. #define COMPAT_VARYING varying
  235. #define FragColor gl_FragColor
  236. #define COMPAT_TEXTURE texture2D
  237. #endif
  238.  
  239. #ifdef GL_ES
  240. #ifdef GL_FRAGMENT_PRECISION_HIGH
  241. precision highp float;
  242. #else
  243. precision mediump float;
  244. #endif
  245. #define COMPAT_PRECISION mediump
  246. #else
  247. #define COMPAT_PRECISION
  248. #endif
  249.  
  250. struct output_dummy {
  251. vec4 _color;
  252. };
  253.  
  254. uniform COMPAT_PRECISION int rubyFrameDirection;
  255. uniform COMPAT_PRECISION int rubyFrameCount;
  256. uniform COMPAT_PRECISION vec2 rubyOutputSize;
  257. uniform COMPAT_PRECISION vec2 rubyTextureSize;
  258. uniform COMPAT_PRECISION vec2 rubyInputSize;
  259. uniform sampler2D rubyTexture;
  260. COMPAT_VARYING vec2 v_texCoord;
  261.  
  262. // Comment the next line to disable interpolation in linear gamma (and
  263. // gain speed).
  264. #define LINEAR_PROCESSING
  265.  
  266. // Enable screen curvature.
  267. // #define CURVATURE
  268.  
  269. // Enable 3x oversampling of the beam profile
  270. #define OVERSAMPLE
  271.  
  272. // Use the older, purely gaussian beam profile
  273. //#define USEGAUSSIAN
  274.  
  275. // Macros.
  276. #define FIX(c) max(abs(c), 1e-5);
  277. #define PI 3.141592653589
  278.  
  279. #ifdef LINEAR_PROCESSING
  280. # define TEX2D(c) pow(COMPAT_TEXTURE(rubyTexture, (c)), vec4(CRTgamma))
  281. #else
  282. # define TEX2D(c) COMPAT_TEXTURE(rubyTexture, (c))
  283. #endif
  284.  
  285. COMPAT_VARYING vec2 one;
  286. COMPAT_VARYING float mod_factor;
  287. COMPAT_VARYING vec2 ilfac;
  288. COMPAT_VARYING vec2 overscan;
  289. COMPAT_VARYING vec2 aspect;
  290. COMPAT_VARYING vec3 stretch;
  291. COMPAT_VARYING vec2 sinangle;
  292. COMPAT_VARYING vec2 cosangle;
  293.  
  294. #ifdef PARAMETER_UNIFORM
  295. uniform COMPAT_PRECISION float CRTgamma;
  296. uniform COMPAT_PRECISION float monitorgamma;
  297. uniform COMPAT_PRECISION float d;
  298. uniform COMPAT_PRECISION float CURVATURE;
  299. uniform COMPAT_PRECISION float R;
  300. uniform COMPAT_PRECISION float cornersize;
  301. uniform COMPAT_PRECISION float cornersmooth;
  302. uniform COMPAT_PRECISION float x_tilt;
  303. uniform COMPAT_PRECISION float y_tilt;
  304. uniform COMPAT_PRECISION float overscan_x;
  305. uniform COMPAT_PRECISION float overscan_y;
  306. uniform COMPAT_PRECISION float DOTMASK;
  307. uniform COMPAT_PRECISION float SHARPER;
  308. uniform COMPAT_PRECISION float scanline_weight;
  309. uniform COMPAT_PRECISION float lum;
  310. uniform COMPAT_PRECISION float interlace_detect;
  311. uniform COMPAT_PRECISION float SATURATION;
  312. #endif
  313.  
  314. float intersect(vec2 xy)
  315. {
  316. float A = dot(xy,xy)+d*d;
  317. float B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);
  318. float C = d*d + 2.0*R*d*cosangle.x*cosangle.y;
  319. return (-B-sqrt(B*B-4.0*A*C))/(2.0*A);
  320. }
  321.  
  322. vec2 bkwtrans(vec2 xy)
  323. {
  324. float c = intersect(xy);
  325. vec2 point = vec2(c)*xy;
  326. point -= vec2(-R)*sinangle;
  327. point /= vec2(R);
  328. vec2 tang = sinangle/cosangle;
  329. vec2 poc = point/cosangle;
  330. float A = dot(tang,tang)+1.0;
  331. float B = -2.0*dot(poc,tang);
  332. float C = dot(poc,poc)-1.0;
  333. float a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);
  334. vec2 uv = (point-a*sinangle)/cosangle;
  335. float r = FIX(R*acos(a));
  336. return uv*r/sin(r/R);
  337. }
  338.  
  339. vec2 transform(vec2 coord)
  340. {
  341. coord *= rubyTextureSize / rubyInputSize;
  342. coord = (coord-vec2(0.5))*aspect*stretch.z+stretch.xy;
  343. return (bkwtrans(coord)/vec2(overscan_x / 100.0, overscan_y / 100.0)/aspect+vec2(0.5)) * rubyInputSize / rubyTextureSize;
  344. }
  345.  
  346. float corner(vec2 coord)
  347. {
  348. coord *= rubyTextureSize / rubyInputSize;
  349. coord = (coord - vec2(0.5)) * vec2(overscan_x / 100.0, overscan_y / 100.0) + vec2(0.5);
  350. coord = min(coord, vec2(1.0)-coord) * aspect;
  351. vec2 cdist = vec2(cornersize);
  352. coord = (cdist - min(coord,cdist));
  353. float dist = sqrt(dot(coord,coord));
  354. return clamp((cdist.x-dist)*cornersmooth,0.0, 1.0)*1.0001;
  355. }
  356.  
  357. // Calculate the influence of a scanline on the current pixel.
  358. //
  359. // 'distance' is the distance in texture coordinates from the current
  360. // pixel to the scanline in question.
  361. // 'color' is the colour of the scanline at the horizontal location of
  362. // the current pixel.
  363. vec4 scanlineWeights(float distance, vec4 color)
  364. {
  365. // "wid" controls the width of the scanline beam, for each RGB
  366. // channel The "weights" lines basically specify the formula
  367. // that gives you the profile of the beam, i.e. the intensity as
  368. // a function of distance from the vertical center of the
  369. // scanline. In this case, it is gaussian if width=2, and
  370. // becomes nongaussian for larger widths. Ideally this should
  371. // be normalized so that the integral across the beam is
  372. // independent of its width. That is, for a narrower beam
  373. // "weights" should have a higher peak at the center of the
  374. // scanline than for a wider beam.
  375. #ifdef USEGAUSSIAN
  376. vec4 wid = 0.3 + 0.1 * pow(color, vec4(3.0));
  377. vec4 weights = vec4(distance / wid);
  378. return (lum + 0.4) * exp(-weights * weights) / wid;
  379. #else
  380. vec4 wid = 2.0 + 2.0 * pow(color, vec4(4.0));
  381. vec4 weights = vec4(distance / scanline_weight);
  382. return (lum + 1.4) * exp(-pow(weights * inversesqrt(0.5 * wid), wid)) / (0.6 + 0.2 * wid);
  383. #endif
  384. }
  385.  
  386. vec3 saturation (vec3 textureColor)
  387. {
  388. float lum1=length(textureColor)*0.5775;
  389.  
  390. vec3 luminanceWeighting = vec3(0.3,0.6,0.1);
  391. if (lum1<0.5) luminanceWeighting.rgb=(luminanceWeighting.rgb*luminanceWeighting.rgb)+(luminanceWeighting.rgb*luminanceWeighting.rgb);
  392.  
  393. float luminance = dot(textureColor, luminanceWeighting);
  394. vec3 greyScaleColor = vec3(luminance);
  395.  
  396. vec3 res = vec3(mix(greyScaleColor, textureColor, SATURATION));
  397. return res;
  398. }
  399.  
  400. void main()
  401. {
  402. // Here's a helpful diagram to keep in mind while trying to
  403. // understand the code:
  404. //
  405. // | | | | |
  406. // -------------------------------
  407. // | | | | |
  408. // | 01 | 11 | 21 | 31 | <-- current scanline
  409. // | | @ | | |
  410. // -------------------------------
  411. // | | | | |
  412. // | 02 | 12 | 22 | 32 | <-- next scanline
  413. // | | | | |
  414. // -------------------------------
  415. // | | | | |
  416. //
  417. // Each character-cell represents a pixel on the output
  418. // surface, "@" represents the current pixel (always somewhere
  419. // in the bottom half of the current scan-line, or the top-half
  420. // of the next scanline). The grid of lines represents the
  421. // edges of the texels of the underlying texture.
  422.  
  423. // Texture coordinates of the texel containing the active pixel.
  424. vec2 xy = (CURVATURE > 0.5) ? transform(v_texCoord.xy) : v_texCoord.xy;
  425.  
  426. float cval = corner(xy);
  427.  
  428. // Of all the pixels that are mapped onto the texel we are
  429. // currently rendering, which pixel are we currently rendering?
  430. vec2 ilvec = vec2(0.0,ilfac.y * interlace_detect > 1.5 ? mod(float(rubyFrameCount),2.0) : 0.0);
  431. vec2 ratio_scale = (xy * rubyTextureSize - vec2(0.5) + ilvec)/ilfac;
  432. #ifdef OVERSAMPLE
  433. float filter_ = rubyInputSize.y/rubyOutputSize.y;//fwidth(ratio_scale.y);
  434. #endif
  435. vec2 uv_ratio = fract(ratio_scale);
  436.  
  437. // Snap to the center of the underlying texel.
  438. xy = (floor(ratio_scale)*ilfac + vec2(0.5) - ilvec) / rubyTextureSize;
  439.  
  440. // Calculate Lanczos scaling coefficients describing the effect
  441. // of various neighbour texels in a scanline on the current
  442. // pixel.
  443. vec4 coeffs = PI * vec4(1.0 + uv_ratio.x, uv_ratio.x, 1.0 - uv_ratio.x, 2.0 - uv_ratio.x);
  444.  
  445. // Prevent division by zero.
  446. coeffs = FIX(coeffs);
  447.  
  448. // Lanczos2 kernel.
  449. coeffs = 2.0 * sin(coeffs) * sin(coeffs / 2.0) / (coeffs * coeffs);
  450.  
  451. // Normalize.
  452. coeffs /= dot(coeffs, vec4(1.0));
  453.  
  454. // Calculate the effective colour of the current and next
  455. // scanlines at the horizontal location of the current pixel,
  456. // using the Lanczos coefficients above.
  457. vec4 col = clamp(mat4(
  458. TEX2D(xy + vec2(-one.x, 0.0)),
  459. TEX2D(xy),
  460. TEX2D(xy + vec2(one.x, 0.0)),
  461. TEX2D(xy + vec2(2.0 * one.x, 0.0))) * coeffs,
  462. 0.0, 1.0);
  463. vec4 col2 = clamp(mat4(
  464. TEX2D(xy + vec2(-one.x, one.y)),
  465. TEX2D(xy + vec2(0.0, one.y)),
  466. TEX2D(xy + one),
  467. TEX2D(xy + vec2(2.0 * one.x, one.y))) * coeffs,
  468. 0.0, 1.0);
  469.  
  470. #ifndef LINEAR_PROCESSING
  471. col = pow(col , vec4(CRTgamma));
  472. col2 = pow(col2, vec4(CRTgamma));
  473. #endif
  474.  
  475. // Calculate the influence of the current and next scanlines on
  476. // the current pixel.
  477. vec4 weights = scanlineWeights(uv_ratio.y, col);
  478. vec4 weights2 = scanlineWeights(1.0 - uv_ratio.y, col2);
  479. #ifdef OVERSAMPLE
  480. uv_ratio.y =uv_ratio.y+1.0/3.0*filter_;
  481. weights = (weights+scanlineWeights(uv_ratio.y, col))/3.0;
  482. weights2=(weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2))/3.0;
  483. uv_ratio.y =uv_ratio.y-2.0/3.0*filter_;
  484. weights=weights+scanlineWeights(abs(uv_ratio.y), col)/3.0;
  485. weights2=weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2)/3.0;
  486. #endif
  487.  
  488. vec3 mul_res = (col * weights + col2 * weights2).rgb * vec3(cval);
  489.  
  490. // dot-mask emulation:
  491. // Output pixels are alternately tinted green and magenta.
  492. vec3 dotMaskWeights = mix(
  493. vec3(1.0, 1.0 - DOTMASK, 1.0),
  494. vec3(1.0 - DOTMASK, 1.0, 1.0 - DOTMASK),
  495. floor(mod(mod_factor, 2.0))
  496. );
  497.  
  498. mul_res *= dotMaskWeights;
  499.  
  500. // Convert the image gamma for display on our output device.
  501. mul_res = pow(mul_res, vec3(1.0 / monitorgamma));
  502. mul_res = saturation(mul_res);
  503.  
  504. // Color the texel.
  505. output_dummy _OUT;
  506. _OUT._color = vec4(mul_res, 1.0);
  507. FragColor = _OUT._color;
  508. return;
  509. }
  510. #endif
  511.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement