desmond_hume

Steam - SOMA's error

Oct 22nd, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 120.87 KB | None | 0 0
  1. Loading data from cloud storage
  2. --------------------------------------------------------
  3. Files on steam cloud:
  4. No could files found!
  5. Time: 0
  6. --------------------------------------------------------
  7.  
  8. Version 1.03
  9. -------- THE HPL ENGINE LOG ------------
  10. Creating Engine Modules
  11. --------------------------------------------------------
  12. Creating job manager with 7 threads and 1024 jobs
  13. Creating graphics module
  14. Creating system module
  15. Creating resource module
  16. Creating input module
  17. Creating sound module
  18. Creating physics module
  19. Creating ai module
  20. Creating gui module
  21. Creating generate module
  22. Creating haptic module
  23. Creating scene module
  24. Creating script module
  25. Creating lipsync module
  26. --------------------------------------------------------
  27.  
  28. Initializing Resources Module
  29. --------------------------------------------------------
  30. Creating loader handlers
  31. Creating resource managers
  32. Adding loaders to handlers
  33. --------------------------------------------------------
  34.  
  35. Initializing Graphics Module
  36. --------------------------------------------------------
  37. Init lowlevel graphics: -1x-1 bpp:32 rr: 60 fs:0 ms:0 driver: 0 cap:'SOMA Loading...' pos:(-1x-1)
  38. Available drivers:
  39. (0) - 'x11'
  40. (1) - 'dummy'
  41. Creating window: (-1,-1) 1920 x 1080 - 32 bpp flags: 4099
  42. Setting display mode: 1920 x 1080 - 32 bpp 60 hz
  43. Init Glew...OK
  44. Setting up OpenGL
  45. Vendor: X.Org
  46. Renderer: Gallium 0.4 on AMD TAHITI
  47. Version: 3.0 Mesa 10.6.9 (git-8957b69)
  48. Max texture image units: 16
  49. Max texture coord units: 8
  50. Max texture buffer size: 2147483647
  51. Max texture array slices: 2048
  52. Max user clip planes: 8
  53. Two sided stencil: 1
  54. Vertex Buffer Object: 1
  55. Anisotropic filtering: 1
  56. Max Anisotropic degree: 16
  57. Multisampling: 1
  58. Texture compression: 1
  59. Texture compression S3TC: 1
  60. Texture compression 3DC: 1
  61. Texture sRGB: 1
  62. Geometry Instancing: 1
  63. Auto generate MipMaps: 1
  64. Render to texture: 1
  65. Max draw buffers: 8
  66. Max color render targets: 8
  67. Packed depth-stencil: 1
  68. Texture float: 1
  69. GLSL Version: 1.30
  70. ShaderModel 2: 1
  71. ShaderModel 3: 1
  72. ShaderModel 4: 0
  73. Max vertex uniforms: -1436050114
  74. Max fragment uniforms: 16384
  75. OGL ATIFragmentShader: 0
  76. Tesselation: 0
  77. MultiBindTex: 1
  78. ERROR: Failed to compile GLSL shader ''!
  79. Shader code:
  80. -------------------
  81. [0001] #version 330
  82. [0002] #extension GL_ARB_explicit_attrib_location : enable
  83. [0003] #extension GL_ARB_uniform_buffer_object : enable
  84. [0004] #extension GL_ARB_shading_language_420pack: enable
  85. [0005] #extension GL_ARB_draw_instanced : enable
  86. [0006] ////////////////////////////////////////////////////////
  87. [0007] // Skybox frag
  88. [0008] //
  89. [0009] //
  90. [0010] ////////////////////////////////////////////////////////
  91. [0011]
  92. [0012] //---------------------------------------------
  93. [0013]
  94. [0014] uniform mat4 a_mtxInvViewProjection;
  95. [0015]
  96. [0016] //---------------------------------------------
  97. [0017]
  98. [0018] ///////////////////////////////
  99. [0019] // Main program
  100. [0020] in vec4 vtx_vPosition;
  101. [0021] in vec4 vtx_vColor;
  102. [0022] out vec4 px_vTexCoord0;
  103. [0023] out vec4 px_vColor;
  104. [0024]
  105. [0025] void main()
  106. [0026] {
  107. [0027] int vtx_lVertexID = gl_VertexID;
  108. [0028] int vtx_lInstanceID = gl_InstanceID;
  109. [0029]
  110. [0030] vec4 px_vPosition = vec4(0);
  111. [0031]
  112. [0032]
  113. [0033] ///////////
  114. [0034] // Fullscreen quad that does not clip geometry
  115. [0035] px_vPosition = vec4(vtx_vPosition.xy, 1.0f, 1.0f);
  116. [0036]
  117. [0037] //////////////////////
  118. [0038] // Transform the projected position to world space
  119. [0039] px_vTexCoord0 = ((a_mtxInvViewProjection) * (vtx_vPosition)) * vec4(-1,1,1,1);
  120. [0040] px_vTexCoord0 /= px_vTexCoord0.w;
  121. [0041]
  122. [0042] //////////////////////
  123. [0043] // Color
  124. [0044] px_vColor = vtx_vColor;
  125. [0045]
  126. [0046] gl_Position = px_vPosition;
  127. ---------------------
  128. Compile log:
  129. ---------------------
  130. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  131.  
  132. ---------------------
  133. ERROR: Couldn't create program 'base_skybox_vtx.hpsl'
  134. ERROR: Could not load program manager 'Deferred' shader 'base_skybox_vtx.hpsl'
  135. ERROR: Failed to compile GLSL shader ''!
  136. Shader code:
  137. -------------------
  138. [0001] #version 330
  139. [0002] #extension GL_ARB_explicit_attrib_location : enable
  140. [0003] #extension GL_ARB_uniform_buffer_object : enable
  141. [0004] #extension GL_ARB_shading_language_420pack: enable
  142. [0005] #extension GL_ARB_draw_instanced : enable
  143. [0006] ////////////////////////////////////////////////////////
  144. [0007] // Deferred Base - Vertex Shader
  145. [0008] //
  146. [0009] //
  147. [0010] ////////////////////////////////////////////////////////
  148. [0011]
  149. [0012]
  150. [0013]
  151. [0014]
  152. [0015] ////////////////////////
  153. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  154. [0017]
  155. [0018]
  156. [0019]
  157. [0020]
  158. [0021]
  159. [0022]
  160. [0023]
  161. [0024]
  162. [0025]
  163. [0026]
  164. [0027]
  165. [0028]
  166. [0029]
  167. [0030]
  168. [0031]
  169. [0032]
  170. [0033]
  171. [0034]
  172. [0035]
  173. [0036]
  174. [0037]
  175. [0038]
  176. [0039]
  177. [0040]
  178. [0041]
  179. [0042]
  180. [0043]
  181. [0044]
  182. [0045]
  183. [0046]
  184. [0047]
  185. [0048]
  186. [0049]
  187. [0050]
  188. [0051]
  189. [0052]
  190. [0053]
  191. [0054]
  192. [0055]
  193. [0056]
  194. [0057]
  195. [0058]
  196. [0059]
  197. [0060]
  198. [0061]
  199. [0062]
  200. [0063]
  201. [0064]
  202. [0065]
  203. [0066]
  204. [0067]
  205. [0068]
  206. [0069]
  207. [0070]
  208. [0071]
  209. [0072]
  210. [0073]
  211. [0074]
  212. [0075]
  213. [0076]
  214. [0077]
  215. [0078]
  216. [0079]
  217. [0080]
  218. [0081]
  219. [0082]
  220. [0083]
  221. [0084]
  222. [0085]
  223. [0086]
  224. [0087]
  225. [0088] //---------------------------------------------
  226. [0089]
  227. [0090]
  228. [0091]
  229. [0092] //---------------------------------------------
  230. [0093]
  231. [0094] //////////////////
  232. [0095] // Arguments
  233. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  234. [0097] {
  235. [0098] //////////////
  236. [0099] // Default input
  237. [0100] mat4 a_mtxProjection;
  238. [0101] mat4 a_mtxModelViewProjection;
  239. [0102] mat4 a_mtxModelView;
  240. [0103] mat4 a_mtxUV;
  241. [0104] mat4 a_mtxModel;
  242. [0105] mat4 a_mtxNormal;
  243. [0106]
  244. [0107]
  245. [0108] };
  246. [0109]
  247. [0110]
  248. [0111]
  249. [0112]
  250. [0113]
  251. [0114] ///////////////////////
  252. [0115] // Mesh instancing
  253. [0116]
  254. [0117]
  255. [0118]
  256. [0119]
  257. [0120] //---------------------------------------------
  258. [0121]
  259. [0122] ///////////////////////////////
  260. [0123] // Main program
  261. [0124] in vec4 vtx_vPosition;
  262. [0125] in vec4 vtx_vTexCoord0;
  263. [0126] in vec4 vtx_vTexCoord1;
  264. [0127] in vec3 vtx_vNormal;
  265. [0128] in vec4 vtx_vTangent;
  266. [0129] in vec4 vtx_vColor;
  267. [0130] in vec4 vtx_vBoneIndices;
  268. [0131] in vec4 vtx_vBoneWeight;
  269. [0132]
  270. [0133] void main()
  271. [0134] {
  272. [0135] int vtx_lVertexID = gl_VertexID;
  273. [0136] int vtx_lInstanceID = gl_InstanceID;
  274. [0137]
  275. [0138] vec4 px_vPosition = vec4(0);
  276. [0139]
  277. [0140]
  278. [0141] /////////////
  279. [0142] // load instance data
  280. [0143]
  281. [0144]
  282. [0145]
  283. [0146]
  284. [0147] //////////////////////
  285. [0148] // Position - Skeleton
  286. [0149]
  287. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  288. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  289. [0152]
  290. [0153]
  291. [0154] //////////////////////
  292. [0155] // Uv
  293. [0156]
  294. [0157]
  295. [0158] //////////////////////
  296. [0159] // Color
  297. [0160]
  298. [0161]
  299. [0162]
  300. [0163]
  301. [0164]
  302. [0165]
  303. [0166]
  304. [0167]
  305. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  306. [0169]
  307. [0170]
  308. [0171] //////////////////////
  309. [0172] // Normals
  310. [0173]
  311. [0174]
  312. [0175] //////////////////////
  313. [0176] // Normalmapping
  314. [0177]
  315. [0178]
  316. [0179] //////////////////////
  317. [0180] // Parallax
  318. [0181]
  319. [0182]
  320. [0183]
  321. [0184] /////////
  322. [0185] // Angle fade
  323. [0186]
  324. [0187]
  325. [0188]
  326. [0189] //////////////////////
  327. [0190] // Linear depth
  328. [0191]
  329. [0192]
  330. [0193] //////////////////////
  331. [0194] // Vertex Position
  332. [0195]
  333. [0196]
  334. [0197] ////////////////////
  335. [0198] // Scrolling noise
  336. [0199]
  337. [0200]
  338. [0201] //////////////////////
  339. [0202] // Deferring (Lights)
  340. [0203]
  341. [0204]
  342. [0205] gl_Position = px_vPosition;
  343. [0206] }
  344. [0207]
  345. ---------------------
  346. Compile log:
  347. ---------------------
  348. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  349.  
  350. ---------------------
  351. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  352. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  353. ERROR: Failed to compile GLSL shader ''!
  354. Shader code:
  355. -------------------
  356. [0001] #version 330
  357. [0002] #extension GL_ARB_explicit_attrib_location : enable
  358. [0003] #extension GL_ARB_uniform_buffer_object : enable
  359. [0004] #extension GL_ARB_shading_language_420pack: enable
  360. [0005] #extension GL_ARB_draw_instanced : enable
  361. [0006] ////////////////////////////////////////////////////////
  362. [0007] // Base - Vertex Shader
  363. [0008] //
  364. [0009] //
  365. [0010] ////////////////////////////////////////////////////////
  366. [0011]
  367. [0012] //---------------------------------------------
  368. [0013]
  369. [0014] uniform mat4 a_mtxModelViewProjection;
  370. [0015] uniform mat4 a_mtxModelNormal;
  371. [0016]
  372. [0017]
  373. [0018]
  374. [0019] //////////////////////////////////////
  375. [0020] // UV Animation variables
  376. [0021]
  377. [0022]
  378. [0023] //---------------------------------------------
  379. [0024]
  380. [0025] ///////////////////////////////
  381. [0026] // Main program
  382. [0027] in vec4 vtx_vPosition;
  383. [0028] in vec4 vtx_vTexCoord0;
  384. [0029] in vec4 vtx_vTexCoord1;
  385. [0030] in vec3 vtx_vNormal;
  386. [0031] in vec4 vtx_vTangent;
  387. [0032] in vec4 vtx_vColor;
  388. [0033] out vec4 px_vTexCoord0;
  389. [0034]
  390. [0035] void main()
  391. [0036] {
  392. [0037] int vtx_lVertexID = gl_VertexID;
  393. [0038] int vtx_lInstanceID = gl_InstanceID;
  394. [0039]
  395. [0040] vec4 px_vPosition = vec4(0);
  396. [0041]
  397. [0042]
  398. [0043] vec4 vLocalVertexPos = vtx_vPosition;
  399. [0044] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  400. [0045]
  401. [0046] //////////////////////
  402. [0047] // Uv
  403. [0048]
  404. [0049]
  405. [0050] //////////////////////
  406. [0051] // Color
  407. [0052]
  408. [0053]
  409. [0054]
  410. [0055]
  411. [0056]
  412. [0057]
  413. [0058]
  414. [0059] //////////////////////
  415. [0060] // Normals
  416. [0061]
  417. [0062]
  418. [0063] //////////////////////
  419. [0064] // Normalmapping
  420. [0065]
  421. [0066]
  422. [0067] gl_Position = px_vPosition;
  423. ---------------------
  424. Compile log:
  425. ---------------------
  426. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  427.  
  428. ---------------------
  429. ERROR: Couldn't create program 'base_vtx.hpsl'
  430. ERROR: Could not load program manager 'Deferred' shader 'base_vtx.hpsl'
  431. ERROR: Failed to compile GLSL shader ''!
  432. Shader code:
  433. -------------------
  434. [0001] #version 330
  435. [0002] #extension GL_ARB_explicit_attrib_location : enable
  436. [0003] #extension GL_ARB_uniform_buffer_object : enable
  437. [0004] #extension GL_ARB_shading_language_420pack: enable
  438. [0005] #extension GL_ARB_draw_instanced : enable
  439. [0006] ////////////////////////////////////////////////////////
  440. [0007] // Skybox frag
  441. [0008] //
  442. [0009] //
  443. [0010] ////////////////////////////////////////////////////////
  444. [0011]
  445. [0012] //---------------------------------------------
  446. [0013]
  447. [0014] uniform mat4 a_mtxInvViewProjection;
  448. [0015]
  449. [0016] //---------------------------------------------
  450. [0017]
  451. [0018] ///////////////////////////////
  452. [0019] // Main program
  453. [0020] in vec4 vtx_vPosition;
  454. [0021] in vec4 vtx_vColor;
  455. [0022] out vec4 px_vTexCoord0;
  456. [0023] out vec4 px_vColor;
  457. [0024]
  458. [0025] void main()
  459. [0026] {
  460. [0027] int vtx_lVertexID = gl_VertexID;
  461. [0028] int vtx_lInstanceID = gl_InstanceID;
  462. [0029]
  463. [0030] vec4 px_vPosition = vec4(0);
  464. [0031]
  465. [0032]
  466. [0033] ///////////
  467. [0034] // Fullscreen quad that does not clip geometry
  468. [0035] px_vPosition = vec4(vtx_vPosition.xy, 1.0f, 1.0f);
  469. [0036]
  470. [0037] //////////////////////
  471. [0038] // Transform the projected position to world space
  472. [0039] px_vTexCoord0 = ((a_mtxInvViewProjection) * (vtx_vPosition)) * vec4(-1,1,1,1);
  473. [0040] px_vTexCoord0 /= px_vTexCoord0.w;
  474. [0041]
  475. [0042] //////////////////////
  476. [0043] // Color
  477. [0044] px_vColor = vtx_vColor;
  478. [0045]
  479. [0046] gl_Position = px_vPosition;
  480. ---------------------
  481. Compile log:
  482. ---------------------
  483. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  484.  
  485. ---------------------
  486. ERROR: Couldn't create program 'base_skybox_vtx.hpsl'
  487. ERROR: Could not load program manager 'WireFrame' shader 'base_skybox_vtx.hpsl'
  488. ERROR: Failed to compile GLSL shader ''!
  489. Shader code:
  490. -------------------
  491. [0001] #version 330
  492. [0002] #extension GL_ARB_explicit_attrib_location : enable
  493. [0003] #extension GL_ARB_uniform_buffer_object : enable
  494. [0004] #extension GL_ARB_shading_language_420pack: enable
  495. [0005] #extension GL_ARB_draw_instanced : enable
  496. [0006] ////////////////////////////////////////////////////////
  497. [0007] // Deferred Base - Vertex Shader
  498. [0008] //
  499. [0009] //
  500. [0010] ////////////////////////////////////////////////////////
  501. [0011]
  502. [0012]
  503. [0013]
  504. [0014]
  505. [0015] ////////////////////////
  506. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  507. [0017]
  508. [0018]
  509. [0019]
  510. [0020]
  511. [0021]
  512. [0022]
  513. [0023]
  514. [0024]
  515. [0025]
  516. [0026]
  517. [0027]
  518. [0028]
  519. [0029]
  520. [0030]
  521. [0031]
  522. [0032]
  523. [0033]
  524. [0034]
  525. [0035]
  526. [0036]
  527. [0037]
  528. [0038]
  529. [0039]
  530. [0040]
  531. [0041]
  532. [0042]
  533. [0043]
  534. [0044]
  535. [0045]
  536. [0046]
  537. [0047]
  538. [0048]
  539. [0049]
  540. [0050]
  541. [0051]
  542. [0052]
  543. [0053]
  544. [0054]
  545. [0055]
  546. [0056]
  547. [0057]
  548. [0058]
  549. [0059]
  550. [0060]
  551. [0061]
  552. [0062]
  553. [0063]
  554. [0064]
  555. [0065]
  556. [0066]
  557. [0067]
  558. [0068]
  559. [0069]
  560. [0070]
  561. [0071]
  562. [0072]
  563. [0073]
  564. [0074]
  565. [0075]
  566. [0076]
  567. [0077]
  568. [0078]
  569. [0079]
  570. [0080]
  571. [0081]
  572. [0082]
  573. [0083]
  574. [0084]
  575. [0085]
  576. [0086]
  577. [0087]
  578. [0088] //---------------------------------------------
  579. [0089]
  580. [0090]
  581. [0091]
  582. [0092] //---------------------------------------------
  583. [0093]
  584. [0094] //////////////////
  585. [0095] // Arguments
  586. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  587. [0097] {
  588. [0098] //////////////
  589. [0099] // Default input
  590. [0100] mat4 a_mtxProjection;
  591. [0101] mat4 a_mtxModelViewProjection;
  592. [0102] mat4 a_mtxModelView;
  593. [0103] mat4 a_mtxUV;
  594. [0104] mat4 a_mtxModel;
  595. [0105] mat4 a_mtxNormal;
  596. [0106]
  597. [0107]
  598. [0108] };
  599. [0109]
  600. [0110]
  601. [0111]
  602. [0112]
  603. [0113]
  604. [0114] ///////////////////////
  605. [0115] // Mesh instancing
  606. [0116]
  607. [0117]
  608. [0118]
  609. [0119]
  610. [0120] //---------------------------------------------
  611. [0121]
  612. [0122] ///////////////////////////////
  613. [0123] // Main program
  614. [0124] in vec4 vtx_vPosition;
  615. [0125] in vec4 vtx_vTexCoord0;
  616. [0126] in vec4 vtx_vTexCoord1;
  617. [0127] in vec3 vtx_vNormal;
  618. [0128] in vec4 vtx_vTangent;
  619. [0129] in vec4 vtx_vColor;
  620. [0130] in vec4 vtx_vBoneIndices;
  621. [0131] in vec4 vtx_vBoneWeight;
  622. [0132]
  623. [0133] void main()
  624. [0134] {
  625. [0135] int vtx_lVertexID = gl_VertexID;
  626. [0136] int vtx_lInstanceID = gl_InstanceID;
  627. [0137]
  628. [0138] vec4 px_vPosition = vec4(0);
  629. [0139]
  630. [0140]
  631. [0141] /////////////
  632. [0142] // load instance data
  633. [0143]
  634. [0144]
  635. [0145]
  636. [0146]
  637. [0147] //////////////////////
  638. [0148] // Position - Skeleton
  639. [0149]
  640. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  641. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  642. [0152]
  643. [0153]
  644. [0154] //////////////////////
  645. [0155] // Uv
  646. [0156]
  647. [0157]
  648. [0158] //////////////////////
  649. [0159] // Color
  650. [0160]
  651. [0161]
  652. [0162]
  653. [0163]
  654. [0164]
  655. [0165]
  656. [0166]
  657. [0167]
  658. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  659. [0169]
  660. [0170]
  661. [0171] //////////////////////
  662. [0172] // Normals
  663. [0173]
  664. [0174]
  665. [0175] //////////////////////
  666. [0176] // Normalmapping
  667. [0177]
  668. [0178]
  669. [0179] //////////////////////
  670. [0180] // Parallax
  671. [0181]
  672. [0182]
  673. [0183]
  674. [0184] /////////
  675. [0185] // Angle fade
  676. [0186]
  677. [0187]
  678. [0188]
  679. [0189] //////////////////////
  680. [0190] // Linear depth
  681. [0191]
  682. [0192]
  683. [0193] //////////////////////
  684. [0194] // Vertex Position
  685. [0195]
  686. [0196]
  687. [0197] ////////////////////
  688. [0198] // Scrolling noise
  689. [0199]
  690. [0200]
  691. [0201] //////////////////////
  692. [0202] // Deferring (Lights)
  693. [0203]
  694. [0204]
  695. [0205] gl_Position = px_vPosition;
  696. [0206] }
  697. [0207]
  698. ---------------------
  699. Compile log:
  700. ---------------------
  701. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  702.  
  703. ---------------------
  704. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  705. ERROR: Could not load program manager 'WireFrame' shader 'deferred_base_vtx.hpsl'
  706. ERROR: Failed to compile GLSL shader ''!
  707. Shader code:
  708. -------------------
  709. [0001] #version 330
  710. [0002] #extension GL_ARB_explicit_attrib_location : enable
  711. [0003] #extension GL_ARB_uniform_buffer_object : enable
  712. [0004] #extension GL_ARB_shading_language_420pack: enable
  713. [0005] #extension GL_ARB_draw_instanced : enable
  714. [0006] ////////////////////////////////////////////////////////
  715. [0007] // Base - Vertex Shader
  716. [0008] //
  717. [0009] //
  718. [0010] ////////////////////////////////////////////////////////
  719. [0011]
  720. [0012] //---------------------------------------------
  721. [0013]
  722. [0014] uniform mat4 a_mtxModelViewProjection;
  723. [0015] uniform mat4 a_mtxModelNormal;
  724. [0016]
  725. [0017]
  726. [0018]
  727. [0019] //////////////////////////////////////
  728. [0020] // UV Animation variables
  729. [0021]
  730. [0022]
  731. [0023] //---------------------------------------------
  732. [0024]
  733. [0025] ///////////////////////////////
  734. [0026] // Main program
  735. [0027] in vec4 vtx_vPosition;
  736. [0028] in vec4 vtx_vTexCoord0;
  737. [0029] in vec4 vtx_vTexCoord1;
  738. [0030] in vec3 vtx_vNormal;
  739. [0031] in vec4 vtx_vTangent;
  740. [0032] in vec4 vtx_vColor;
  741. [0033] out vec4 px_vTexCoord0;
  742. [0034]
  743. [0035] void main()
  744. [0036] {
  745. [0037] int vtx_lVertexID = gl_VertexID;
  746. [0038] int vtx_lInstanceID = gl_InstanceID;
  747. [0039]
  748. [0040] vec4 px_vPosition = vec4(0);
  749. [0041]
  750. [0042]
  751. [0043] vec4 vLocalVertexPos = vtx_vPosition;
  752. [0044] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  753. [0045]
  754. [0046] //////////////////////
  755. [0047] // Uv
  756. [0048]
  757. [0049]
  758. [0050] //////////////////////
  759. [0051] // Color
  760. [0052]
  761. [0053]
  762. [0054]
  763. [0055]
  764. [0056]
  765. [0057]
  766. [0058]
  767. [0059] //////////////////////
  768. [0060] // Normals
  769. [0061]
  770. [0062]
  771. [0063] //////////////////////
  772. [0064] // Normalmapping
  773. [0065]
  774. [0066]
  775. [0067] gl_Position = px_vPosition;
  776. ---------------------
  777. Compile log:
  778. ---------------------
  779. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  780.  
  781. ---------------------
  782. ERROR: Couldn't create program 'base_vtx.hpsl'
  783. ERROR: Could not load program manager 'WireFrame' shader 'base_vtx.hpsl'
  784. ERROR: Failed to compile GLSL shader ''!
  785. Shader code:
  786. -------------------
  787. [0001] #version 330
  788. [0002] #extension GL_ARB_explicit_attrib_location : enable
  789. [0003] #extension GL_ARB_uniform_buffer_object : enable
  790. [0004] #extension GL_ARB_shading_language_420pack: enable
  791. [0005] #extension GL_ARB_draw_instanced : enable
  792. [0006] ////////////////////////////////////////////////////////
  793. [0007] // Skybox frag
  794. [0008] //
  795. [0009] //
  796. [0010] ////////////////////////////////////////////////////////
  797. [0011]
  798. [0012] //---------------------------------------------
  799. [0013]
  800. [0014] uniform mat4 a_mtxInvViewProjection;
  801. [0015]
  802. [0016] //---------------------------------------------
  803. [0017]
  804. [0018] ///////////////////////////////
  805. [0019] // Main program
  806. [0020] in vec4 vtx_vPosition;
  807. [0021] in vec4 vtx_vColor;
  808. [0022] out vec4 px_vTexCoord0;
  809. [0023] out vec4 px_vColor;
  810. [0024]
  811. [0025] void main()
  812. [0026] {
  813. [0027] int vtx_lVertexID = gl_VertexID;
  814. [0028] int vtx_lInstanceID = gl_InstanceID;
  815. [0029]
  816. [0030] vec4 px_vPosition = vec4(0);
  817. [0031]
  818. [0032]
  819. [0033] ///////////
  820. [0034] // Fullscreen quad that does not clip geometry
  821. [0035] px_vPosition = vec4(vtx_vPosition.xy, 1.0f, 1.0f);
  822. [0036]
  823. [0037] //////////////////////
  824. [0038] // Transform the projected position to world space
  825. [0039] px_vTexCoord0 = ((a_mtxInvViewProjection) * (vtx_vPosition)) * vec4(-1,1,1,1);
  826. [0040] px_vTexCoord0 /= px_vTexCoord0.w;
  827. [0041]
  828. [0042] //////////////////////
  829. [0043] // Color
  830. [0044] px_vColor = vtx_vColor;
  831. [0045]
  832. [0046] gl_Position = px_vPosition;
  833. ---------------------
  834. Compile log:
  835. ---------------------
  836. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  837.  
  838. ---------------------
  839. ERROR: Couldn't create program 'base_skybox_vtx.hpsl'
  840. ERROR: Could not load program manager 'Simple' shader 'base_skybox_vtx.hpsl'
  841. ERROR: Failed to compile GLSL shader ''!
  842. Shader code:
  843. -------------------
  844. [0001] #version 330
  845. [0002] #extension GL_ARB_explicit_attrib_location : enable
  846. [0003] #extension GL_ARB_uniform_buffer_object : enable
  847. [0004] #extension GL_ARB_shading_language_420pack: enable
  848. [0005] #extension GL_ARB_draw_instanced : enable
  849. [0006] ////////////////////////////////////////////////////////
  850. [0007] // Deferred Base - Vertex Shader
  851. [0008] //
  852. [0009] //
  853. [0010] ////////////////////////////////////////////////////////
  854. [0011]
  855. [0012]
  856. [0013]
  857. [0014]
  858. [0015] ////////////////////////
  859. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  860. [0017]
  861. [0018]
  862. [0019]
  863. [0020]
  864. [0021]
  865. [0022]
  866. [0023]
  867. [0024]
  868. [0025]
  869. [0026]
  870. [0027]
  871. [0028]
  872. [0029]
  873. [0030]
  874. [0031]
  875. [0032]
  876. [0033]
  877. [0034]
  878. [0035]
  879. [0036]
  880. [0037]
  881. [0038]
  882. [0039]
  883. [0040]
  884. [0041]
  885. [0042]
  886. [0043]
  887. [0044]
  888. [0045]
  889. [0046]
  890. [0047]
  891. [0048]
  892. [0049]
  893. [0050]
  894. [0051]
  895. [0052]
  896. [0053]
  897. [0054]
  898. [0055]
  899. [0056]
  900. [0057]
  901. [0058]
  902. [0059]
  903. [0060]
  904. [0061]
  905. [0062]
  906. [0063]
  907. [0064]
  908. [0065]
  909. [0066]
  910. [0067]
  911. [0068]
  912. [0069]
  913. [0070]
  914. [0071]
  915. [0072]
  916. [0073]
  917. [0074]
  918. [0075]
  919. [0076]
  920. [0077]
  921. [0078]
  922. [0079]
  923. [0080]
  924. [0081]
  925. [0082]
  926. [0083]
  927. [0084]
  928. [0085]
  929. [0086]
  930. [0087]
  931. [0088] //---------------------------------------------
  932. [0089]
  933. [0090]
  934. [0091]
  935. [0092] //---------------------------------------------
  936. [0093]
  937. [0094] //////////////////
  938. [0095] // Arguments
  939. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  940. [0097] {
  941. [0098] //////////////
  942. [0099] // Default input
  943. [0100] mat4 a_mtxProjection;
  944. [0101] mat4 a_mtxModelViewProjection;
  945. [0102] mat4 a_mtxModelView;
  946. [0103] mat4 a_mtxUV;
  947. [0104] mat4 a_mtxModel;
  948. [0105] mat4 a_mtxNormal;
  949. [0106]
  950. [0107]
  951. [0108] };
  952. [0109]
  953. [0110]
  954. [0111]
  955. [0112]
  956. [0113]
  957. [0114] ///////////////////////
  958. [0115] // Mesh instancing
  959. [0116]
  960. [0117]
  961. [0118]
  962. [0119]
  963. [0120] //---------------------------------------------
  964. [0121]
  965. [0122] ///////////////////////////////
  966. [0123] // Main program
  967. [0124] in vec4 vtx_vPosition;
  968. [0125] in vec4 vtx_vTexCoord0;
  969. [0126] in vec4 vtx_vTexCoord1;
  970. [0127] in vec3 vtx_vNormal;
  971. [0128] in vec4 vtx_vTangent;
  972. [0129] in vec4 vtx_vColor;
  973. [0130] in vec4 vtx_vBoneIndices;
  974. [0131] in vec4 vtx_vBoneWeight;
  975. [0132]
  976. [0133] void main()
  977. [0134] {
  978. [0135] int vtx_lVertexID = gl_VertexID;
  979. [0136] int vtx_lInstanceID = gl_InstanceID;
  980. [0137]
  981. [0138] vec4 px_vPosition = vec4(0);
  982. [0139]
  983. [0140]
  984. [0141] /////////////
  985. [0142] // load instance data
  986. [0143]
  987. [0144]
  988. [0145]
  989. [0146]
  990. [0147] //////////////////////
  991. [0148] // Position - Skeleton
  992. [0149]
  993. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  994. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  995. [0152]
  996. [0153]
  997. [0154] //////////////////////
  998. [0155] // Uv
  999. [0156]
  1000. [0157]
  1001. [0158] //////////////////////
  1002. [0159] // Color
  1003. [0160]
  1004. [0161]
  1005. [0162]
  1006. [0163]
  1007. [0164]
  1008. [0165]
  1009. [0166]
  1010. [0167]
  1011. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  1012. [0169]
  1013. [0170]
  1014. [0171] //////////////////////
  1015. [0172] // Normals
  1016. [0173]
  1017. [0174]
  1018. [0175] //////////////////////
  1019. [0176] // Normalmapping
  1020. [0177]
  1021. [0178]
  1022. [0179] //////////////////////
  1023. [0180] // Parallax
  1024. [0181]
  1025. [0182]
  1026. [0183]
  1027. [0184] /////////
  1028. [0185] // Angle fade
  1029. [0186]
  1030. [0187]
  1031. [0188]
  1032. [0189] //////////////////////
  1033. [0190] // Linear depth
  1034. [0191]
  1035. [0192]
  1036. [0193] //////////////////////
  1037. [0194] // Vertex Position
  1038. [0195]
  1039. [0196]
  1040. [0197] ////////////////////
  1041. [0198] // Scrolling noise
  1042. [0199]
  1043. [0200]
  1044. [0201] //////////////////////
  1045. [0202] // Deferring (Lights)
  1046. [0203]
  1047. [0204]
  1048. [0205] gl_Position = px_vPosition;
  1049. [0206] }
  1050. [0207]
  1051. ---------------------
  1052. Compile log:
  1053. ---------------------
  1054. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  1055.  
  1056. ---------------------
  1057. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  1058. ERROR: Could not load program manager 'Simple' shader 'deferred_base_vtx.hpsl'
  1059. ERROR: Failed to compile GLSL shader ''!
  1060. Shader code:
  1061. -------------------
  1062. [0001] #version 330
  1063. [0002] #extension GL_ARB_explicit_attrib_location : enable
  1064. [0003] #extension GL_ARB_uniform_buffer_object : enable
  1065. [0004] #extension GL_ARB_shading_language_420pack: enable
  1066. [0005] #extension GL_ARB_draw_instanced : enable
  1067. [0006] ////////////////////////////////////////////////////////
  1068. [0007] // Base - Vertex Shader
  1069. [0008] //
  1070. [0009] //
  1071. [0010] ////////////////////////////////////////////////////////
  1072. [0011]
  1073. [0012] //---------------------------------------------
  1074. [0013]
  1075. [0014] uniform mat4 a_mtxModelViewProjection;
  1076. [0015] uniform mat4 a_mtxModelNormal;
  1077. [0016]
  1078. [0017]
  1079. [0018]
  1080. [0019] //////////////////////////////////////
  1081. [0020] // UV Animation variables
  1082. [0021]
  1083. [0022]
  1084. [0023] //---------------------------------------------
  1085. [0024]
  1086. [0025] ///////////////////////////////
  1087. [0026] // Main program
  1088. [0027] in vec4 vtx_vPosition;
  1089. [0028] in vec4 vtx_vTexCoord0;
  1090. [0029] in vec4 vtx_vTexCoord1;
  1091. [0030] in vec3 vtx_vNormal;
  1092. [0031] in vec4 vtx_vTangent;
  1093. [0032] in vec4 vtx_vColor;
  1094. [0033] out vec4 px_vTexCoord0;
  1095. [0034]
  1096. [0035] void main()
  1097. [0036] {
  1098. [0037] int vtx_lVertexID = gl_VertexID;
  1099. [0038] int vtx_lInstanceID = gl_InstanceID;
  1100. [0039]
  1101. [0040] vec4 px_vPosition = vec4(0);
  1102. [0041]
  1103. [0042]
  1104. [0043] vec4 vLocalVertexPos = vtx_vPosition;
  1105. [0044] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  1106. [0045]
  1107. [0046] //////////////////////
  1108. [0047] // Uv
  1109. [0048]
  1110. [0049]
  1111. [0050] //////////////////////
  1112. [0051] // Color
  1113. [0052]
  1114. [0053]
  1115. [0054]
  1116. [0055]
  1117. [0056]
  1118. [0057]
  1119. [0058]
  1120. [0059] //////////////////////
  1121. [0060] // Normals
  1122. [0061]
  1123. [0062]
  1124. [0063] //////////////////////
  1125. [0064] // Normalmapping
  1126. [0065]
  1127. [0066]
  1128. [0067] gl_Position = px_vPosition;
  1129. ---------------------
  1130. Compile log:
  1131. ---------------------
  1132. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  1133.  
  1134. ---------------------
  1135. ERROR: Couldn't create program 'base_vtx.hpsl'
  1136. ERROR: Could not load program manager 'Simple' shader 'base_vtx.hpsl'
  1137. ERROR: Failed to compile GLSL shader ''!
  1138. Shader code:
  1139. -------------------
  1140. [0001] #version 330
  1141. [0002] #extension GL_ARB_explicit_attrib_location : enable
  1142. [0003] #extension GL_ARB_uniform_buffer_object : enable
  1143. [0004] #extension GL_ARB_shading_language_420pack: enable
  1144. [0005] #extension GL_ARB_draw_instanced : enable
  1145. [0006] ////////////////////////////////////////////////////////
  1146. [0007] // Deferred Base - Vertex Shader
  1147. [0008] //
  1148. [0009] //
  1149. [0010] ////////////////////////////////////////////////////////
  1150. [0011]
  1151. [0012]
  1152. [0013]
  1153. [0014]
  1154. [0015] ////////////////////////
  1155. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  1156. [0017]
  1157. [0018]
  1158. [0019]
  1159. [0020]
  1160. [0021]
  1161. [0022]
  1162. [0023]
  1163. [0024]
  1164. [0025]
  1165. [0026]
  1166. [0027]
  1167. [0028]
  1168. [0029]
  1169. [0030]
  1170. [0031]
  1171. [0032]
  1172. [0033]
  1173. [0034]
  1174. [0035]
  1175. [0036]
  1176. [0037]
  1177. [0038]
  1178. [0039]
  1179. [0040]
  1180. [0041]
  1181. [0042]
  1182. [0043]
  1183. [0044]
  1184. [0045]
  1185. [0046]
  1186. [0047]
  1187. [0048]
  1188. [0049]
  1189. [0050]
  1190. [0051]
  1191. [0052]
  1192. [0053]
  1193. [0054]
  1194. [0055]
  1195. [0056]
  1196. [0057]
  1197. [0058]
  1198. [0059]
  1199. [0060]
  1200. [0061]
  1201. [0062]
  1202. [0063]
  1203. [0064]
  1204. [0065]
  1205. [0066]
  1206. [0067]
  1207. [0068]
  1208. [0069]
  1209. [0070]
  1210. [0071]
  1211. [0072]
  1212. [0073]
  1213. [0074]
  1214. [0075]
  1215. [0076]
  1216. [0077]
  1217. [0078]
  1218. [0079]
  1219. [0080]
  1220. [0081]
  1221. [0082]
  1222. [0083]
  1223. [0084]
  1224. [0085]
  1225. [0086]
  1226. [0087]
  1227. [0088] //---------------------------------------------
  1228. [0089]
  1229. [0090]
  1230. [0091]
  1231. [0092] //---------------------------------------------
  1232. [0093]
  1233. [0094] //////////////////
  1234. [0095] // Arguments
  1235. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  1236. [0097] {
  1237. [0098] //////////////
  1238. [0099] // Default input
  1239. [0100] mat4 a_mtxProjection;
  1240. [0101] mat4 a_mtxModelViewProjection;
  1241. [0102] mat4 a_mtxModelView;
  1242. [0103] mat4 a_mtxUV;
  1243. [0104] mat4 a_mtxModel;
  1244. [0105] mat4 a_mtxNormal;
  1245. [0106]
  1246. [0107]
  1247. [0108] };
  1248. [0109]
  1249. [0110]
  1250. [0111]
  1251. [0112]
  1252. [0113]
  1253. [0114] ///////////////////////
  1254. [0115] // Mesh instancing
  1255. [0116]
  1256. [0117]
  1257. [0118]
  1258. [0119]
  1259. [0120] //---------------------------------------------
  1260. [0121]
  1261. [0122] ///////////////////////////////
  1262. [0123] // Main program
  1263. [0124] in vec4 vtx_vPosition;
  1264. [0125] in vec4 vtx_vTexCoord0;
  1265. [0126] in vec4 vtx_vTexCoord1;
  1266. [0127] in vec3 vtx_vNormal;
  1267. [0128] in vec4 vtx_vTangent;
  1268. [0129] in vec4 vtx_vColor;
  1269. [0130] in vec4 vtx_vBoneIndices;
  1270. [0131] in vec4 vtx_vBoneWeight;
  1271. [0132]
  1272. [0133] void main()
  1273. [0134] {
  1274. [0135] int vtx_lVertexID = gl_VertexID;
  1275. [0136] int vtx_lInstanceID = gl_InstanceID;
  1276. [0137]
  1277. [0138] vec4 px_vPosition = vec4(0);
  1278. [0139]
  1279. [0140]
  1280. [0141] /////////////
  1281. [0142] // load instance data
  1282. [0143]
  1283. [0144]
  1284. [0145]
  1285. [0146]
  1286. [0147] //////////////////////
  1287. [0148] // Position - Skeleton
  1288. [0149]
  1289. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  1290. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  1291. [0152]
  1292. [0153]
  1293. [0154] //////////////////////
  1294. [0155] // Uv
  1295. [0156]
  1296. [0157]
  1297. [0158] //////////////////////
  1298. [0159] // Color
  1299. [0160]
  1300. [0161]
  1301. [0162]
  1302. [0163]
  1303. [0164]
  1304. [0165]
  1305. [0166]
  1306. [0167]
  1307. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  1308. [0169]
  1309. [0170]
  1310. [0171] //////////////////////
  1311. [0172] // Normals
  1312. [0173]
  1313. [0174]
  1314. [0175] //////////////////////
  1315. [0176] // Normalmapping
  1316. [0177]
  1317. [0178]
  1318. [0179] //////////////////////
  1319. [0180] // Parallax
  1320. [0181]
  1321. [0182]
  1322. [0183]
  1323. [0184] /////////
  1324. [0185] // Angle fade
  1325. [0186]
  1326. [0187]
  1327. [0188]
  1328. [0189] //////////////////////
  1329. [0190] // Linear depth
  1330. [0191]
  1331. [0192]
  1332. [0193] //////////////////////
  1333. [0194] // Vertex Position
  1334. [0195]
  1335. [0196]
  1336. [0197] ////////////////////
  1337. [0198] // Scrolling noise
  1338. [0199]
  1339. [0200]
  1340. [0201] //////////////////////
  1341. [0202] // Deferring (Lights)
  1342. [0203]
  1343. [0204]
  1344. [0205] gl_Position = px_vPosition;
  1345. [0206] }
  1346. [0207]
  1347. ---------------------
  1348. Compile log:
  1349. ---------------------
  1350. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  1351.  
  1352. ---------------------
  1353. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  1354. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  1355. ERROR: Failed to compile GLSL shader ''!
  1356. Shader code:
  1357. -------------------
  1358. [0001] #version 330
  1359. [0002] #extension GL_ARB_explicit_attrib_location : enable
  1360. [0003] #extension GL_ARB_uniform_buffer_object : enable
  1361. [0004] #extension GL_ARB_shading_language_420pack: enable
  1362. [0005] #extension GL_ARB_draw_instanced : enable
  1363. [0006] /////////////////////////////
  1364. [0007] // Quad vertex shader used by deferred poost effects
  1365. [0008] //////////////////////////
  1366. [0009]
  1367. [0010] in vec4 vtx_vPosition;
  1368. [0011] in vec4 vtx_vTexCoord0;
  1369. [0012] in vec4 vtx_vTexCoord1;
  1370. [0013] out vec4 px_vTexCoord0;
  1371. [0014]
  1372. [0015] void main()
  1373. [0016] {
  1374. [0017] int vtx_lVertexID = gl_VertexID;
  1375. [0018] int vtx_lInstanceID = gl_InstanceID;
  1376. [0019]
  1377. [0020] vec4 px_vPosition = vec4(0);
  1378. [0021]
  1379. [0022]
  1380. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  1381. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  1382. [0025]
  1383. [0026]
  1384. [0027]
  1385. [0028] gl_Position = px_vPosition;
  1386. ---------------------
  1387. Compile log:
  1388. ---------------------
  1389. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  1390.  
  1391. ---------------------
  1392. ERROR: Couldn't create program 'posteffect_quad_vtx.hpsl'
  1393. ERROR: Could not load program manager 'Deferred' shader 'posteffect_quad_vtx.hpsl'
  1394. Initializing DevIL
  1395. Vendor String: Abysmal Software
  1396. Version String: Developer's Image Library (DevIL) 1.7.8
  1397. Version Number: 178
  1398. ERROR: Failed to compile GLSL shader ''!
  1399. Shader code:
  1400. -------------------
  1401. [0001] #version 330
  1402. [0002] #extension GL_ARB_explicit_attrib_location : enable
  1403. [0003] #extension GL_ARB_uniform_buffer_object : enable
  1404. [0004] #extension GL_ARB_shading_language_420pack: enable
  1405. [0005] #extension GL_ARB_draw_instanced : enable
  1406. [0006] ////////////////////////////////////////////////////////
  1407. [0007] // Deferred Base - Vertex Shader
  1408. [0008] //
  1409. [0009] //
  1410. [0010] ////////////////////////////////////////////////////////
  1411. [0011]
  1412. [0012]
  1413. [0013]
  1414. [0014]
  1415. [0015] ////////////////////////
  1416. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  1417. [0017]
  1418. [0018]
  1419. [0019]
  1420. [0020]
  1421. [0021]
  1422. [0022]
  1423. [0023]
  1424. [0024]
  1425. [0025]
  1426. [0026]
  1427. [0027]
  1428. [0028]
  1429. [0029]
  1430. [0030]
  1431. [0031]
  1432. [0032]
  1433. [0033]
  1434. [0034]
  1435. [0035]
  1436. [0036]
  1437. [0037]
  1438. [0038]
  1439. [0039]
  1440. [0040]
  1441. [0041]
  1442. [0042]
  1443. [0043]
  1444. [0044]
  1445. [0045]
  1446. [0046]
  1447. [0047]
  1448. [0048]
  1449. [0049]
  1450. [0050]
  1451. [0051]
  1452. [0052]
  1453. [0053]
  1454. [0054]
  1455. [0055]
  1456. [0056]
  1457. [0057]
  1458. [0058]
  1459. [0059]
  1460. [0060]
  1461. [0061]
  1462. [0062]
  1463. [0063]
  1464. [0064]
  1465. [0065]
  1466. [0066]
  1467. [0067]
  1468. [0068]
  1469. [0069]
  1470. [0070]
  1471. [0071]
  1472. [0072]
  1473. [0073]
  1474. [0074]
  1475. [0075]
  1476. [0076]
  1477. [0077]
  1478. [0078]
  1479. [0079]
  1480. [0080]
  1481. [0081]
  1482. [0082]
  1483. [0083]
  1484. [0084]
  1485. [0085]
  1486. [0086]
  1487. [0087]
  1488. [0088] //---------------------------------------------
  1489. [0089]
  1490. [0090]
  1491. [0091]
  1492. [0092] //---------------------------------------------
  1493. [0093]
  1494. [0094] //////////////////
  1495. [0095] // Arguments
  1496. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  1497. [0097] {
  1498. [0098] //////////////
  1499. [0099] // Default input
  1500. [0100] mat4 a_mtxProjection;
  1501. [0101] mat4 a_mtxModelViewProjection;
  1502. [0102] mat4 a_mtxModelView;
  1503. [0103] mat4 a_mtxUV;
  1504. [0104] mat4 a_mtxModel;
  1505. [0105] mat4 a_mtxNormal;
  1506. [0106]
  1507. [0107]
  1508. [0108] };
  1509. [0109]
  1510. [0110]
  1511. [0111]
  1512. [0112]
  1513. [0113]
  1514. [0114] ///////////////////////
  1515. [0115] // Mesh instancing
  1516. [0116]
  1517. [0117]
  1518. [0118]
  1519. [0119]
  1520. [0120] //---------------------------------------------
  1521. [0121]
  1522. [0122] ///////////////////////////////
  1523. [0123] // Main program
  1524. [0124] in vec4 vtx_vPosition;
  1525. [0125] in vec4 vtx_vTexCoord0;
  1526. [0126] in vec4 vtx_vTexCoord1;
  1527. [0127] in vec3 vtx_vNormal;
  1528. [0128] in vec4 vtx_vTangent;
  1529. [0129] in vec4 vtx_vColor;
  1530. [0130] in vec4 vtx_vBoneIndices;
  1531. [0131] in vec4 vtx_vBoneWeight;
  1532. [0132]
  1533. [0133] void main()
  1534. [0134] {
  1535. [0135] int vtx_lVertexID = gl_VertexID;
  1536. [0136] int vtx_lInstanceID = gl_InstanceID;
  1537. [0137]
  1538. [0138] vec4 px_vPosition = vec4(0);
  1539. [0139]
  1540. [0140]
  1541. [0141] /////////////
  1542. [0142] // load instance data
  1543. [0143]
  1544. [0144]
  1545. [0145]
  1546. [0146]
  1547. [0147] //////////////////////
  1548. [0148] // Position - Skeleton
  1549. [0149]
  1550. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  1551. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  1552. [0152]
  1553. [0153]
  1554. [0154] //////////////////////
  1555. [0155] // Uv
  1556. [0156]
  1557. [0157]
  1558. [0158] //////////////////////
  1559. [0159] // Color
  1560. [0160]
  1561. [0161]
  1562. [0162]
  1563. [0163]
  1564. [0164]
  1565. [0165]
  1566. [0166]
  1567. [0167]
  1568. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  1569. [0169]
  1570. [0170]
  1571. [0171] //////////////////////
  1572. [0172] // Normals
  1573. [0173]
  1574. [0174]
  1575. [0175] //////////////////////
  1576. [0176] // Normalmapping
  1577. [0177]
  1578. [0178]
  1579. [0179] //////////////////////
  1580. [0180] // Parallax
  1581. [0181]
  1582. [0182]
  1583. [0183]
  1584. [0184] /////////
  1585. [0185] // Angle fade
  1586. [0186]
  1587. [0187]
  1588. [0188]
  1589. [0189] //////////////////////
  1590. [0190] // Linear depth
  1591. [0191]
  1592. [0192]
  1593. [0193] //////////////////////
  1594. [0194] // Vertex Position
  1595. [0195]
  1596. [0196]
  1597. [0197] ////////////////////
  1598. [0198] // Scrolling noise
  1599. [0199]
  1600. [0200]
  1601. [0201] //////////////////////
  1602. [0202] // Deferring (Lights)
  1603. [0203]
  1604. [0204]
  1605. [0205] gl_Position = px_vPosition;
  1606. [0206] }
  1607. [0207]
  1608. ---------------------
  1609. Compile log:
  1610. ---------------------
  1611. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  1612.  
  1613. ---------------------
  1614. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  1615. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  1616. ERROR: Failed to compile GLSL shader ''!
  1617. Shader code:
  1618. -------------------
  1619. [0001] #version 330
  1620. [0002] #extension GL_ARB_explicit_attrib_location : enable
  1621. [0003] #extension GL_ARB_uniform_buffer_object : enable
  1622. [0004] #extension GL_ARB_shading_language_420pack: enable
  1623. [0005] #extension GL_ARB_draw_instanced : enable
  1624. [0006] ////////////////////////////////////////////////////////
  1625. [0007] // Deferred Base - Vertex Shader
  1626. [0008] //
  1627. [0009] //
  1628. [0010] ////////////////////////////////////////////////////////
  1629. [0011]
  1630. [0012]
  1631. [0013]
  1632. [0014]
  1633. [0015] ////////////////////////
  1634. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  1635. [0017]
  1636. [0018]
  1637. [0019]
  1638. [0020]
  1639. [0021]
  1640. [0022]
  1641. [0023]
  1642. [0024]
  1643. [0025]
  1644. [0026]
  1645. [0027]
  1646. [0028]
  1647. [0029]
  1648. [0030]
  1649. [0031]
  1650. [0032]
  1651. [0033]
  1652. [0034]
  1653. [0035]
  1654. [0036]
  1655. [0037]
  1656. [0038]
  1657. [0039]
  1658. [0040]
  1659. [0041]
  1660. [0042]
  1661. [0043]
  1662. [0044]
  1663. [0045]
  1664. [0046]
  1665. [0047]
  1666. [0048]
  1667. [0049]
  1668. [0050]
  1669. [0051]
  1670. [0052]
  1671. [0053]
  1672. [0054]
  1673. [0055]
  1674. [0056]
  1675. [0057]
  1676. [0058]
  1677. [0059]
  1678. [0060]
  1679. [0061]
  1680. [0062]
  1681. [0063]
  1682. [0064]
  1683. [0065]
  1684. [0066]
  1685. [0067]
  1686. [0068]
  1687. [0069]
  1688. [0070]
  1689. [0071]
  1690. [0072]
  1691. [0073]
  1692. [0074]
  1693. [0075]
  1694. [0076]
  1695. [0077]
  1696. [0078]
  1697. [0079]
  1698. [0080]
  1699. [0081]
  1700. [0082]
  1701. [0083]
  1702. [0084]
  1703. [0085]
  1704. [0086]
  1705. [0087]
  1706. [0088] //---------------------------------------------
  1707. [0089]
  1708. [0090]
  1709. [0091]
  1710. [0092] //---------------------------------------------
  1711. [0093]
  1712. [0094] //////////////////
  1713. [0095] // Arguments
  1714. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  1715. [0097] {
  1716. [0098] //////////////
  1717. [0099] // Default input
  1718. [0100] mat4 a_mtxProjection;
  1719. [0101] mat4 a_mtxModelViewProjection;
  1720. [0102] mat4 a_mtxModelView;
  1721. [0103] mat4 a_mtxUV;
  1722. [0104] mat4 a_mtxModel;
  1723. [0105] mat4 a_mtxNormal;
  1724. [0106]
  1725. [0107]
  1726. [0108] };
  1727. [0109]
  1728. [0110]
  1729. [0111]
  1730. [0112]
  1731. [0113]
  1732. [0114] ///////////////////////
  1733. [0115] // Mesh instancing
  1734. [0116]
  1735. [0117]
  1736. [0118]
  1737. [0119]
  1738. [0120] //---------------------------------------------
  1739. [0121]
  1740. [0122] ///////////////////////////////
  1741. [0123] // Main program
  1742. [0124] in vec4 vtx_vPosition;
  1743. [0125] in vec4 vtx_vTexCoord0;
  1744. [0126] in vec4 vtx_vTexCoord1;
  1745. [0127] in vec3 vtx_vNormal;
  1746. [0128] in vec4 vtx_vTangent;
  1747. [0129] in vec4 vtx_vColor;
  1748. [0130] in vec4 vtx_vBoneIndices;
  1749. [0131] in vec4 vtx_vBoneWeight;
  1750. [0132]
  1751. [0133] void main()
  1752. [0134] {
  1753. [0135] int vtx_lVertexID = gl_VertexID;
  1754. [0136] int vtx_lInstanceID = gl_InstanceID;
  1755. [0137]
  1756. [0138] vec4 px_vPosition = vec4(0);
  1757. [0139]
  1758. [0140]
  1759. [0141] /////////////
  1760. [0142] // load instance data
  1761. [0143]
  1762. [0144]
  1763. [0145]
  1764. [0146]
  1765. [0147] //////////////////////
  1766. [0148] // Position - Skeleton
  1767. [0149]
  1768. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  1769. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  1770. [0152]
  1771. [0153]
  1772. [0154] //////////////////////
  1773. [0155] // Uv
  1774. [0156]
  1775. [0157]
  1776. [0158] //////////////////////
  1777. [0159] // Color
  1778. [0160]
  1779. [0161]
  1780. [0162]
  1781. [0163]
  1782. [0164]
  1783. [0165]
  1784. [0166]
  1785. [0167]
  1786. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  1787. [0169]
  1788. [0170]
  1789. [0171] //////////////////////
  1790. [0172] // Normals
  1791. [0173]
  1792. [0174]
  1793. [0175] //////////////////////
  1794. [0176] // Normalmapping
  1795. [0177]
  1796. [0178]
  1797. [0179] //////////////////////
  1798. [0180] // Parallax
  1799. [0181]
  1800. [0182]
  1801. [0183]
  1802. [0184] /////////
  1803. [0185] // Angle fade
  1804. [0186]
  1805. [0187]
  1806. [0188]
  1807. [0189] //////////////////////
  1808. [0190] // Linear depth
  1809. [0191]
  1810. [0192]
  1811. [0193] //////////////////////
  1812. [0194] // Vertex Position
  1813. [0195]
  1814. [0196]
  1815. [0197] ////////////////////
  1816. [0198] // Scrolling noise
  1817. [0199]
  1818. [0200]
  1819. [0201] //////////////////////
  1820. [0202] // Deferring (Lights)
  1821. [0203]
  1822. [0204]
  1823. [0205] gl_Position = px_vPosition;
  1824. [0206] }
  1825. [0207]
  1826. ---------------------
  1827. Compile log:
  1828. ---------------------
  1829. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  1830.  
  1831. ---------------------
  1832. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  1833. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  1834. ERROR: Failed to compile GLSL shader ''!
  1835. Shader code:
  1836. -------------------
  1837. [0001] #version 330
  1838. [0002] #extension GL_ARB_explicit_attrib_location : enable
  1839. [0003] #extension GL_ARB_uniform_buffer_object : enable
  1840. [0004] #extension GL_ARB_shading_language_420pack: enable
  1841. [0005] #extension GL_ARB_draw_instanced : enable
  1842. [0006] ////////////////////////////////////////////////////////
  1843. [0007] // Deferred Base - Vertex Shader
  1844. [0008] //
  1845. [0009] //
  1846. [0010] ////////////////////////////////////////////////////////
  1847. [0011]
  1848. [0012]
  1849. [0013]
  1850. [0014]
  1851. [0015] ////////////////////////
  1852. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  1853. [0017]
  1854. [0018]
  1855. [0019]
  1856. [0020]
  1857. [0021]
  1858. [0022]
  1859. [0023]
  1860. [0024]
  1861. [0025]
  1862. [0026]
  1863. [0027]
  1864. [0028]
  1865. [0029]
  1866. [0030]
  1867. [0031]
  1868. [0032]
  1869. [0033]
  1870. [0034]
  1871. [0035]
  1872. [0036]
  1873. [0037]
  1874. [0038]
  1875. [0039]
  1876. [0040]
  1877. [0041]
  1878. [0042]
  1879. [0043]
  1880. [0044]
  1881. [0045]
  1882. [0046]
  1883. [0047]
  1884. [0048]
  1885. [0049]
  1886. [0050]
  1887. [0051]
  1888. [0052]
  1889. [0053]
  1890. [0054]
  1891. [0055]
  1892. [0056]
  1893. [0057]
  1894. [0058]
  1895. [0059]
  1896. [0060]
  1897. [0061]
  1898. [0062]
  1899. [0063]
  1900. [0064]
  1901. [0065]
  1902. [0066]
  1903. [0067]
  1904. [0068]
  1905. [0069]
  1906. [0070]
  1907. [0071]
  1908. [0072]
  1909. [0073]
  1910. [0074]
  1911. [0075]
  1912. [0076]
  1913. [0077]
  1914. [0078]
  1915. [0079]
  1916. [0080]
  1917. [0081]
  1918. [0082]
  1919. [0083]
  1920. [0084]
  1921. [0085]
  1922. [0086]
  1923. [0087]
  1924. [0088] //---------------------------------------------
  1925. [0089]
  1926. [0090]
  1927. [0091]
  1928. [0092] //---------------------------------------------
  1929. [0093]
  1930. [0094] //////////////////
  1931. [0095] // Arguments
  1932. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  1933. [0097] {
  1934. [0098] //////////////
  1935. [0099] // Default input
  1936. [0100] mat4 a_mtxProjection;
  1937. [0101] mat4 a_mtxModelViewProjection;
  1938. [0102] mat4 a_mtxModelView;
  1939. [0103] mat4 a_mtxUV;
  1940. [0104] mat4 a_mtxModel;
  1941. [0105] mat4 a_mtxNormal;
  1942. [0106]
  1943. [0107]
  1944. [0108] };
  1945. [0109]
  1946. [0110]
  1947. [0111]
  1948. [0112]
  1949. [0113]
  1950. [0114] ///////////////////////
  1951. [0115] // Mesh instancing
  1952. [0116]
  1953. [0117]
  1954. [0118]
  1955. [0119]
  1956. [0120] //---------------------------------------------
  1957. [0121]
  1958. [0122] ///////////////////////////////
  1959. [0123] // Main program
  1960. [0124] in vec4 vtx_vPosition;
  1961. [0125] in vec4 vtx_vTexCoord0;
  1962. [0126] in vec4 vtx_vTexCoord1;
  1963. [0127] in vec3 vtx_vNormal;
  1964. [0128] in vec4 vtx_vTangent;
  1965. [0129] in vec4 vtx_vColor;
  1966. [0130] in vec4 vtx_vBoneIndices;
  1967. [0131] in vec4 vtx_vBoneWeight;
  1968. [0132]
  1969. [0133] void main()
  1970. [0134] {
  1971. [0135] int vtx_lVertexID = gl_VertexID;
  1972. [0136] int vtx_lInstanceID = gl_InstanceID;
  1973. [0137]
  1974. [0138] vec4 px_vPosition = vec4(0);
  1975. [0139]
  1976. [0140]
  1977. [0141] /////////////
  1978. [0142] // load instance data
  1979. [0143]
  1980. [0144]
  1981. [0145]
  1982. [0146]
  1983. [0147] //////////////////////
  1984. [0148] // Position - Skeleton
  1985. [0149]
  1986. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  1987. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  1988. [0152]
  1989. [0153]
  1990. [0154] //////////////////////
  1991. [0155] // Uv
  1992. [0156]
  1993. [0157]
  1994. [0158] //////////////////////
  1995. [0159] // Color
  1996. [0160]
  1997. [0161]
  1998. [0162]
  1999. [0163]
  2000. [0164]
  2001. [0165]
  2002. [0166]
  2003. [0167]
  2004. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  2005. [0169]
  2006. [0170]
  2007. [0171] //////////////////////
  2008. [0172] // Normals
  2009. [0173]
  2010. [0174]
  2011. [0175] //////////////////////
  2012. [0176] // Normalmapping
  2013. [0177]
  2014. [0178]
  2015. [0179] //////////////////////
  2016. [0180] // Parallax
  2017. [0181]
  2018. [0182]
  2019. [0183]
  2020. [0184] /////////
  2021. [0185] // Angle fade
  2022. [0186]
  2023. [0187]
  2024. [0188]
  2025. [0189] //////////////////////
  2026. [0190] // Linear depth
  2027. [0191]
  2028. [0192]
  2029. [0193] //////////////////////
  2030. [0194] // Vertex Position
  2031. [0195]
  2032. [0196]
  2033. [0197] ////////////////////
  2034. [0198] // Scrolling noise
  2035. [0199]
  2036. [0200]
  2037. [0201] //////////////////////
  2038. [0202] // Deferring (Lights)
  2039. [0203]
  2040. [0204]
  2041. [0205] gl_Position = px_vPosition;
  2042. [0206] }
  2043. [0207]
  2044. ---------------------
  2045. Compile log:
  2046. ---------------------
  2047. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  2048.  
  2049. ---------------------
  2050. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  2051. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  2052. ERROR: Failed to compile GLSL shader ''!
  2053. Shader code:
  2054. -------------------
  2055. [0001] #version 330
  2056. [0002] #extension GL_ARB_explicit_attrib_location : enable
  2057. [0003] #extension GL_ARB_uniform_buffer_object : enable
  2058. [0004] #extension GL_ARB_shading_language_420pack: enable
  2059. [0005] #extension GL_ARB_draw_instanced : enable
  2060. [0006] ////////////////////////////////////////////////////////
  2061. [0007] // Deferred Base - Vertex Shader
  2062. [0008] //
  2063. [0009] //
  2064. [0010] ////////////////////////////////////////////////////////
  2065. [0011]
  2066. [0012]
  2067. [0013]
  2068. [0014]
  2069. [0015] ////////////////////////
  2070. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  2071. [0017]
  2072. [0018]
  2073. [0019]
  2074. [0020]
  2075. [0021]
  2076. [0022]
  2077. [0023]
  2078. [0024]
  2079. [0025]
  2080. [0026]
  2081. [0027]
  2082. [0028]
  2083. [0029]
  2084. [0030]
  2085. [0031]
  2086. [0032]
  2087. [0033]
  2088. [0034]
  2089. [0035]
  2090. [0036]
  2091. [0037]
  2092. [0038]
  2093. [0039]
  2094. [0040]
  2095. [0041]
  2096. [0042]
  2097. [0043]
  2098. [0044]
  2099. [0045]
  2100. [0046]
  2101. [0047]
  2102. [0048]
  2103. [0049]
  2104. [0050]
  2105. [0051]
  2106. [0052]
  2107. [0053]
  2108. [0054]
  2109. [0055]
  2110. [0056]
  2111. [0057]
  2112. [0058]
  2113. [0059]
  2114. [0060]
  2115. [0061]
  2116. [0062]
  2117. [0063]
  2118. [0064]
  2119. [0065]
  2120. [0066]
  2121. [0067]
  2122. [0068]
  2123. [0069]
  2124. [0070]
  2125. [0071]
  2126. [0072]
  2127. [0073]
  2128. [0074]
  2129. [0075]
  2130. [0076]
  2131. [0077]
  2132. [0078]
  2133. [0079]
  2134. [0080]
  2135. [0081]
  2136. [0082]
  2137. [0083]
  2138. [0084]
  2139. [0085]
  2140. [0086]
  2141. [0087]
  2142. [0088] //---------------------------------------------
  2143. [0089]
  2144. [0090]
  2145. [0091]
  2146. [0092] //---------------------------------------------
  2147. [0093]
  2148. [0094] //////////////////
  2149. [0095] // Arguments
  2150. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  2151. [0097] {
  2152. [0098] //////////////
  2153. [0099] // Default input
  2154. [0100] mat4 a_mtxProjection;
  2155. [0101] mat4 a_mtxModelViewProjection;
  2156. [0102] mat4 a_mtxModelView;
  2157. [0103] mat4 a_mtxUV;
  2158. [0104] mat4 a_mtxModel;
  2159. [0105] mat4 a_mtxNormal;
  2160. [0106]
  2161. [0107]
  2162. [0108] };
  2163. [0109]
  2164. [0110]
  2165. [0111]
  2166. [0112]
  2167. [0113]
  2168. [0114] ///////////////////////
  2169. [0115] // Mesh instancing
  2170. [0116]
  2171. [0117]
  2172. [0118]
  2173. [0119]
  2174. [0120] //---------------------------------------------
  2175. [0121]
  2176. [0122] ///////////////////////////////
  2177. [0123] // Main program
  2178. [0124] in vec4 vtx_vPosition;
  2179. [0125] in vec4 vtx_vTexCoord0;
  2180. [0126] in vec4 vtx_vTexCoord1;
  2181. [0127] in vec3 vtx_vNormal;
  2182. [0128] in vec4 vtx_vTangent;
  2183. [0129] in vec4 vtx_vColor;
  2184. [0130] in vec4 vtx_vBoneIndices;
  2185. [0131] in vec4 vtx_vBoneWeight;
  2186. [0132]
  2187. [0133] void main()
  2188. [0134] {
  2189. [0135] int vtx_lVertexID = gl_VertexID;
  2190. [0136] int vtx_lInstanceID = gl_InstanceID;
  2191. [0137]
  2192. [0138] vec4 px_vPosition = vec4(0);
  2193. [0139]
  2194. [0140]
  2195. [0141] /////////////
  2196. [0142] // load instance data
  2197. [0143]
  2198. [0144]
  2199. [0145]
  2200. [0146]
  2201. [0147] //////////////////////
  2202. [0148] // Position - Skeleton
  2203. [0149]
  2204. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  2205. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  2206. [0152]
  2207. [0153]
  2208. [0154] //////////////////////
  2209. [0155] // Uv
  2210. [0156]
  2211. [0157]
  2212. [0158] //////////////////////
  2213. [0159] // Color
  2214. [0160]
  2215. [0161]
  2216. [0162]
  2217. [0163]
  2218. [0164]
  2219. [0165]
  2220. [0166]
  2221. [0167]
  2222. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  2223. [0169]
  2224. [0170]
  2225. [0171] //////////////////////
  2226. [0172] // Normals
  2227. [0173]
  2228. [0174]
  2229. [0175] //////////////////////
  2230. [0176] // Normalmapping
  2231. [0177]
  2232. [0178]
  2233. [0179] //////////////////////
  2234. [0180] // Parallax
  2235. [0181]
  2236. [0182]
  2237. [0183]
  2238. [0184] /////////
  2239. [0185] // Angle fade
  2240. [0186]
  2241. [0187]
  2242. [0188]
  2243. [0189] //////////////////////
  2244. [0190] // Linear depth
  2245. [0191]
  2246. [0192]
  2247. [0193] //////////////////////
  2248. [0194] // Vertex Position
  2249. [0195]
  2250. [0196]
  2251. [0197] ////////////////////
  2252. [0198] // Scrolling noise
  2253. [0199]
  2254. [0200]
  2255. [0201] //////////////////////
  2256. [0202] // Deferring (Lights)
  2257. [0203]
  2258. [0204]
  2259. [0205] gl_Position = px_vPosition;
  2260. [0206] }
  2261. [0207]
  2262. ---------------------
  2263. Compile log:
  2264. ---------------------
  2265. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  2266.  
  2267. ---------------------
  2268. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  2269. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  2270. ERROR: Failed to compile GLSL shader ''!
  2271. Shader code:
  2272. -------------------
  2273. [0001] #version 330
  2274. [0002] #extension GL_ARB_explicit_attrib_location : enable
  2275. [0003] #extension GL_ARB_uniform_buffer_object : enable
  2276. [0004] #extension GL_ARB_shading_language_420pack: enable
  2277. [0005] #extension GL_ARB_draw_instanced : enable
  2278. [0006] ////////////////////////////////////////////////////////
  2279. [0007] // Deferred Base - Vertex Shader
  2280. [0008] //
  2281. [0009] //
  2282. [0010] ////////////////////////////////////////////////////////
  2283. [0011]
  2284. [0012]
  2285. [0013]
  2286. [0014]
  2287. [0015] ////////////////////////
  2288. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  2289. [0017]
  2290. [0018]
  2291. [0019]
  2292. [0020]
  2293. [0021]
  2294. [0022]
  2295. [0023]
  2296. [0024]
  2297. [0025]
  2298. [0026]
  2299. [0027]
  2300. [0028]
  2301. [0029]
  2302. [0030]
  2303. [0031]
  2304. [0032]
  2305. [0033]
  2306. [0034]
  2307. [0035]
  2308. [0036]
  2309. [0037]
  2310. [0038]
  2311. [0039]
  2312. [0040]
  2313. [0041]
  2314. [0042]
  2315. [0043]
  2316. [0044]
  2317. [0045]
  2318. [0046]
  2319. [0047]
  2320. [0048]
  2321. [0049]
  2322. [0050]
  2323. [0051]
  2324. [0052]
  2325. [0053]
  2326. [0054]
  2327. [0055]
  2328. [0056]
  2329. [0057]
  2330. [0058]
  2331. [0059]
  2332. [0060]
  2333. [0061]
  2334. [0062]
  2335. [0063]
  2336. [0064]
  2337. [0065]
  2338. [0066]
  2339. [0067]
  2340. [0068]
  2341. [0069]
  2342. [0070]
  2343. [0071]
  2344. [0072]
  2345. [0073]
  2346. [0074]
  2347. [0075]
  2348. [0076]
  2349. [0077]
  2350. [0078]
  2351. [0079]
  2352. [0080]
  2353. [0081]
  2354. [0082]
  2355. [0083]
  2356. [0084]
  2357. [0085]
  2358. [0086]
  2359. [0087]
  2360. [0088] //---------------------------------------------
  2361. [0089]
  2362. [0090]
  2363. [0091]
  2364. [0092] //---------------------------------------------
  2365. [0093]
  2366. [0094] //////////////////
  2367. [0095] // Arguments
  2368. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  2369. [0097] {
  2370. [0098] //////////////
  2371. [0099] // Default input
  2372. [0100] mat4 a_mtxProjection;
  2373. [0101] mat4 a_mtxModelViewProjection;
  2374. [0102] mat4 a_mtxModelView;
  2375. [0103] mat4 a_mtxUV;
  2376. [0104] mat4 a_mtxModel;
  2377. [0105] mat4 a_mtxNormal;
  2378. [0106]
  2379. [0107]
  2380. [0108] };
  2381. [0109]
  2382. [0110]
  2383. [0111]
  2384. [0112]
  2385. [0113]
  2386. [0114] ///////////////////////
  2387. [0115] // Mesh instancing
  2388. [0116]
  2389. [0117]
  2390. [0118]
  2391. [0119]
  2392. [0120] //---------------------------------------------
  2393. [0121]
  2394. [0122] ///////////////////////////////
  2395. [0123] // Main program
  2396. [0124] in vec4 vtx_vPosition;
  2397. [0125] in vec4 vtx_vTexCoord0;
  2398. [0126] in vec4 vtx_vTexCoord1;
  2399. [0127] in vec3 vtx_vNormal;
  2400. [0128] in vec4 vtx_vTangent;
  2401. [0129] in vec4 vtx_vColor;
  2402. [0130] in vec4 vtx_vBoneIndices;
  2403. [0131] in vec4 vtx_vBoneWeight;
  2404. [0132]
  2405. [0133] void main()
  2406. [0134] {
  2407. [0135] int vtx_lVertexID = gl_VertexID;
  2408. [0136] int vtx_lInstanceID = gl_InstanceID;
  2409. [0137]
  2410. [0138] vec4 px_vPosition = vec4(0);
  2411. [0139]
  2412. [0140]
  2413. [0141] /////////////
  2414. [0142] // load instance data
  2415. [0143]
  2416. [0144]
  2417. [0145]
  2418. [0146]
  2419. [0147] //////////////////////
  2420. [0148] // Position - Skeleton
  2421. [0149]
  2422. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  2423. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  2424. [0152]
  2425. [0153]
  2426. [0154] //////////////////////
  2427. [0155] // Uv
  2428. [0156]
  2429. [0157]
  2430. [0158] //////////////////////
  2431. [0159] // Color
  2432. [0160]
  2433. [0161]
  2434. [0162]
  2435. [0163]
  2436. [0164]
  2437. [0165]
  2438. [0166]
  2439. [0167]
  2440. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  2441. [0169]
  2442. [0170]
  2443. [0171] //////////////////////
  2444. [0172] // Normals
  2445. [0173]
  2446. [0174]
  2447. [0175] //////////////////////
  2448. [0176] // Normalmapping
  2449. [0177]
  2450. [0178]
  2451. [0179] //////////////////////
  2452. [0180] // Parallax
  2453. [0181]
  2454. [0182]
  2455. [0183]
  2456. [0184] /////////
  2457. [0185] // Angle fade
  2458. [0186]
  2459. [0187]
  2460. [0188]
  2461. [0189] //////////////////////
  2462. [0190] // Linear depth
  2463. [0191]
  2464. [0192]
  2465. [0193] //////////////////////
  2466. [0194] // Vertex Position
  2467. [0195]
  2468. [0196]
  2469. [0197] ////////////////////
  2470. [0198] // Scrolling noise
  2471. [0199]
  2472. [0200]
  2473. [0201] //////////////////////
  2474. [0202] // Deferring (Lights)
  2475. [0203]
  2476. [0204]
  2477. [0205] gl_Position = px_vPosition;
  2478. [0206] }
  2479. [0207]
  2480. ---------------------
  2481. Compile log:
  2482. ---------------------
  2483. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  2484.  
  2485. ---------------------
  2486. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  2487. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  2488. ERROR: Failed to compile GLSL shader ''!
  2489. Shader code:
  2490. -------------------
  2491. [0001] #version 330
  2492. [0002] #extension GL_ARB_explicit_attrib_location : enable
  2493. [0003] #extension GL_ARB_uniform_buffer_object : enable
  2494. [0004] #extension GL_ARB_shading_language_420pack: enable
  2495. [0005] #extension GL_ARB_draw_instanced : enable
  2496. [0006] ////////////////////////////////////////////////////////
  2497. [0007] // Deferred Base - Vertex Shader
  2498. [0008] //
  2499. [0009] //
  2500. [0010] ////////////////////////////////////////////////////////
  2501. [0011]
  2502. [0012]
  2503. [0013]
  2504. [0014]
  2505. [0015] ////////////////////////
  2506. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  2507. [0017]
  2508. [0018]
  2509. [0019]
  2510. [0020]
  2511. [0021]
  2512. [0022]
  2513. [0023]
  2514. [0024]
  2515. [0025]
  2516. [0026]
  2517. [0027]
  2518. [0028]
  2519. [0029]
  2520. [0030]
  2521. [0031]
  2522. [0032]
  2523. [0033]
  2524. [0034]
  2525. [0035]
  2526. [0036]
  2527. [0037]
  2528. [0038]
  2529. [0039]
  2530. [0040]
  2531. [0041]
  2532. [0042]
  2533. [0043]
  2534. [0044]
  2535. [0045]
  2536. [0046]
  2537. [0047]
  2538. [0048]
  2539. [0049]
  2540. [0050]
  2541. [0051]
  2542. [0052]
  2543. [0053]
  2544. [0054]
  2545. [0055]
  2546. [0056]
  2547. [0057]
  2548. [0058]
  2549. [0059]
  2550. [0060]
  2551. [0061]
  2552. [0062]
  2553. [0063]
  2554. [0064]
  2555. [0065]
  2556. [0066]
  2557. [0067]
  2558. [0068]
  2559. [0069]
  2560. [0070]
  2561. [0071]
  2562. [0072]
  2563. [0073]
  2564. [0074]
  2565. [0075]
  2566. [0076]
  2567. [0077]
  2568. [0078]
  2569. [0079]
  2570. [0080]
  2571. [0081]
  2572. [0082]
  2573. [0083]
  2574. [0084]
  2575. [0085]
  2576. [0086]
  2577. [0087]
  2578. [0088] //---------------------------------------------
  2579. [0089]
  2580. [0090]
  2581. [0091]
  2582. [0092] //---------------------------------------------
  2583. [0093]
  2584. [0094] //////////////////
  2585. [0095] // Arguments
  2586. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  2587. [0097] {
  2588. [0098] //////////////
  2589. [0099] // Default input
  2590. [0100] mat4 a_mtxProjection;
  2591. [0101] mat4 a_mtxModelViewProjection;
  2592. [0102] mat4 a_mtxModelView;
  2593. [0103] mat4 a_mtxUV;
  2594. [0104] mat4 a_mtxModel;
  2595. [0105] mat4 a_mtxNormal;
  2596. [0106]
  2597. [0107]
  2598. [0108] };
  2599. [0109]
  2600. [0110]
  2601. [0111]
  2602. [0112]
  2603. [0113]
  2604. [0114] ///////////////////////
  2605. [0115] // Mesh instancing
  2606. [0116]
  2607. [0117]
  2608. [0118]
  2609. [0119]
  2610. [0120] //---------------------------------------------
  2611. [0121]
  2612. [0122] ///////////////////////////////
  2613. [0123] // Main program
  2614. [0124] in vec4 vtx_vPosition;
  2615. [0125] in vec4 vtx_vTexCoord0;
  2616. [0126] in vec4 vtx_vTexCoord1;
  2617. [0127] in vec3 vtx_vNormal;
  2618. [0128] in vec4 vtx_vTangent;
  2619. [0129] in vec4 vtx_vColor;
  2620. [0130] in vec4 vtx_vBoneIndices;
  2621. [0131] in vec4 vtx_vBoneWeight;
  2622. [0132]
  2623. [0133] void main()
  2624. [0134] {
  2625. [0135] int vtx_lVertexID = gl_VertexID;
  2626. [0136] int vtx_lInstanceID = gl_InstanceID;
  2627. [0137]
  2628. [0138] vec4 px_vPosition = vec4(0);
  2629. [0139]
  2630. [0140]
  2631. [0141] /////////////
  2632. [0142] // load instance data
  2633. [0143]
  2634. [0144]
  2635. [0145]
  2636. [0146]
  2637. [0147] //////////////////////
  2638. [0148] // Position - Skeleton
  2639. [0149]
  2640. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  2641. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  2642. [0152]
  2643. [0153]
  2644. [0154] //////////////////////
  2645. [0155] // Uv
  2646. [0156]
  2647. [0157]
  2648. [0158] //////////////////////
  2649. [0159] // Color
  2650. [0160]
  2651. [0161]
  2652. [0162]
  2653. [0163]
  2654. [0164]
  2655. [0165]
  2656. [0166]
  2657. [0167]
  2658. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  2659. [0169]
  2660. [0170]
  2661. [0171] //////////////////////
  2662. [0172] // Normals
  2663. [0173]
  2664. [0174]
  2665. [0175] //////////////////////
  2666. [0176] // Normalmapping
  2667. [0177]
  2668. [0178]
  2669. [0179] //////////////////////
  2670. [0180] // Parallax
  2671. [0181]
  2672. [0182]
  2673. [0183]
  2674. [0184] /////////
  2675. [0185] // Angle fade
  2676. [0186]
  2677. [0187]
  2678. [0188]
  2679. [0189] //////////////////////
  2680. [0190] // Linear depth
  2681. [0191]
  2682. [0192]
  2683. [0193] //////////////////////
  2684. [0194] // Vertex Position
  2685. [0195]
  2686. [0196]
  2687. [0197] ////////////////////
  2688. [0198] // Scrolling noise
  2689. [0199]
  2690. [0200]
  2691. [0201] //////////////////////
  2692. [0202] // Deferring (Lights)
  2693. [0203]
  2694. [0204]
  2695. [0205] gl_Position = px_vPosition;
  2696. [0206] }
  2697. [0207]
  2698. ---------------------
  2699. Compile log:
  2700. ---------------------
  2701. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  2702.  
  2703. ---------------------
  2704. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  2705. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  2706. ERROR: Failed to compile GLSL shader ''!
  2707. Shader code:
  2708. -------------------
  2709. [0001] #version 330
  2710. [0002] #extension GL_ARB_explicit_attrib_location : enable
  2711. [0003] #extension GL_ARB_uniform_buffer_object : enable
  2712. [0004] #extension GL_ARB_shading_language_420pack: enable
  2713. [0005] #extension GL_ARB_draw_instanced : enable
  2714. [0006] ////////////////////////////////////////////////////////
  2715. [0007] // Deferred Base - Vertex Shader
  2716. [0008] //
  2717. [0009] //
  2718. [0010] ////////////////////////////////////////////////////////
  2719. [0011]
  2720. [0012]
  2721. [0013]
  2722. [0014]
  2723. [0015] ////////////////////////
  2724. [0016] // TEMP BACKWARD COMBATABILITY BELOW;
  2725. [0017]
  2726. [0018]
  2727. [0019]
  2728. [0020]
  2729. [0021]
  2730. [0022]
  2731. [0023]
  2732. [0024]
  2733. [0025]
  2734. [0026]
  2735. [0027]
  2736. [0028]
  2737. [0029]
  2738. [0030]
  2739. [0031]
  2740. [0032]
  2741. [0033]
  2742. [0034]
  2743. [0035]
  2744. [0036]
  2745. [0037]
  2746. [0038]
  2747. [0039]
  2748. [0040]
  2749. [0041]
  2750. [0042]
  2751. [0043]
  2752. [0044]
  2753. [0045]
  2754. [0046]
  2755. [0047]
  2756. [0048]
  2757. [0049]
  2758. [0050]
  2759. [0051]
  2760. [0052]
  2761. [0053]
  2762. [0054]
  2763. [0055]
  2764. [0056]
  2765. [0057]
  2766. [0058]
  2767. [0059]
  2768. [0060]
  2769. [0061]
  2770. [0062]
  2771. [0063]
  2772. [0064]
  2773. [0065]
  2774. [0066]
  2775. [0067]
  2776. [0068]
  2777. [0069]
  2778. [0070]
  2779. [0071]
  2780. [0072]
  2781. [0073]
  2782. [0074]
  2783. [0075]
  2784. [0076]
  2785. [0077]
  2786. [0078]
  2787. [0079]
  2788. [0080]
  2789. [0081]
  2790. [0082]
  2791. [0083]
  2792. [0084]
  2793. [0085]
  2794. [0086]
  2795. [0087]
  2796. [0088] //---------------------------------------------
  2797. [0089]
  2798. [0090]
  2799. [0091]
  2800. [0092] //---------------------------------------------
  2801. [0093]
  2802. [0094] //////////////////
  2803. [0095] // Arguments
  2804. [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
  2805. [0097] {
  2806. [0098] //////////////
  2807. [0099] // Default input
  2808. [0100] mat4 a_mtxProjection;
  2809. [0101] mat4 a_mtxModelViewProjection;
  2810. [0102] mat4 a_mtxModelView;
  2811. [0103] mat4 a_mtxUV;
  2812. [0104] mat4 a_mtxModel;
  2813. [0105] mat4 a_mtxNormal;
  2814. [0106]
  2815. [0107]
  2816. [0108] };
  2817. [0109]
  2818. [0110]
  2819. [0111]
  2820. [0112]
  2821. [0113]
  2822. [0114] ///////////////////////
  2823. [0115] // Mesh instancing
  2824. [0116]
  2825. [0117]
  2826. [0118]
  2827. [0119]
  2828. [0120] //---------------------------------------------
  2829. [0121]
  2830. [0122] ///////////////////////////////
  2831. [0123] // Main program
  2832. [0124] in vec4 vtx_vPosition;
  2833. [0125] in vec4 vtx_vTexCoord0;
  2834. [0126] in vec4 vtx_vTexCoord1;
  2835. [0127] in vec3 vtx_vNormal;
  2836. [0128] in vec4 vtx_vTangent;
  2837. [0129] in vec4 vtx_vColor;
  2838. [0130] in vec4 vtx_vBoneIndices;
  2839. [0131] in vec4 vtx_vBoneWeight;
  2840. [0132]
  2841. [0133] void main()
  2842. [0134] {
  2843. [0135] int vtx_lVertexID = gl_VertexID;
  2844. [0136] int vtx_lInstanceID = gl_InstanceID;
  2845. [0137]
  2846. [0138] vec4 px_vPosition = vec4(0);
  2847. [0139]
  2848. [0140]
  2849. [0141] /////////////
  2850. [0142] // load instance data
  2851. [0143]
  2852. [0144]
  2853. [0145]
  2854. [0146]
  2855. [0147] //////////////////////
  2856. [0148] // Position - Skeleton
  2857. [0149]
  2858. [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
  2859. [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
  2860. [0152]
  2861. [0153]
  2862. [0154] //////////////////////
  2863. [0155] // Uv
  2864. [0156]
  2865. [0157]
  2866. [0158] //////////////////////
  2867. [0159] // Color
  2868. [0160]
  2869. [0161]
  2870. [0162]
  2871. [0163]
  2872. [0164]
  2873. [0165]
  2874. [0166]
  2875. [0167]
  2876. [0168] mat3 mtxNormal = mat3(a_mtxNormal);
  2877. [0169]
  2878. [0170]
  2879. [0171] //////////////////////
  2880. [0172] // Normals
  2881. [0173]
  2882. [0174]
  2883. [0175] //////////////////////
  2884. [0176] // Normalmapping
  2885. [0177]
  2886. [0178]
  2887. [0179] //////////////////////
  2888. [0180] // Parallax
  2889. [0181]
  2890. [0182]
  2891. [0183]
  2892. [0184] /////////
  2893. [0185] // Angle fade
  2894. [0186]
  2895. [0187]
  2896. [0188]
  2897. [0189] //////////////////////
  2898. [0190] // Linear depth
  2899. [0191]
  2900. [0192]
  2901. [0193] //////////////////////
  2902. [0194] // Vertex Position
  2903. [0195]
  2904. [0196]
  2905. [0197] ////////////////////
  2906. [0198] // Scrolling noise
  2907. [0199]
  2908. [0200]
  2909. [0201] //////////////////////
  2910. [0202] // Deferring (Lights)
  2911. [0203]
  2912. [0204]
  2913. [0205] gl_Position = px_vPosition;
  2914. [0206] }
  2915. [0207]
  2916. ---------------------
  2917. Compile log:
  2918. ---------------------
  2919. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  2920.  
  2921. ---------------------
  2922. ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
  2923. ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
  2924. ERROR: Failed to compile GLSL shader ''!
  2925. Shader code:
  2926. -------------------
  2927. [0001] #version 330
  2928. [0002] #extension GL_ARB_explicit_attrib_location : enable
  2929. [0003] #extension GL_ARB_uniform_buffer_object : enable
  2930. [0004] #extension GL_ARB_shading_language_420pack: enable
  2931. [0005] #extension GL_ARB_draw_instanced : enable
  2932. [0006] ////////////////////////////////////////////////////////
  2933. [0007] // Deferred Light - Vertex Shader
  2934. [0008] //
  2935. [0009] //
  2936. [0010] ////////////////////////////////////////////////////////
  2937. [0011]
  2938. [0012] //---------------------------------------------
  2939. [0013]
  2940. [0014] //////////////////
  2941. [0015] // Arguments
  2942. [0016]
  2943. [0017] layout(std140, binding = 0) uniform cLightArguments
  2944. [0018] {
  2945. [0019] mat4 a_mtxViewProjection;
  2946. [0020] mat4 a_mtxProjection;
  2947. [0021] mat4 a_mtxView;
  2948. [0022] mat4 a_mtxInvViewProjection;
  2949. [0023] mat4 a_mtxInvProjection;
  2950. [0024] mat4 a_mtxInvView;
  2951. [0025]
  2952. [0026] float afFarPlane;
  2953. [0027] float afNearPlane;
  2954. [0028] float afNearByFarPlane;
  2955. [0029] float afInvFarPlane;
  2956. [0030]
  2957. [0031] vec4 avScreenToFarPlane;
  2958. [0032] vec2 avInvScreenSize;
  2959. [0033]
  2960. [0034] vec2 avFogStartAndLength;
  2961. [0035] vec4 avFogColor;
  2962. [0036]
  2963. [0037] vec3 avViewSpaceUp;
  2964. [0038] float afFogFalloffExp;
  2965. [0039]
  2966. [0040] int alInstanceOffset;
  2967. [0041] int alInstanceStride;
  2968. [0042] vec2 avPadding;
  2969. [0043]
  2970. [0044]
  2971. [0045] };
  2972. [0046]
  2973. [0047]
  2974. [0048] ///////////////////////
  2975. [0049] // Instancing
  2976. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  2977. [0051]
  2978. [0052] //---------------------------------------------
  2979. [0053]
  2980. [0054] ///////////////////////////////
  2981. [0055] // Main program
  2982. [0056] in vec4 vtx_vPosition;
  2983. [0057] out vec3 px_vBoxCenter;
  2984. [0058] out vec3 px_vBoxExtent;
  2985. [0059] out vec4 px_vSkyColor;
  2986. [0060] out vec4 px_vGroundColor;
  2987. [0061] out float px_fFalloff;
  2988. [0062] out float px_fBevel;
  2989. [0063] out float px_fWeight;
  2990. [0064]
  2991. [0065] void main()
  2992. [0066] {
  2993. [0067] int vtx_lVertexID = gl_VertexID;
  2994. [0068] int vtx_lInstanceID = gl_InstanceID;
  2995. [0069]
  2996. [0070] vec4 px_vPosition = vec4(0);
  2997. [0071]
  2998. [0072]
  2999. [0073] /////////////
  3000. [0074] // load instance data
  3001. [0075] vec4 vSample;
  3002. [0076] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3003. [0077]
  3004. [0078]
  3005. [0079] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3006. [0080] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3007. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3008. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3009. [0083]
  3010. [0084]
  3011. [0085]
  3012. [0086] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3013. [0087] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3014. [0088] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3015. [0089] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3016. [0090]
  3017. [0091] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3018. [0092] px_fFalloff = vSample.x;
  3019. [0093] px_fBevel = vSample.y;
  3020. [0094] px_fWeight = vSample.z;
  3021. [0095]
  3022. [0096] lBaseOffset += 9;
  3023. [0097]
  3024. [0098]
  3025. [0099]
  3026. [0100]
  3027. [0101]
  3028. [0102]
  3029. [0103]
  3030. [0104]
  3031. [0105]
  3032. [0106]
  3033. [0107]
  3034. [0108]
  3035. [0109]
  3036. [0110] ///////////
  3037. [0111] // Apply model matrix for instance
  3038. [0112] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3039. [0113] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3040. [0114]
  3041. [0115]
  3042. [0116] gl_Position = px_vPosition;
  3043. [0117] }
  3044. ---------------------
  3045. Compile log:
  3046. ---------------------
  3047. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3048.  
  3049. ---------------------
  3050. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3051. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3052. ERROR: Failed to compile GLSL shader ''!
  3053. Shader code:
  3054. -------------------
  3055. [0001] #version 330
  3056. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3057. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3058. [0004] #extension GL_ARB_shading_language_420pack: enable
  3059. [0005] #extension GL_ARB_draw_instanced : enable
  3060. [0006] ////////////////////////////////////////////////////////
  3061. [0007] // Deferred Light - Vertex Shader
  3062. [0008] //
  3063. [0009] //
  3064. [0010] ////////////////////////////////////////////////////////
  3065. [0011]
  3066. [0012] //---------------------------------------------
  3067. [0013]
  3068. [0014] //////////////////
  3069. [0015] // Arguments
  3070. [0016]
  3071. [0017] layout(std140, binding = 0) uniform cLightArguments
  3072. [0018] {
  3073. [0019] mat4 a_mtxViewProjection;
  3074. [0020] mat4 a_mtxProjection;
  3075. [0021] mat4 a_mtxView;
  3076. [0022] mat4 a_mtxInvViewProjection;
  3077. [0023] mat4 a_mtxInvProjection;
  3078. [0024] mat4 a_mtxInvView;
  3079. [0025]
  3080. [0026] float afFarPlane;
  3081. [0027] float afNearPlane;
  3082. [0028] float afNearByFarPlane;
  3083. [0029] float afInvFarPlane;
  3084. [0030]
  3085. [0031] vec4 avScreenToFarPlane;
  3086. [0032] vec2 avInvScreenSize;
  3087. [0033]
  3088. [0034] vec2 avFogStartAndLength;
  3089. [0035] vec4 avFogColor;
  3090. [0036]
  3091. [0037] vec3 avViewSpaceUp;
  3092. [0038] float afFogFalloffExp;
  3093. [0039]
  3094. [0040] int alInstanceOffset;
  3095. [0041] int alInstanceStride;
  3096. [0042] vec2 avPadding;
  3097. [0043]
  3098. [0044]
  3099. [0045] };
  3100. [0046]
  3101. [0047]
  3102. [0048] ///////////////////////
  3103. [0049] // Instancing
  3104. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  3105. [0051]
  3106. [0052] //---------------------------------------------
  3107. [0053]
  3108. [0054] ///////////////////////////////
  3109. [0055] // Main program
  3110. [0056] in vec4 vtx_vPosition;
  3111. [0057] out vec3 px_vBoxCenter;
  3112. [0058] out vec3 px_vBoxExtent;
  3113. [0059] out vec4 px_vSkyColor;
  3114. [0060] out vec4 px_vGroundColor;
  3115. [0061] out float px_fFalloff;
  3116. [0062] out float px_fBevel;
  3117. [0063] out float px_fWeight;
  3118. [0064] out vec4 px_vBands[9];
  3119. [0065]
  3120. [0066] void main()
  3121. [0067] {
  3122. [0068] int vtx_lVertexID = gl_VertexID;
  3123. [0069] int vtx_lInstanceID = gl_InstanceID;
  3124. [0070]
  3125. [0071] vec4 px_vPosition = vec4(0);
  3126. [0072]
  3127. [0073]
  3128. [0074] /////////////
  3129. [0075] // load instance data
  3130. [0076] vec4 vSample;
  3131. [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3132. [0078]
  3133. [0079]
  3134. [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3135. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3136. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3137. [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3138. [0084]
  3139. [0085]
  3140. [0086]
  3141. [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3142. [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3143. [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3144. [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3145. [0091]
  3146. [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3147. [0093] px_fFalloff = vSample.x;
  3148. [0094] px_fBevel = vSample.y;
  3149. [0095] px_fWeight = vSample.z;
  3150. [0096]
  3151. [0097] lBaseOffset += 9;
  3152. [0098]
  3153. [0099]
  3154. [0100]
  3155. [0101]
  3156. [0102]
  3157. [0103]
  3158. [0104]
  3159. [0105] //todo: load this in pixel shader?
  3160. [0106] for(int i = 0; i < 9; ++i) px_vBands[i] = texelFetch(aInstanceBuffer, lBaseOffset+i);
  3161. [0107] lBaseOffset += 9;
  3162. [0108]
  3163. [0109]
  3164. [0110]
  3165. [0111]
  3166. [0112]
  3167. [0113]
  3168. [0114]
  3169. [0115] ///////////
  3170. [0116] // Apply model matrix for instance
  3171. [0117] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3172. [0118] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3173. [0119]
  3174. [0120]
  3175. [0121] gl_Position = px_vPosition;
  3176. [0122] }
  3177. ---------------------
  3178. Compile log:
  3179. ---------------------
  3180. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3181.  
  3182. ---------------------
  3183. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3184. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3185. ERROR: Failed to compile GLSL shader ''!
  3186. Shader code:
  3187. -------------------
  3188. [0001] #version 330
  3189. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3190. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3191. [0004] #extension GL_ARB_shading_language_420pack: enable
  3192. [0005] #extension GL_ARB_draw_instanced : enable
  3193. [0006] ////////////////////////////////////////////////////////
  3194. [0007] // Deferred Light - Vertex Shader
  3195. [0008] //
  3196. [0009] //
  3197. [0010] ////////////////////////////////////////////////////////
  3198. [0011]
  3199. [0012] //---------------------------------------------
  3200. [0013]
  3201. [0014] //////////////////
  3202. [0015] // Arguments
  3203. [0016]
  3204. [0017] layout(std140, binding = 0) uniform cLightArguments
  3205. [0018] {
  3206. [0019] mat4 a_mtxViewProjection;
  3207. [0020] mat4 a_mtxProjection;
  3208. [0021] mat4 a_mtxView;
  3209. [0022] mat4 a_mtxInvViewProjection;
  3210. [0023] mat4 a_mtxInvProjection;
  3211. [0024] mat4 a_mtxInvView;
  3212. [0025]
  3213. [0026] float afFarPlane;
  3214. [0027] float afNearPlane;
  3215. [0028] float afNearByFarPlane;
  3216. [0029] float afInvFarPlane;
  3217. [0030]
  3218. [0031] vec4 avScreenToFarPlane;
  3219. [0032] vec2 avInvScreenSize;
  3220. [0033]
  3221. [0034] vec2 avFogStartAndLength;
  3222. [0035] vec4 avFogColor;
  3223. [0036]
  3224. [0037] vec3 avViewSpaceUp;
  3225. [0038] float afFogFalloffExp;
  3226. [0039]
  3227. [0040] int alInstanceOffset;
  3228. [0041] int alInstanceStride;
  3229. [0042] vec2 avPadding;
  3230. [0043]
  3231. [0044]
  3232. [0045] };
  3233. [0046]
  3234. [0047]
  3235. [0048] ///////////////////////
  3236. [0049] // Instancing
  3237. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  3238. [0051]
  3239. [0052] //---------------------------------------------
  3240. [0053]
  3241. [0054] ///////////////////////////////
  3242. [0055] // Main program
  3243. [0056] in vec4 vtx_vPosition;
  3244. [0057] out vec3 px_vBoxCenter;
  3245. [0058] out vec3 px_vBoxExtent;
  3246. [0059] out vec4 px_vSkyColor;
  3247. [0060] out vec4 px_vGroundColor;
  3248. [0061] out float px_fFalloff;
  3249. [0062] out float px_fBevel;
  3250. [0063] out float px_fWeight;
  3251. [0064]
  3252. [0065] void main()
  3253. [0066] {
  3254. [0067] int vtx_lVertexID = gl_VertexID;
  3255. [0068] int vtx_lInstanceID = gl_InstanceID;
  3256. [0069]
  3257. [0070] vec4 px_vPosition = vec4(0);
  3258. [0071]
  3259. [0072]
  3260. [0073] /////////////
  3261. [0074] // load instance data
  3262. [0075] vec4 vSample;
  3263. [0076] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3264. [0077]
  3265. [0078]
  3266. [0079] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3267. [0080] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3268. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3269. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3270. [0083]
  3271. [0084]
  3272. [0085]
  3273. [0086] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3274. [0087] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3275. [0088] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3276. [0089] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3277. [0090]
  3278. [0091] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3279. [0092] px_fFalloff = vSample.x;
  3280. [0093] px_fBevel = vSample.y;
  3281. [0094] px_fWeight = vSample.z;
  3282. [0095]
  3283. [0096] lBaseOffset += 9;
  3284. [0097]
  3285. [0098]
  3286. [0099]
  3287. [0100]
  3288. [0101]
  3289. [0102]
  3290. [0103]
  3291. [0104]
  3292. [0105]
  3293. [0106]
  3294. [0107]
  3295. [0108]
  3296. [0109]
  3297. [0110] ///////////
  3298. [0111] // Apply model matrix for instance
  3299. [0112] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3300. [0113] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3301. [0114]
  3302. [0115]
  3303. [0116] gl_Position = px_vPosition;
  3304. [0117] }
  3305. ---------------------
  3306. Compile log:
  3307. ---------------------
  3308. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3309.  
  3310. ---------------------
  3311. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3312. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3313. ERROR: Failed to compile GLSL shader ''!
  3314. Shader code:
  3315. -------------------
  3316. [0001] #version 330
  3317. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3318. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3319. [0004] #extension GL_ARB_shading_language_420pack: enable
  3320. [0005] #extension GL_ARB_draw_instanced : enable
  3321. [0006] ////////////////////////////////////////////////////////
  3322. [0007] // Deferred Light - Vertex Shader
  3323. [0008] //
  3324. [0009] //
  3325. [0010] ////////////////////////////////////////////////////////
  3326. [0011]
  3327. [0012] //---------------------------------------------
  3328. [0013]
  3329. [0014] //////////////////
  3330. [0015] // Arguments
  3331. [0016]
  3332. [0017] layout(std140, binding = 0) uniform cLightArguments
  3333. [0018] {
  3334. [0019] mat4 a_mtxViewProjection;
  3335. [0020] mat4 a_mtxProjection;
  3336. [0021] mat4 a_mtxView;
  3337. [0022] mat4 a_mtxInvViewProjection;
  3338. [0023] mat4 a_mtxInvProjection;
  3339. [0024] mat4 a_mtxInvView;
  3340. [0025]
  3341. [0026] float afFarPlane;
  3342. [0027] float afNearPlane;
  3343. [0028] float afNearByFarPlane;
  3344. [0029] float afInvFarPlane;
  3345. [0030]
  3346. [0031] vec4 avScreenToFarPlane;
  3347. [0032] vec2 avInvScreenSize;
  3348. [0033]
  3349. [0034] vec2 avFogStartAndLength;
  3350. [0035] vec4 avFogColor;
  3351. [0036]
  3352. [0037] vec3 avViewSpaceUp;
  3353. [0038] float afFogFalloffExp;
  3354. [0039]
  3355. [0040] int alInstanceOffset;
  3356. [0041] int alInstanceStride;
  3357. [0042] vec2 avPadding;
  3358. [0043]
  3359. [0044]
  3360. [0045] };
  3361. [0046]
  3362. [0047]
  3363. [0048] ///////////////////////
  3364. [0049] // Instancing
  3365. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  3366. [0051]
  3367. [0052] //---------------------------------------------
  3368. [0053]
  3369. [0054] ///////////////////////////////
  3370. [0055] // Main program
  3371. [0056] in vec4 vtx_vPosition;
  3372. [0057] out vec3 px_vBoxCenter;
  3373. [0058] out vec3 px_vBoxExtent;
  3374. [0059] out vec4 px_vSkyColor;
  3375. [0060] out vec4 px_vGroundColor;
  3376. [0061] out float px_fFalloff;
  3377. [0062] out float px_fBevel;
  3378. [0063] out float px_fWeight;
  3379. [0064] out vec4 px_vBands[9];
  3380. [0065]
  3381. [0066] void main()
  3382. [0067] {
  3383. [0068] int vtx_lVertexID = gl_VertexID;
  3384. [0069] int vtx_lInstanceID = gl_InstanceID;
  3385. [0070]
  3386. [0071] vec4 px_vPosition = vec4(0);
  3387. [0072]
  3388. [0073]
  3389. [0074] /////////////
  3390. [0075] // load instance data
  3391. [0076] vec4 vSample;
  3392. [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3393. [0078]
  3394. [0079]
  3395. [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3396. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3397. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3398. [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3399. [0084]
  3400. [0085]
  3401. [0086]
  3402. [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3403. [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3404. [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3405. [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3406. [0091]
  3407. [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3408. [0093] px_fFalloff = vSample.x;
  3409. [0094] px_fBevel = vSample.y;
  3410. [0095] px_fWeight = vSample.z;
  3411. [0096]
  3412. [0097] lBaseOffset += 9;
  3413. [0098]
  3414. [0099]
  3415. [0100]
  3416. [0101]
  3417. [0102]
  3418. [0103]
  3419. [0104]
  3420. [0105] //todo: load this in pixel shader?
  3421. [0106] for(int i = 0; i < 9; ++i) px_vBands[i] = texelFetch(aInstanceBuffer, lBaseOffset+i);
  3422. [0107] lBaseOffset += 9;
  3423. [0108]
  3424. [0109]
  3425. [0110]
  3426. [0111]
  3427. [0112]
  3428. [0113]
  3429. [0114]
  3430. [0115] ///////////
  3431. [0116] // Apply model matrix for instance
  3432. [0117] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3433. [0118] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3434. [0119]
  3435. [0120]
  3436. [0121] gl_Position = px_vPosition;
  3437. [0122] }
  3438. ---------------------
  3439. Compile log:
  3440. ---------------------
  3441. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3442.  
  3443. ---------------------
  3444. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3445. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3446. ERROR: Failed to compile GLSL shader ''!
  3447. Shader code:
  3448. -------------------
  3449. [0001] #version 330
  3450. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3451. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3452. [0004] #extension GL_ARB_shading_language_420pack: enable
  3453. [0005] #extension GL_ARB_draw_instanced : enable
  3454. [0006] ////////////////////////////////////////////////////////
  3455. [0007] // Deferred Light - Vertex Shader
  3456. [0008] //
  3457. [0009] //
  3458. [0010] ////////////////////////////////////////////////////////
  3459. [0011]
  3460. [0012] //---------------------------------------------
  3461. [0013]
  3462. [0014] //////////////////
  3463. [0015] // Arguments
  3464. [0016]
  3465. [0017] layout(std140, binding = 0) uniform cLightArguments
  3466. [0018] {
  3467. [0019] mat4 a_mtxViewProjection;
  3468. [0020] mat4 a_mtxProjection;
  3469. [0021] mat4 a_mtxView;
  3470. [0022] mat4 a_mtxInvViewProjection;
  3471. [0023] mat4 a_mtxInvProjection;
  3472. [0024] mat4 a_mtxInvView;
  3473. [0025]
  3474. [0026] float afFarPlane;
  3475. [0027] float afNearPlane;
  3476. [0028] float afNearByFarPlane;
  3477. [0029] float afInvFarPlane;
  3478. [0030]
  3479. [0031] vec4 avScreenToFarPlane;
  3480. [0032] vec2 avInvScreenSize;
  3481. [0033]
  3482. [0034] vec2 avFogStartAndLength;
  3483. [0035] vec4 avFogColor;
  3484. [0036]
  3485. [0037] vec3 avViewSpaceUp;
  3486. [0038] float afFogFalloffExp;
  3487. [0039]
  3488. [0040] int alInstanceOffset;
  3489. [0041] int alInstanceStride;
  3490. [0042] vec2 avPadding;
  3491. [0043]
  3492. [0044]
  3493. [0045] };
  3494. [0046]
  3495. [0047]
  3496. [0048] ///////////////////////
  3497. [0049] // Instancing
  3498. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  3499. [0051]
  3500. [0052] //---------------------------------------------
  3501. [0053]
  3502. [0054] ///////////////////////////////
  3503. [0055] // Main program
  3504. [0056] in vec4 vtx_vPosition;
  3505. [0057] out vec3 px_vBoxCenter;
  3506. [0058] out vec3 px_vBoxExtent;
  3507. [0059] out vec4 px_vSkyColor;
  3508. [0060] out vec4 px_vGroundColor;
  3509. [0061] out float px_fFalloff;
  3510. [0062] out float px_fBevel;
  3511. [0063] out float px_fWeight;
  3512. [0064]
  3513. [0065] void main()
  3514. [0066] {
  3515. [0067] int vtx_lVertexID = gl_VertexID;
  3516. [0068] int vtx_lInstanceID = gl_InstanceID;
  3517. [0069]
  3518. [0070] vec4 px_vPosition = vec4(0);
  3519. [0071]
  3520. [0072]
  3521. [0073] /////////////
  3522. [0074] // load instance data
  3523. [0075] vec4 vSample;
  3524. [0076] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3525. [0077]
  3526. [0078]
  3527. [0079] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3528. [0080] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3529. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3530. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3531. [0083]
  3532. [0084]
  3533. [0085]
  3534. [0086] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3535. [0087] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3536. [0088] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3537. [0089] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3538. [0090]
  3539. [0091] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3540. [0092] px_fFalloff = vSample.x;
  3541. [0093] px_fBevel = vSample.y;
  3542. [0094] px_fWeight = vSample.z;
  3543. [0095]
  3544. [0096] lBaseOffset += 9;
  3545. [0097]
  3546. [0098]
  3547. [0099]
  3548. [0100]
  3549. [0101]
  3550. [0102]
  3551. [0103]
  3552. [0104]
  3553. [0105]
  3554. [0106]
  3555. [0107]
  3556. [0108]
  3557. [0109]
  3558. [0110] ///////////
  3559. [0111] // Apply model matrix for instance
  3560. [0112] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3561. [0113] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3562. [0114]
  3563. [0115]
  3564. [0116] gl_Position = px_vPosition;
  3565. [0117] }
  3566. ---------------------
  3567. Compile log:
  3568. ---------------------
  3569. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3570.  
  3571. ---------------------
  3572. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3573. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3574. ERROR: Failed to compile GLSL shader ''!
  3575. Shader code:
  3576. -------------------
  3577. [0001] #version 330
  3578. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3579. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3580. [0004] #extension GL_ARB_shading_language_420pack: enable
  3581. [0005] #extension GL_ARB_draw_instanced : enable
  3582. [0006] ////////////////////////////////////////////////////////
  3583. [0007] // Deferred Light - Vertex Shader
  3584. [0008] //
  3585. [0009] //
  3586. [0010] ////////////////////////////////////////////////////////
  3587. [0011]
  3588. [0012] //---------------------------------------------
  3589. [0013]
  3590. [0014] //////////////////
  3591. [0015] // Arguments
  3592. [0016]
  3593. [0017] layout(std140, binding = 0) uniform cLightArguments
  3594. [0018] {
  3595. [0019] mat4 a_mtxViewProjection;
  3596. [0020] mat4 a_mtxProjection;
  3597. [0021] mat4 a_mtxView;
  3598. [0022] mat4 a_mtxInvViewProjection;
  3599. [0023] mat4 a_mtxInvProjection;
  3600. [0024] mat4 a_mtxInvView;
  3601. [0025]
  3602. [0026] float afFarPlane;
  3603. [0027] float afNearPlane;
  3604. [0028] float afNearByFarPlane;
  3605. [0029] float afInvFarPlane;
  3606. [0030]
  3607. [0031] vec4 avScreenToFarPlane;
  3608. [0032] vec2 avInvScreenSize;
  3609. [0033]
  3610. [0034] vec2 avFogStartAndLength;
  3611. [0035] vec4 avFogColor;
  3612. [0036]
  3613. [0037] vec3 avViewSpaceUp;
  3614. [0038] float afFogFalloffExp;
  3615. [0039]
  3616. [0040] int alInstanceOffset;
  3617. [0041] int alInstanceStride;
  3618. [0042] vec2 avPadding;
  3619. [0043]
  3620. [0044]
  3621. [0045] };
  3622. [0046]
  3623. [0047]
  3624. [0048] ///////////////////////
  3625. [0049] // Instancing
  3626. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  3627. [0051]
  3628. [0052] //---------------------------------------------
  3629. [0053]
  3630. [0054] ///////////////////////////////
  3631. [0055] // Main program
  3632. [0056] in vec4 vtx_vPosition;
  3633. [0057] out vec3 px_vBoxCenter;
  3634. [0058] out vec3 px_vBoxExtent;
  3635. [0059] out vec4 px_vSkyColor;
  3636. [0060] out vec4 px_vGroundColor;
  3637. [0061] out float px_fFalloff;
  3638. [0062] out float px_fBevel;
  3639. [0063] out float px_fWeight;
  3640. [0064] out vec4 px_vBands[9];
  3641. [0065]
  3642. [0066] void main()
  3643. [0067] {
  3644. [0068] int vtx_lVertexID = gl_VertexID;
  3645. [0069] int vtx_lInstanceID = gl_InstanceID;
  3646. [0070]
  3647. [0071] vec4 px_vPosition = vec4(0);
  3648. [0072]
  3649. [0073]
  3650. [0074] /////////////
  3651. [0075] // load instance data
  3652. [0076] vec4 vSample;
  3653. [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3654. [0078]
  3655. [0079]
  3656. [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3657. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3658. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3659. [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3660. [0084]
  3661. [0085]
  3662. [0086]
  3663. [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3664. [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3665. [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3666. [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3667. [0091]
  3668. [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3669. [0093] px_fFalloff = vSample.x;
  3670. [0094] px_fBevel = vSample.y;
  3671. [0095] px_fWeight = vSample.z;
  3672. [0096]
  3673. [0097] lBaseOffset += 9;
  3674. [0098]
  3675. [0099]
  3676. [0100]
  3677. [0101]
  3678. [0102]
  3679. [0103]
  3680. [0104]
  3681. [0105] //todo: load this in pixel shader?
  3682. [0106] for(int i = 0; i < 9; ++i) px_vBands[i] = texelFetch(aInstanceBuffer, lBaseOffset+i);
  3683. [0107] lBaseOffset += 9;
  3684. [0108]
  3685. [0109]
  3686. [0110]
  3687. [0111]
  3688. [0112]
  3689. [0113]
  3690. [0114]
  3691. [0115] ///////////
  3692. [0116] // Apply model matrix for instance
  3693. [0117] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3694. [0118] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3695. [0119]
  3696. [0120]
  3697. [0121] gl_Position = px_vPosition;
  3698. [0122] }
  3699. ---------------------
  3700. Compile log:
  3701. ---------------------
  3702. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3703.  
  3704. ---------------------
  3705. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3706. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3707. ERROR: Failed to compile GLSL shader ''!
  3708. Shader code:
  3709. -------------------
  3710. [0001] #version 330
  3711. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3712. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3713. [0004] #extension GL_ARB_shading_language_420pack: enable
  3714. [0005] #extension GL_ARB_draw_instanced : enable
  3715. [0006] ////////////////////////////////////////////////////////
  3716. [0007] // Deferred Light - Vertex Shader
  3717. [0008] //
  3718. [0009] //
  3719. [0010] ////////////////////////////////////////////////////////
  3720. [0011]
  3721. [0012] //---------------------------------------------
  3722. [0013]
  3723. [0014] //////////////////
  3724. [0015] // Arguments
  3725. [0016]
  3726. [0017] layout(std140, binding = 0) uniform cLightArguments
  3727. [0018] {
  3728. [0019] mat4 a_mtxViewProjection;
  3729. [0020] mat4 a_mtxProjection;
  3730. [0021] mat4 a_mtxView;
  3731. [0022] mat4 a_mtxInvViewProjection;
  3732. [0023] mat4 a_mtxInvProjection;
  3733. [0024] mat4 a_mtxInvView;
  3734. [0025]
  3735. [0026] float afFarPlane;
  3736. [0027] float afNearPlane;
  3737. [0028] float afNearByFarPlane;
  3738. [0029] float afInvFarPlane;
  3739. [0030]
  3740. [0031] vec4 avScreenToFarPlane;
  3741. [0032] vec2 avInvScreenSize;
  3742. [0033]
  3743. [0034] vec2 avFogStartAndLength;
  3744. [0035] vec4 avFogColor;
  3745. [0036]
  3746. [0037] vec3 avViewSpaceUp;
  3747. [0038] float afFogFalloffExp;
  3748. [0039]
  3749. [0040] int alInstanceOffset;
  3750. [0041] int alInstanceStride;
  3751. [0042] vec2 avPadding;
  3752. [0043]
  3753. [0044]
  3754. [0045] };
  3755. [0046]
  3756. [0047]
  3757. [0048] ///////////////////////
  3758. [0049] // Instancing
  3759. [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
  3760. [0051]
  3761. [0052] //---------------------------------------------
  3762. [0053]
  3763. [0054] ///////////////////////////////
  3764. [0055] // Main program
  3765. [0056] in vec4 vtx_vPosition;
  3766. [0057] out vec3 px_vBoxCenter;
  3767. [0058] out vec3 px_vBoxExtent;
  3768. [0059] out vec4 px_vSkyColor;
  3769. [0060] out vec4 px_vGroundColor;
  3770. [0061] out float px_fFalloff;
  3771. [0062] out float px_fBevel;
  3772. [0063] out float px_fWeight;
  3773. [0064] out float px_fComplexity;
  3774. [0065]
  3775. [0066] void main()
  3776. [0067] {
  3777. [0068] int vtx_lVertexID = gl_VertexID;
  3778. [0069] int vtx_lInstanceID = gl_InstanceID;
  3779. [0070]
  3780. [0071] vec4 px_vPosition = vec4(0);
  3781. [0072]
  3782. [0073]
  3783. [0074] /////////////
  3784. [0075] // load instance data
  3785. [0076] vec4 vSample;
  3786. [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
  3787. [0078]
  3788. [0079]
  3789. [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
  3790. [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
  3791. [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
  3792. [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
  3793. [0084]
  3794. [0085]
  3795. [0086]
  3796. [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
  3797. [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
  3798. [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
  3799. [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
  3800. [0091]
  3801. [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
  3802. [0093] px_fFalloff = vSample.x;
  3803. [0094] px_fBevel = vSample.y;
  3804. [0095] px_fWeight = vSample.z;
  3805. [0096]
  3806. [0097] lBaseOffset += 9;
  3807. [0098]
  3808. [0099]
  3809. [0100]
  3810. [0101]
  3811. [0102]
  3812. [0103]
  3813. [0104]
  3814. [0105]
  3815. [0106]
  3816. [0107]
  3817. [0108]
  3818. [0109] px_fComplexity = texelFetch(aInstanceBuffer, lBaseOffset).x;
  3819. [0110]
  3820. [0111]
  3821. [0112]
  3822. [0113] ///////////
  3823. [0114] // Apply model matrix for instance
  3824. [0115] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
  3825. [0116] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
  3826. [0117]
  3827. [0118]
  3828. [0119] gl_Position = px_vPosition;
  3829. [0120] }
  3830. ---------------------
  3831. Compile log:
  3832. ---------------------
  3833. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3834.  
  3835. ---------------------
  3836. ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
  3837. ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
  3838. ERROR: Failed to compile GLSL shader ''!
  3839. Shader code:
  3840. -------------------
  3841. [0001] #version 330
  3842. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3843. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3844. [0004] #extension GL_ARB_shading_language_420pack: enable
  3845. [0005] #extension GL_ARB_draw_instanced : enable
  3846. [0006] /////////////////////////////
  3847. [0007] // Quad vertex shader used by deferred poost effects
  3848. [0008] //////////////////////////
  3849. [0009]
  3850. [0010] in vec4 vtx_vPosition;
  3851. [0011] in vec4 vtx_vTexCoord0;
  3852. [0012] in vec4 vtx_vTexCoord1;
  3853. [0013] out vec4 px_vTexCoord0;
  3854. [0014]
  3855. [0015] void main()
  3856. [0016] {
  3857. [0017] int vtx_lVertexID = gl_VertexID;
  3858. [0018] int vtx_lInstanceID = gl_InstanceID;
  3859. [0019]
  3860. [0020] vec4 px_vPosition = vec4(0);
  3861. [0021]
  3862. [0022]
  3863. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  3864. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  3865. [0025]
  3866. [0026]
  3867. [0027] gl_Position = px_vPosition;
  3868. ---------------------
  3869. Compile log:
  3870. ---------------------
  3871. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3872.  
  3873. ---------------------
  3874. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  3875. ERROR: Could not load program manager 'Deferred' shader 'deferred_posteffect_quad_vtx.hpsl'
  3876. ERROR: Failed to compile GLSL shader ''!
  3877. Shader code:
  3878. -------------------
  3879. [0001] #version 330
  3880. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3881. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3882. [0004] #extension GL_ARB_shading_language_420pack: enable
  3883. [0005] #extension GL_ARB_draw_instanced : enable
  3884. [0006] /////////////////////////////
  3885. [0007] // Quad vertex shader used by deferred poost effects
  3886. [0008] //////////////////////////
  3887. [0009]
  3888. [0010] in vec4 vtx_vPosition;
  3889. [0011] in vec4 vtx_vTexCoord0;
  3890. [0012] in vec4 vtx_vTexCoord1;
  3891. [0013] out vec4 px_vTexCoord0;
  3892. [0014]
  3893. [0015] void main()
  3894. [0016] {
  3895. [0017] int vtx_lVertexID = gl_VertexID;
  3896. [0018] int vtx_lInstanceID = gl_InstanceID;
  3897. [0019]
  3898. [0020] vec4 px_vPosition = vec4(0);
  3899. [0021]
  3900. [0022]
  3901. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  3902. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  3903. [0025]
  3904. [0026]
  3905. [0027] gl_Position = px_vPosition;
  3906. ---------------------
  3907. Compile log:
  3908. ---------------------
  3909. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3910.  
  3911. ---------------------
  3912. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  3913. ERROR: Failed to compile GLSL shader ''!
  3914. Shader code:
  3915. -------------------
  3916. [0001] #version 330
  3917. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3918. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3919. [0004] #extension GL_ARB_shading_language_420pack: enable
  3920. [0005] ////////////////////////////////////////////////////////
  3921. [0006] // Deferred Depth unpack - Fragment Shader
  3922. [0007] //
  3923. [0008] // Unpacks the depth map of the gbuffer into the red channel.
  3924. [0009] ////////////////////////////////////////////////////////
  3925. [0010]
  3926. [0011] //---------------------------------------------------------
  3927. [0012]
  3928. [0013] layout(binding = 0) uniform sampler2D depthTexture;
  3929. [0014]
  3930. [0015] in vec4 px_vPosition;
  3931. [0016] in vec4 px_vTexCoord0;
  3932. [0017] layout(location = 0) out vec4 out_vColor;
  3933. [0018]
  3934. [0019] void main()
  3935. [0020] {
  3936. [0021] vec4 px_vPosition = gl_FragCoord;
  3937. [0022] bool px_bFrontFacing = gl_FrontFacing;
  3938. [0023] int px_lPrimitiveID = gl_PrimitiveID;
  3939. [0024]
  3940. [0025]
  3941. [0026]
  3942. [0027] out_vColor = texture(depthTexture, px_vTexCoord0.xy).wwww;
  3943. [0028] }
  3944. [0029]
  3945. ---------------------
  3946. Compile log:
  3947. ---------------------
  3948. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3949.  
  3950. ---------------------
  3951. ERROR: Couldn't create program 'deferred_unpack_depth_frag.hpsl'
  3952. ERROR: Failed to compile GLSL shader ''!
  3953. Shader code:
  3954. -------------------
  3955. [0001] #version 330
  3956. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3957. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3958. [0004] #extension GL_ARB_shading_language_420pack: enable
  3959. [0005] #extension GL_ARB_draw_instanced : enable
  3960. [0006] /////////////////////////////
  3961. [0007] // Quad vertex shader used by deferred poost effects
  3962. [0008] //////////////////////////
  3963. [0009]
  3964. [0010] in vec4 vtx_vPosition;
  3965. [0011] in vec4 vtx_vTexCoord0;
  3966. [0012] in vec4 vtx_vTexCoord1;
  3967. [0013] out vec4 px_vTexCoord0;
  3968. [0014]
  3969. [0015] void main()
  3970. [0016] {
  3971. [0017] int vtx_lVertexID = gl_VertexID;
  3972. [0018] int vtx_lInstanceID = gl_InstanceID;
  3973. [0019]
  3974. [0020] vec4 px_vPosition = vec4(0);
  3975. [0021]
  3976. [0022]
  3977. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  3978. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  3979. [0025]
  3980. [0026]
  3981. [0027] gl_Position = px_vPosition;
  3982. ---------------------
  3983. Compile log:
  3984. ---------------------
  3985. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  3986.  
  3987. ---------------------
  3988. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  3989. ERROR: Failed to compile GLSL shader ''!
  3990. Shader code:
  3991. -------------------
  3992. [0001] #version 330
  3993. [0002] #extension GL_ARB_explicit_attrib_location : enable
  3994. [0003] #extension GL_ARB_uniform_buffer_object : enable
  3995. [0004] #extension GL_ARB_shading_language_420pack: enable
  3996. [0005] ////////////////////////////////////////////////////////
  3997. [0006] // Deferred Depth unpack - Fragment Shader
  3998. [0007] //
  3999. [0008] // Unpacks the depth map of the gbuffer into the red channel.
  4000. [0009] ////////////////////////////////////////////////////////
  4001. [0010]
  4002. [0011] layout(binding = 0) uniform sampler2D depthTexture;
  4003. [0012]
  4004. [0013] uniform vec2 avInvScreenSize;
  4005. [0014]
  4006. [0015] in vec4 px_vPosition;
  4007. [0016] in vec4 px_vTexCoord0;
  4008. [0017] layout(location = 0) out vec4 px_vColor;
  4009. [0018]
  4010. [0019] void main()
  4011. [0020] {
  4012. [0021] vec4 px_vPosition = gl_FragCoord;
  4013. [0022] bool px_bFrontFacing = gl_FrontFacing;
  4014. [0023] int px_lPrimitiveID = gl_PrimitiveID;
  4015. [0024]
  4016. [0025]
  4017. [0026] vec2 vScreenPos = px_vTexCoord0.xy;
  4018. [0027]
  4019. [0028]
  4020. [0029] /////////////////
  4021. [0030] // Rotated grid subsampling to avoid XY directional bias or Z precision bias while downsampling
  4022. [0031] vec2 vOffset = vec2(fract((px_vPosition.xy + vec2(1.0)) / 2.0) * 2.0).yx * avInvScreenSize;
  4023. [0032]
  4024. [0033] //////////////////
  4025. [0034] // Get new screen color
  4026. [0035] px_vColor = texture(depthTexture, vScreenPos + vOffset).xxxx;
  4027. [0036] }
  4028. [0037]
  4029. ---------------------
  4030. Compile log:
  4031. ---------------------
  4032. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4033.  
  4034. ---------------------
  4035. ERROR: Couldn't create program 'deferred_ssao_depth_downsample_frag.hpsl'
  4036. ERROR: Failed to compile GLSL shader ''!
  4037. Shader code:
  4038. -------------------
  4039. [0001] #version 330
  4040. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4041. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4042. [0004] #extension GL_ARB_shading_language_420pack: enable
  4043. [0005] #extension GL_ARB_draw_instanced : enable
  4044. [0006] /////////////////////////////
  4045. [0007] // Quad vertex shader used by deferred poost effects
  4046. [0008] //////////////////////////
  4047. [0009]
  4048. [0010] in vec4 vtx_vPosition;
  4049. [0011] in vec4 vtx_vTexCoord0;
  4050. [0012] in vec4 vtx_vTexCoord1;
  4051. [0013] out vec4 px_vTexCoord0;
  4052. [0014]
  4053. [0015] void main()
  4054. [0016] {
  4055. [0017] int vtx_lVertexID = gl_VertexID;
  4056. [0018] int vtx_lInstanceID = gl_InstanceID;
  4057. [0019]
  4058. [0020] vec4 px_vPosition = vec4(0);
  4059. [0021]
  4060. [0022]
  4061. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  4062. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  4063. [0025]
  4064. [0026]
  4065. [0027] gl_Position = px_vPosition;
  4066. ---------------------
  4067. Compile log:
  4068. ---------------------
  4069. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4070.  
  4071. ---------------------
  4072. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  4073. ERROR: Failed to compile GLSL shader ''!
  4074. Shader code:
  4075. -------------------
  4076. [0001] #version 330
  4077. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4078. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4079. [0004] #extension GL_ARB_shading_language_420pack: enable
  4080. [0005] ////////////////////////////////////////////////////////
  4081. [0006] // Deferred Depth unpack - Fragment Shader
  4082. [0007] //
  4083. [0008] // Unpacks the depth map of the gbuffer into the red channel.
  4084. [0009] ////////////////////////////////////////////////////////
  4085. [0010]
  4086. [0011] //---------------------------------------------------------
  4087. [0012]
  4088. [0013] uniform float afFarPlane;
  4089. [0014] uniform float afDepthDifference;
  4090. [0015] uniform vec2 avDirection;
  4091. [0016]
  4092. [0017] layout(binding = 0) uniform sampler2D ssaoTexture;
  4093. [0018]
  4094. [0019] in vec4 px_vPosition;
  4095. [0020] in vec4 px_vTexCoord0;
  4096. [0021] layout(location = 0) out vec4 out_vColor;
  4097. [0022]
  4098. [0023] void main()
  4099. [0024] {
  4100. [0025] vec4 px_vPosition = gl_FragCoord;
  4101. [0026] bool px_bFrontFacing = gl_FrontFacing;
  4102. [0027] int px_lPrimitiveID = gl_PrimitiveID;
  4103. [0028]
  4104. [0029]
  4105. [0030] //////////////////
  4106. [0031] // Get core depth and AO
  4107. [0032] vec2 vScreenPos = px_vTexCoord0.xy;
  4108. [0033] vec4 vCoresample = texture(ssaoTexture, vScreenPos);
  4109. [0034]
  4110. [0035] float fCoreDepth = vCoresample.x * afFarPlane;
  4111. [0036] float fDifference = (1.0 + fCoreDepth * 2.0 / 200.0) * afDepthDifference;
  4112. [0037] float fDiffMul = 1.0 / fDifference;
  4113. [0038]
  4114. [0039] float fResult = vCoresample.y;
  4115. [0040] float fWeight = 1;
  4116. [0041]
  4117. [0042] if(fCoreDepth < 64.0)
  4118. [0043] {
  4119. [0044] vec3 vSampleDepth;
  4120. [0045] vec3 vSampleAO;
  4121. [0046] vec3 vWeight;
  4122. [0047] vec4 vSample;
  4123. [0048]
  4124. [0049] ///////////
  4125. [0050] // Gather 4 samples in one direction
  4126. [0051] vSample = texture(ssaoTexture, vScreenPos + avDirection * 1);
  4127. [0052] vSampleDepth.x = vSample.x;
  4128. [0053] vSampleAO.x = vSample.y;
  4129. [0054] vSample = texture(ssaoTexture, vScreenPos + avDirection * 2);
  4130. [0055] vSampleDepth.y = vSample.x;
  4131. [0056] vSampleAO.y = vSample.y;
  4132. [0057] vSample = texture(ssaoTexture, vScreenPos + avDirection * 3);
  4133. [0058] vSampleDepth.z = vSample.x;
  4134. [0059] vSampleAO.z = vSample.y;
  4135. [0060]
  4136. [0061] vSampleDepth = vSampleDepth * afFarPlane;
  4137. [0062]
  4138. [0063] ////////////
  4139. [0064] // Combine them
  4140. [0065] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
  4141. [0066] fResult += dot(vWeight, vSampleAO);
  4142. [0067] fWeight += dot(vWeight, vec3(1.0));
  4143. [0068]
  4144. [0069] ///////////////////
  4145. [0070] // Gather 4 samples in the opposite
  4146. [0071] vSample = texture(ssaoTexture, vScreenPos - avDirection * 1);
  4147. [0072] vSampleDepth.x = vSample.x;
  4148. [0073] vSampleAO.x = vSample.y;
  4149. [0074] vSample = texture(ssaoTexture, vScreenPos - avDirection * 2);
  4150. [0075] vSampleDepth.y = vSample.x;
  4151. [0076] vSampleAO.y = vSample.y;
  4152. [0077] vSample = texture(ssaoTexture, vScreenPos - avDirection * 3);
  4153. [0078] vSampleDepth.z = vSample.x;
  4154. [0079] vSampleAO.z = vSample.y;
  4155. [0080]
  4156. [0081] vSampleDepth = vSampleDepth * afFarPlane;
  4157. [0082]
  4158. [0083] ////////////
  4159. [0084] // Combine them and normalize
  4160. [0085] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
  4161. [0086] fResult += dot(vWeight, vSampleAO);
  4162. [0087] fWeight += dot(vWeight, vec3(1.0));
  4163. [0088]
  4164. [0089] fResult /= fWeight;
  4165. [0090] }
  4166. [0091]
  4167. [0092] //////////
  4168. [0093] // Store depth and AO
  4169. [0094] vec4 vResult = vec4(vCoresample.x, fResult, 0, 0);
  4170. [0095]
  4171. [0096] //////////////////
  4172. [0097] // Get new screen color
  4173. [0098] out_vColor.xyzw = vResult;
  4174. ---------------------
  4175. Compile log:
  4176. ---------------------
  4177. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4178.  
  4179. ---------------------
  4180. ERROR: Couldn't create program 'deferred_ssao_blur_frag.hpsl'
  4181. ERROR: Failed to compile GLSL shader ''!
  4182. Shader code:
  4183. -------------------
  4184. [0001] #version 330
  4185. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4186. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4187. [0004] #extension GL_ARB_shading_language_420pack: enable
  4188. [0005] #extension GL_ARB_draw_instanced : enable
  4189. [0006] /////////////////////////////
  4190. [0007] // Quad vertex shader used by deferred poost effects
  4191. [0008] //////////////////////////
  4192. [0009]
  4193. [0010] in vec4 vtx_vPosition;
  4194. [0011] in vec4 vtx_vTexCoord0;
  4195. [0012] in vec4 vtx_vTexCoord1;
  4196. [0013] out vec4 px_vTexCoord0;
  4197. [0014]
  4198. [0015] void main()
  4199. [0016] {
  4200. [0017] int vtx_lVertexID = gl_VertexID;
  4201. [0018] int vtx_lInstanceID = gl_InstanceID;
  4202. [0019]
  4203. [0020] vec4 px_vPosition = vec4(0);
  4204. [0021]
  4205. [0022]
  4206. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  4207. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  4208. [0025]
  4209. [0026]
  4210. [0027] gl_Position = px_vPosition;
  4211. ---------------------
  4212. Compile log:
  4213. ---------------------
  4214. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4215.  
  4216. ---------------------
  4217. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  4218. ERROR: Failed to compile GLSL shader ''!
  4219. Shader code:
  4220. -------------------
  4221. [0001] #version 330
  4222. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4223. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4224. [0004] #extension GL_ARB_shading_language_420pack: enable
  4225. [0005] ////////////////////////////////////////////////////////
  4226. [0006] // Deferred Depth unpack - Fragment Shader
  4227. [0007] //
  4228. [0008] // Unpacks the depth map of the gbuffer into the red channel.
  4229. [0009] ////////////////////////////////////////////////////////
  4230. [0010]
  4231. [0011] //---------------------------------------------------------
  4232. [0012]
  4233. [0013] uniform float afFarPlane;
  4234. [0014] uniform float afDepthDifference;
  4235. [0015] uniform vec2 avDirection;
  4236. [0016]
  4237. [0017] layout(binding = 0) uniform sampler2D ssaoTexture;
  4238. [0018]
  4239. [0019] in vec4 px_vPosition;
  4240. [0020] in vec4 px_vTexCoord0;
  4241. [0021] layout(location = 0) out vec4 out_vColor;
  4242. [0022]
  4243. [0023] void main()
  4244. [0024] {
  4245. [0025] vec4 px_vPosition = gl_FragCoord;
  4246. [0026] bool px_bFrontFacing = gl_FrontFacing;
  4247. [0027] int px_lPrimitiveID = gl_PrimitiveID;
  4248. [0028]
  4249. [0029]
  4250. [0030] //////////////////
  4251. [0031] // Get core depth and AO
  4252. [0032] vec2 vScreenPos = px_vTexCoord0.xy;
  4253. [0033] vec4 vCoresample = texture(ssaoTexture, vScreenPos);
  4254. [0034]
  4255. [0035] float fCoreDepth = vCoresample.x * afFarPlane;
  4256. [0036] float fDifference = (1.0 + fCoreDepth * 2.0 / 200.0) * afDepthDifference;
  4257. [0037] float fDiffMul = 1.0 / fDifference;
  4258. [0038]
  4259. [0039] float fResult = vCoresample.y;
  4260. [0040] float fWeight = 1;
  4261. [0041]
  4262. [0042] if(fCoreDepth < 64.0)
  4263. [0043] {
  4264. [0044] vec3 vSampleDepth;
  4265. [0045] vec3 vSampleAO;
  4266. [0046] vec3 vWeight;
  4267. [0047] vec4 vSample;
  4268. [0048]
  4269. [0049] ///////////
  4270. [0050] // Gather 4 samples in one direction
  4271. [0051] vSample = texture(ssaoTexture, vScreenPos + avDirection * 1);
  4272. [0052] vSampleDepth.x = vSample.x;
  4273. [0053] vSampleAO.x = vSample.y;
  4274. [0054] vSample = texture(ssaoTexture, vScreenPos + avDirection * 2);
  4275. [0055] vSampleDepth.y = vSample.x;
  4276. [0056] vSampleAO.y = vSample.y;
  4277. [0057] vSample = texture(ssaoTexture, vScreenPos + avDirection * 3);
  4278. [0058] vSampleDepth.z = vSample.x;
  4279. [0059] vSampleAO.z = vSample.y;
  4280. [0060]
  4281. [0061] vSampleDepth = vSampleDepth * afFarPlane;
  4282. [0062]
  4283. [0063] ////////////
  4284. [0064] // Combine them
  4285. [0065] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
  4286. [0066] fResult += dot(vWeight, vSampleAO);
  4287. [0067] fWeight += dot(vWeight, vec3(1.0));
  4288. [0068]
  4289. [0069] ///////////////////
  4290. [0070] // Gather 4 samples in the opposite
  4291. [0071] vSample = texture(ssaoTexture, vScreenPos - avDirection * 1);
  4292. [0072] vSampleDepth.x = vSample.x;
  4293. [0073] vSampleAO.x = vSample.y;
  4294. [0074] vSample = texture(ssaoTexture, vScreenPos - avDirection * 2);
  4295. [0075] vSampleDepth.y = vSample.x;
  4296. [0076] vSampleAO.y = vSample.y;
  4297. [0077] vSample = texture(ssaoTexture, vScreenPos - avDirection * 3);
  4298. [0078] vSampleDepth.z = vSample.x;
  4299. [0079] vSampleAO.z = vSample.y;
  4300. [0080]
  4301. [0081] vSampleDepth = vSampleDepth * afFarPlane;
  4302. [0082]
  4303. [0083] ////////////
  4304. [0084] // Combine them and normalize
  4305. [0085] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
  4306. [0086] fResult += dot(vWeight, vSampleAO);
  4307. [0087] fWeight += dot(vWeight, vec3(1.0));
  4308. [0088]
  4309. [0089] fResult /= fWeight;
  4310. [0090] }
  4311. [0091]
  4312. [0092] //////////
  4313. [0093] // Store depth and AO
  4314. [0094] vec4 vResult = vec4(vCoresample.x, fResult, 0, 0);
  4315. [0095]
  4316. [0096] //////////////////
  4317. [0097] // Get new screen color
  4318. [0098] out_vColor.xyzw = vResult;
  4319. ---------------------
  4320. Compile log:
  4321. ---------------------
  4322. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4323.  
  4324. ---------------------
  4325. ERROR: Couldn't create program 'deferred_ssao_blur_frag.hpsl'
  4326. ERROR: Failed to compile GLSL shader ''!
  4327. Shader code:
  4328. -------------------
  4329. [0001] #version 330
  4330. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4331. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4332. [0004] #extension GL_ARB_shading_language_420pack: enable
  4333. [0005] #extension GL_ARB_draw_instanced : enable
  4334. [0006] /////////////////////////////
  4335. [0007] // Quad vertex shader used by deferred poost effects
  4336. [0008] //////////////////////////
  4337. [0009]
  4338. [0010] in vec4 vtx_vPosition;
  4339. [0011] in vec4 vtx_vTexCoord0;
  4340. [0012] in vec4 vtx_vTexCoord1;
  4341. [0013] out vec4 px_vTexCoord0;
  4342. [0014]
  4343. [0015] void main()
  4344. [0016] {
  4345. [0017] int vtx_lVertexID = gl_VertexID;
  4346. [0018] int vtx_lInstanceID = gl_InstanceID;
  4347. [0019]
  4348. [0020] vec4 px_vPosition = vec4(0);
  4349. [0021]
  4350. [0022]
  4351. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  4352. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  4353. [0025]
  4354. [0026]
  4355. [0027] gl_Position = px_vPosition;
  4356. ---------------------
  4357. Compile log:
  4358. ---------------------
  4359. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4360.  
  4361. ---------------------
  4362. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  4363. ERROR: Failed to compile GLSL shader ''!
  4364. Shader code:
  4365. -------------------
  4366. [0001] #version 330
  4367. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4368. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4369. [0004] #extension GL_ARB_shading_language_420pack: enable
  4370. [0005] ////////////////////////////////////////////////////////
  4371. [0006] // Deferred SSAO Upsample - Fragment Shader
  4372. [0007] //
  4373. [0008] // Applies SSAO to channel
  4374. [0009] ////////////////////////////////////////////////////////
  4375. [0010]
  4376. [0011] //---------------------------------------------------------
  4377. [0012]
  4378. [0013] uniform float afFarPlane;
  4379. [0014] uniform float afSizeDiv;
  4380. [0015] uniform float afPower;
  4381. [0016]
  4382. [0017] layout(binding = 0) uniform sampler2D ssaoTexture;
  4383. [0018] layout(binding = 1) uniform sampler2D depthTexture;
  4384. [0019]
  4385. [0020] in vec4 px_vPosition;
  4386. [0021] in vec4 px_vTexCoord0;
  4387. [0022] layout(location = 0) out vec4 out_vColor;
  4388. [0023]
  4389. [0024] void main()
  4390. [0025] {
  4391. [0026] vec4 px_vPosition = gl_FragCoord;
  4392. [0027] bool px_bFrontFacing = gl_FrontFacing;
  4393. [0028] int px_lPrimitiveID = gl_PrimitiveID;
  4394. [0029]
  4395. [0030]
  4396. [0031] //////////////////
  4397. [0032] // Get core depth and AO
  4398. [0033] vec2 vScreenPos = px_vTexCoord0.xy;
  4399. [0034]
  4400. [0035]
  4401. [0036] vec2 vAOPos = vScreenPos;
  4402. [0037]
  4403. [0038] vec4 vAO;
  4404. [0039] vec4 vDepth;
  4405. [0040] vec4 vSample;
  4406. [0041]
  4407. [0042] ////////
  4408. [0043] // sample 4 neightbur pixels
  4409. [0044] vSample = texture(ssaoTexture, vAOPos);
  4410. [0045] vAO.x = vSample.y;
  4411. [0046] vDepth.x = vSample.x;
  4412. [0047]
  4413. [0048] vSample = textureOffset(ssaoTexture, vAOPos, ivec2(0, 1));
  4414. [0049] vAO.y = vSample.y;
  4415. [0050] vDepth.y = vSample.x;
  4416. [0051]
  4417. [0052] vSample = textureOffset(ssaoTexture, vAOPos, ivec2(1, 0));
  4418. [0053] vAO.z = vSample.y;
  4419. [0054] vDepth.z = vSample.x;
  4420. [0055]
  4421. [0056] vSample = textureOffset(ssaoTexture, vAOPos, ivec2(1, 1));
  4422. [0057] vAO.w = vSample.y;
  4423. [0058] vDepth.w = vSample.x;
  4424. [0059]
  4425. [0060] float fCoreDepth = texture(depthTexture, vScreenPos).x;
  4426. [0061]
  4427. [0062] /////////
  4428. [0063] // Calculate upscale weight
  4429. [0064] vec4 vWeight;
  4430. [0065]
  4431. [0066] ////////
  4432. [0067] // Weight from bilinear filter
  4433. [0068] vec2 vBilinearWeight = fract((vec2(1.0) + px_vPosition.xy) * afSizeDiv);
  4434. [0069] vWeight.w = vBilinearWeight.x * vBilinearWeight.y;
  4435. [0070] vWeight.z = vBilinearWeight.x * (1.0 - vBilinearWeight.y);
  4436. [0071] vWeight.y = (1.0 - vBilinearWeight.x) * vBilinearWeight.y;
  4437. [0072] vWeight.x = (1.0 - vBilinearWeight.x) * (1.0 - vBilinearWeight.y);
  4438. [0073]
  4439. [0074] //////////
  4440. [0075] // Weight from depth, pick the pixel with the closest depth to the fullsize depth
  4441. [0076] vec4 vDepthWeight = max(vec4(0.05), 0.1 - abs((vDepth - vec4(fCoreDepth)) * afFarPlane)) * 5.0;
  4442. [0077] vWeight = vWeight * vDepthWeight;
  4443. [0078]
  4444. [0079] /////////
  4445. [0080] // Calucalte AO based on weighted depth
  4446. [0081] float fCoreAO = dot(vWeight, vAO) / dot(vec4(1.0), vWeight);
  4447. [0082]
  4448. [0083]
  4449. [0084] /////////
  4450. [0085] // Pack depth
  4451. [0086] vec4 vResult = vec4(pow(fCoreAO, afPower / 2.2));
  4452. [0087]
  4453. [0088] //////////////////
  4454. [0089] // Get new screen color
  4455. ---------------------
  4456. Compile log:
  4457. ---------------------
  4458. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4459.  
  4460. ---------------------
  4461. ERROR: Couldn't create program 'deferred_ssao_upsample_frag.hpsl'
  4462. ERROR: Failed to compile GLSL shader ''!
  4463. Shader code:
  4464. -------------------
  4465. [0001] #version 330
  4466. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4467. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4468. [0004] #extension GL_ARB_shading_language_420pack: enable
  4469. [0005] #extension GL_ARB_draw_instanced : enable
  4470. [0006] /////////////////////////////
  4471. [0007] // Quad vertex shader used by deferred poost effects
  4472. [0008] //////////////////////////
  4473. [0009]
  4474. [0010] in vec4 vtx_vPosition;
  4475. [0011] in vec4 vtx_vTexCoord0;
  4476. [0012] in vec4 vtx_vTexCoord1;
  4477. [0013] out vec4 px_vTexCoord0;
  4478. [0014]
  4479. [0015] void main()
  4480. [0016] {
  4481. [0017] int vtx_lVertexID = gl_VertexID;
  4482. [0018] int vtx_lInstanceID = gl_InstanceID;
  4483. [0019]
  4484. [0020] vec4 px_vPosition = vec4(0);
  4485. [0021]
  4486. [0022]
  4487. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  4488. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  4489. [0025]
  4490. [0026]
  4491. [0027] gl_Position = px_vPosition;
  4492. ---------------------
  4493. Compile log:
  4494. ---------------------
  4495. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4496.  
  4497. ---------------------
  4498. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  4499. ERROR: Failed to compile GLSL shader ''!
  4500. Shader code:
  4501. -------------------
  4502. [0001] #version 330
  4503. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4504. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4505. [0004] #extension GL_ARB_shading_language_420pack: enable
  4506. [0005] ////////////////////////////////////////////////////////
  4507. [0006] // SSAO Temporal - Fragment Shader
  4508. [0007] //
  4509. [0008] // Blend cureent and previous frame together
  4510. [0009] ////////////////////////////////////////////////////////
  4511. [0010]
  4512. [0011] //---------------------------------------------------------
  4513. [0012]
  4514. [0013] uniform float afFarPlane;
  4515. [0014] uniform float afSizeDiv;
  4516. [0015] uniform float afPower;
  4517. [0016]
  4518. [0017] uniform vec2 avScreenSize;
  4519. [0018] uniform mat4 a_mtxTemporalProjection;
  4520. [0019] uniform vec3 avUVToView0;
  4521. [0020] uniform vec3 avUVToView1;
  4522. [0021] uniform mat4 a_mtxTemporalView;
  4523. [0022]
  4524. [0023] uniform float afTemporalBlurAmount;
  4525. [0024]
  4526. [0025]
  4527. [0026] layout(binding = 0) uniform sampler2D ssaoTexture;
  4528. [0027] layout(binding = 1) uniform sampler2D temporalTexture;
  4529. [0028]
  4530. [0029] in vec4 px_vPosition;
  4531. [0030] in vec4 px_vTexCoord0;
  4532. [0031] layout(location = 0) out vec4 out_vColor;
  4533. [0032]
  4534. [0033] void main()
  4535. [0034] {
  4536. [0035] vec4 px_vPosition = gl_FragCoord;
  4537. [0036] bool px_bFrontFacing = gl_FrontFacing;
  4538. [0037] int px_lPrimitiveID = gl_PrimitiveID;
  4539. [0038]
  4540. [0039]
  4541. [0040] //////////////////
  4542. [0041] // Get core depth and AO
  4543. [0042] vec2 vScreenPos = px_vTexCoord0.xy;
  4544. [0043] vec4 vResult = texture(ssaoTexture, vScreenPos.xy);
  4545. [0044] float fCoreDepth = vResult.x;
  4546. [0045]
  4547. [0046] if(fCoreDepth * afFarPlane < 64.0)
  4548. [0047] {
  4549. [0048] /////////////////////////
  4550. [0049] // Convert the current view position to the view position it would represent the last frame and get the screen coords
  4551. [0050] vec3 vPos = vScreenPos.xyy * avUVToView0 + avUVToView1;
  4552. [0051] vPos = vPos * fCoreDepth;
  4553. [0052] vPos = ((a_mtxTemporalView) * (vec4(vPos, 1.0))).xyz;
  4554. [0053]
  4555. [0054] vec4 vTemporalCoords = ((a_mtxTemporalProjection) * (vec4(vPos, 1.0)));
  4556. [0055] vTemporalCoords /= vTemporalCoords.w;
  4557. [0056] vTemporalCoords.xy = (vTemporalCoords.xy * vec2(0.5, 0.5) + vec2(0.5, 0.5));
  4558. [0057]
  4559. [0058] //////////////
  4560. [0059] // Get the AO from the last frame
  4561. [0060] vec4 vLastFrameAO = texture(temporalTexture, vTemporalCoords.xy);
  4562. [0061] vec4 vLinearFrameAO = texture(temporalTexture, vScreenPos.xy);
  4563. [0062]
  4564. [0063] vec3 vTemporalPos = vTemporalCoords.xyy * avUVToView0 + avUVToView1;
  4565. [0064] vTemporalPos = vTemporalPos * vLastFrameAO.x;
  4566. [0065]
  4567. [0066] if(isnan(vLastFrameAO.y)) vLastFrameAO.y = vResult.y;
  4568. [0067] if(isnan(vLinearFrameAO.y)) vLinearFrameAO.y = vResult.y;
  4569. [0068]
  4570. [0069] ///////////
  4571. [0070] // Check for linear projected AO, that is AO from an object that has been moving along with the camera
  4572. [0071] float fLinearWeight = abs(fCoreDepth - vLinearFrameAO.x) * afFarPlane;
  4573. [0072] vLastFrameAO.y = mix(vLinearFrameAO.y, vLastFrameAO.y, min(1.0, (fLinearWeight + 2.0 / 60.0) + max(0, (fCoreDepth * afFarPlane-0.4)*2)));
  4574. [0073]
  4575. [0074] ///////
  4576. [0075] // Get weight based on distance to last frame position
  4577. [0076] float fWeight = distance(vTemporalPos, vPos) * 9;
  4578. [0077] fWeight += abs(vLastFrameAO.y - vResult.y) * 3.5;
  4579. [0078] /*
  4580. [0079] /////////////
  4581. [0080] // Fade slower closer to the edge of the screen
  4582. [0081] vec2 vDist = 1.0 / (1.0 - abs(0.9 - vScreenPos * 1.8));
  4583. [0082] float fScreenFalloff = min(1.0, (1.0 / (vDist.x + vDist.y)));
  4584. [0083] fWeight *= fScreenFalloff;
  4585. [0084] */
  4586. [0085] ////////////////
  4587. [0086] // Clamp to make sure atleast 1 / 60th of a frame is blended
  4588. [0087] fWeight = clamp(fWeight, afTemporalBlurAmount, 1.0);
  4589. [0088]
  4590. [0089] vResult.y = mix(vLastFrameAO.y, vResult.y, fWeight);
  4591. [0090] }
  4592. [0091]
  4593. [0092] //////////////////
  4594. [0093] // Get new screen color
  4595. [0094] out_vColor.xyzw = vec4(vResult.xy, 0, 0);
  4596. [0095] }
  4597. ---------------------
  4598. Compile log:
  4599. ---------------------
  4600. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4601.  
  4602. ---------------------
  4603. ERROR: Couldn't create program 'deferred_ssao_temporal_frag.hpsl'
  4604. ERROR: Failed to compile GLSL shader ''!
  4605. Shader code:
  4606. -------------------
  4607. [0001] #version 330
  4608. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4609. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4610. [0004] #extension GL_ARB_shading_language_420pack: enable
  4611. [0005] #extension GL_ARB_draw_instanced : enable
  4612. [0006] /////////////////////////////
  4613. [0007] // Quad vertex shader used by deferred poost effects
  4614. [0008] //////////////////////////
  4615. [0009]
  4616. [0010] in vec4 vtx_vPosition;
  4617. [0011] in vec4 vtx_vTexCoord0;
  4618. [0012] in vec4 vtx_vTexCoord1;
  4619. [0013] out vec4 px_vTexCoord0;
  4620. [0014]
  4621. [0015] void main()
  4622. [0016] {
  4623. [0017] int vtx_lVertexID = gl_VertexID;
  4624. [0018] int vtx_lInstanceID = gl_InstanceID;
  4625. [0019]
  4626. [0020] vec4 px_vPosition = vec4(0);
  4627. [0021]
  4628. [0022]
  4629. [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
  4630. [0024] px_vTexCoord0 = vtx_vTexCoord0;
  4631. [0025]
  4632. [0026]
  4633. [0027] gl_Position = px_vPosition;
  4634. ---------------------
  4635. Compile log:
  4636. ---------------------
  4637. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4638.  
  4639. ---------------------
  4640. ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
  4641. ERROR: Failed to compile GLSL shader ''!
  4642. Shader code:
  4643. -------------------
  4644. [0001] #version 330
  4645. [0002] #extension GL_ARB_explicit_attrib_location : enable
  4646. [0003] #extension GL_ARB_uniform_buffer_object : enable
  4647. [0004] #extension GL_ARB_shading_language_420pack: enable
  4648. [0005] uniform vec3 avUVToView0;
  4649. [0006] uniform vec3 avUVToView1;
  4650. [0007]
  4651. [0008] uniform float afT;
  4652. [0009] uniform float afStepSizeMax;
  4653. [0010] uniform float afFarPlane;
  4654. [0011]
  4655. [0012] uniform float afRadius;
  4656. [0013] uniform float afScreenSizeDiv;
  4657. [0014] uniform float afLodScale;
  4658. [0015]
  4659. [0016] layout(binding = 0) uniform sampler2D depthNMap;
  4660. [0017] layout(binding = 1) uniform sampler2D depthMipMap;
  4661. [0018]
  4662. [0019] //---------------------------------------------
  4663. [0020]
  4664. [0021] vec3 GetViewPosition(in vec2 avUV, in float afLod)
  4665. [0022] {
  4666. [0023] float fLinearDepth = textureLod(depthMipMap, avUV, afLod).r;
  4667. [0024]
  4668. [0025] //////////////////
  4669. [0026] // Transform uv coords to near plane direction and then move in that direction for the length LinearDepth
  4670. [0027] vec3 vDirection = avUV.xyy * avUVToView0 + avUVToView1;
  4671. [0028] return vDirection * fLinearDepth;
  4672. [0029] }
  4673. [0030]
  4674. [0031] //--------------------------------------------
  4675. [0032]
  4676. [0033] in vec4 px_vPosition;
  4677. [0034] in vec4 px_vTexCoord0;
  4678. [0035] layout(location = 0) out vec4 out_vColor;
  4679. [0036]
  4680. [0037] void main()
  4681. [0038] {
  4682. [0039] vec4 px_vPosition = gl_FragCoord;
  4683. [0040] bool px_bFrontFacing = gl_FrontFacing;
  4684. [0041] int px_lPrimitiveID = gl_PrimitiveID;
  4685. [0042]
  4686. [0043]
  4687. [0044] const float fPi = 3.14159265;
  4688. [0045] const float fDirectionStep = fPi / ((1.0 + sqrt(5.0)) / 2.0);
  4689. [0046]
  4690. [0047] float fNegInvRadius = -1.0 / (afRadius);
  4691. [0048] float fAO = 0.0;
  4692. [0049] float fTotalWeight = 0.0;
  4693. [0050]
  4694. [0051] ///////////////
  4695. [0052] // Get the depth to compute AO for
  4696. [0053]
  4697. [0054] vec4 vCore0 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(0,0));
  4698. [0055] vec4 vCore1 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(1,0));
  4699. [0056] vec4 vCore2 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(0,1));
  4700. [0057] vec4 vCore3 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(1,1));
  4701. [0058] vec4 vCore;
  4702. [0059]
  4703. [0060]
  4704. [0061] vec4 vDepth;
  4705. [0062] vDepth.x = vCore0.w;
  4706. [0063] vDepth.y = vCore1.w;
  4707. [0064] vDepth.z = vCore2.w;
  4708. [0065] vDepth.w = vCore3.w;
  4709. [0066]
  4710. [0067] vCore.w = max(vCore0.w,
  4711. [0068] max(vCore1.w,
  4712. [0069] max(vCore2.w,
  4713. [0070] vCore3.w)));
  4714. [0071]
  4715. [0072] vDepth = 1.0 / (abs(vDepth - vec4(vCore.w)) + 0.00000001);
  4716. [0073]
  4717. [0074] vCore.xyz = normalize(vCore0.xyz * vDepth.x + vCore1.xyz * vDepth.y + vCore2.xyz * vDepth.z + vCore3.xyz * vDepth.w);
  4718. [0075] vec2 vUVOffset = vCore0.xy;
  4719. [0076]
  4720. [0077]
  4721. [0078] float fLinearDepth = vCore.w;
  4722. [0079] vec3 vDirection = px_vTexCoord0.xyy * avUVToView0 + avUVToView1;
  4723. [0080] vec3 vPos = vDirection * fLinearDepth;
  4724. [0081] vec3 vNormal;
  4725. [0082] vNormal.xyz = vCore.xyz;
  4726. [0083]
  4727. [0084] ///////////////
  4728. [0085] // Get random rotation
  4729. [0086] float fRand = fract(sin(dot(px_vPosition.xy,vec2(12.9898,78.233))) * 437.5453);
  4730. [0087] float fRandRot = fRand * 2.0 * fPi + afT * 0.5;
  4731. [0088] vec2 vUV0 = vec2(cos(fRandRot), sin(fRandRot));
  4732. [0089] vec2 vRand = vec2(cos(fDirectionStep), sin(fDirectionStep));
  4733. [0090] mat2 mtxRot = mat2(vRand.x,-vRand.y,vRand.y,vRand.x);
  4734. [0091]
  4735. [0092] ////////////
  4736. [0093] // Move the position away from the normal a little bit
  4737. [0094] float fFade = clamp(2.0 - fLinearDepth * afFarPlane / 32.0, 0.0, 1.0);
  4738. [0095]
  4739. [0096] float fNormalOffset = max(0.0, fLinearDepth * afFarPlane - 16.0) * 0.025;
  4740. [0097] vPos += vNormal * (0.03 + (1.0 - vNormal.z) * fNormalOffset);
  4741. [0098]
  4742. [0099] float fStepSize = abs(afStepSizeMax * afRadius / vPos.z);
  4743. [0100] float fStepSizePart = (0.5 * fStepSize / ((2 + (16) * (16))));
  4744. [0101] vec2 vUV = px_vTexCoord0.xy + vUVOffset.xy * fStepSize * 0.25;
  4745. [0102]
  4746. [0103] if(fFade <= 0.0)
  4747. [0104] {
  4748. [0105] fAO = 1.0;
  4749. [0106] }
  4750. [0107] else
  4751. [0108] {
  4752. [0109] vec3 vAO = vec3(0.0);
  4753. [0110]
  4754. [0111] for(float d = 0.0; d < 16; d+=4.0)
  4755. [0112] {
  4756. [0113] //////////////
  4757. [0114] // Get two random direction to sample in
  4758. [0115] vec4 vOffset = (d + vec4(2, 3, 4, 5));
  4759. [0116] vOffset *= vOffset * fStepSizePart;
  4760. [0117]
  4761. [0118] vec2 vUV1 = ((mtxRot) * (vUV0));
  4762. [0119] vUV0 = ((mtxRot) * (vUV1));
  4763. [0120]
  4764. [0121] vec4 vLod = log2(vOffset * afLodScale+1.0);
  4765. [0122]
  4766. [0123] vec3 vDelta0 = GetViewPosition(vUV + vUV1 * vOffset.x, vLod.x) - vPos;
  4767. [0124] vec3 vDelta1 = GetViewPosition(vUV - vUV1 * vOffset.y, vLod.y) - vPos;
  4768. [0125] vec3 vDelta2 = GetViewPosition(vUV + vUV0 * vOffset.z, vLod.z) - vPos;
  4769. [0126] vec3 vDelta3 = GetViewPosition(vUV - vUV0 * vOffset.w, vLod.w) - vPos;
  4770. [0127]
  4771. [0128] vec4 vDistanceSqr = vec4(dot(vDelta0, vDelta0),
  4772. [0129] dot(vDelta1, vDelta1),
  4773. [0130] dot(vDelta2, vDelta2),
  4774. [0131] dot(vDelta3, vDelta3));
  4775. [0132]
  4776. [0133] vec4 vInvertedLength = inversesqrt(vDistanceSqr);
  4777. [0134]
  4778. [0135] vec4 vFalloff = vec4(1.0) + vDistanceSqr * vInvertedLength * fNegInvRadius;
  4779. [0136]
  4780. [0137] ////////////////////
  4781. [0138] // Get AO for xyz direction based on distance from sample and sum
  4782. [0139] vec4 vSampleAO = max(vec4(0.0), vFalloff) * vInvertedLength;
  4783. [0140]
  4784. [0141] vDelta0 *= vSampleAO.x;
  4785. [0142] vDelta1 *= vSampleAO.y;
  4786. [0143] vDelta2 *= vSampleAO.z;
  4787. [0144] vDelta3 *= vSampleAO.w;
  4788. [0145]
  4789. [0146] vAO.xyz += vDelta0 + vDelta1 + vDelta2 + vDelta3;
  4790. [0147]
  4791. [0148] }
  4792. [0149] fAO = 1.0 - max(0.0, dot(vNormal, vAO * 0.1988 * (4.0 / (16))));
  4793. [0150]
  4794. [0151] fAO = mix(1.0, fAO, fFade);
  4795. [0152] }
  4796. [0153]
  4797. ---------------------
  4798. Compile log:
  4799. ---------------------
  4800. 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  4801.  
  4802. ---------------------
  4803. ERROR: Couldn't create program 'deferred_ssao_render_frag.hpsl'
Advertisement
Add Comment
Please, Sign In to add comment