Advertisement
illwieckz

material glsl error, llvmpipe, 32093f42c

Apr 29th, 2024
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.11 KB | None | 0 0
  1. Warn: Source for shader program genericMaterial:
  2. 0: #version 450 core
  3. 1: #define HAVE_ARB_texture_gather 1
  4. 2: #define HAVE_EXT_gpu_shader4 1
  5. 3: #define HAVE_ARB_gpu_shader5 1
  6. 4: #define HAVE_ARB_uniform_buffer_object 1
  7. 5: #extension GL_ARB_shader_draw_parameters : require
  8. 6: #define HAVE_ARB_shader_draw_parameters 1
  9. 7: #define HAVE_ARB_shader_storage_buffer_object 1
  10. 8: #extension GL_ARB_gpu_shader_int64 : require
  11. 9: #define HAVE_ARB_gpu_shader_int64 1
  12. 10: #define IN(mode) mode in
  13. 11: #define DECLARE_OUTPUT(type) out type outputColor;
  14. 12: #define textureCube texture
  15. 13: #define texture2D texture
  16. 14: #define texture2DProj textureProj
  17. 15: #define texture3D texture
  18. 16: IN(flat) int in_drawID;
  19. 17: IN(flat) int in_baseInstance;
  20. 18: #ifndef r_dynamicLight
  21. 19: #define r_dynamicLight 1
  22. 20: #endif
  23. 21: #ifndef r_precomputedLighting
  24. 22: #define r_precomputedLighting 1
  25. 23: #endif
  26. 24: #ifndef r_vertexSkinning
  27. 25: #define r_vertexSkinning 1
  28. 26: #endif
  29. 27: const int MAX_GLSL_BONES = 256;
  30. 28: #ifndef r_halfLambertLighting
  31. 29: #define r_halfLambertLighting 1
  32. 30: #endif
  33. 31: #ifndef r_rimLighting
  34. 32: #define r_rimLighting 1
  35. 33: #endif
  36. 34: const float r_RimExponent = 3.00000000e+00;
  37. 35: #ifndef r_normalMapping
  38. 36: #define r_normalMapping 1
  39. 37: #endif
  40. 38: #ifndef r_liquidMapping
  41. 39: #define r_liquidMapping 1
  42. 40: #endif
  43. 41: #ifndef r_specularMapping
  44. 42: #define r_specularMapping 1
  45. 43: #endif
  46. 44: #ifndef r_physicalMapping
  47. 45: #define r_physicalMapping 1
  48. 46: #endif
  49. 47: #ifndef r_glowMapping
  50. 48: #define r_glowMapping 1
  51. 49: #endif
  52. 50:
  53. 51: struct DrawcallState {
  54. 52: mat4 u_TextureMatrix;
  55. 53: vec4 u_ColorModulate;
  56. 54: vec4 u_Color;
  57. 55: uvec2 u_ColorMap;
  58. 56: uvec2 u_DepthMap;
  59. 57: float u_AlphaThreshold;
  60. 58: float u_InverseLightFactor;
  61. 59: float u_VertexInterpolation;
  62. 60: float u_DepthScale;
  63. 61: float u_Time;
  64. 62: int drawcallState_padding0;
  65. 63: };
  66. 64:
  67. 65: layout(std430, binding = 0) readonly buffer drawcallStateSSBO {
  68. 66: DrawcallState drawcallStates[];
  69. 67: };
  70. 68:
  71. 69: #define drawID in_drawID
  72. 70: #define baseInstance in_baseInstance
  73. 71:
  74. 72: #define u_TextureMatrix drawcallStates[baseInstance].u_TextureMatrix
  75. 73: #define u_ColorModulate drawcallStates[baseInstance].u_ColorModulate
  76. 74: #define u_Color drawcallStates[baseInstance].u_Color
  77. 75: #define u_ColorMap_initial uvec2( drawcallStates[baseInstance].u_ColorMap )
  78. 76: #define u_DepthMap_initial uvec2( drawcallStates[baseInstance].u_DepthMap )
  79. 77: #define u_AlphaThreshold drawcallStates[baseInstance].u_AlphaThreshold
  80. 78: #define u_InverseLightFactor drawcallStates[baseInstance].u_InverseLightFactor
  81. 79: #define u_VertexInterpolation drawcallStates[baseInstance].u_VertexInterpolation
  82. 80: #define u_DepthScale drawcallStates[baseInstance].u_DepthScale
  83. 81: #define u_Time drawcallStates[baseInstance].u_Time
  84. 82:
  85. 83: uniform vec3 u_ViewOrigin;
  86. 84: uniform vec3 u_ViewUp;
  87. 85: uniform mat4 u_ModelMatrix;
  88. 86: uniform mat4 u_ModelViewProjectionMatrix;
  89. 87:
  90. 88: #ifndef TEXTURE_RG
  91. 89: #define TEXTURE_RG 1
  92. 90: #endif
  93. 91: #ifndef UNIFORM_BUFFER_OBJECT
  94. 92: #define UNIFORM_BUFFER_OBJECT 1
  95. 93: #endif
  96. 94: #ifndef TEXTURE_INTEGER
  97. 95: #define TEXTURE_INTEGER 1
  98. 96: #endif
  99. 97: #ifndef r_AmbientScale
  100. 98: #define r_AmbientScale 1.00000000e+00
  101. 99: #endif
  102. 100: #ifndef r_SpecularScale
  103. 101: #define r_SpecularScale 1.00000000e+00
  104. 102: #endif
  105. 103: #ifndef r_zNear
  106. 104: #define r_zNear 3.00000000e+00
  107. 105: #endif
  108. 106: #ifndef M_PI
  109. 107: #define M_PI 3.14159274e+00
  110. 108: #endif
  111. 109: #ifndef MAX_SHADOWMAPS
  112. 110: #define MAX_SHADOWMAPS 5
  113. 111: #endif
  114. 112: #ifndef MAX_REF_LIGHTS
  115. 113: #define MAX_REF_LIGHTS 1024
  116. 114: #endif
  117. 115: #ifndef TILE_SIZE
  118. 116: #define TILE_SIZE 16
  119. 117: #endif
  120. 118: #ifndef r_FBufSize
  121. 119: #define r_FBufSize vec2(1.92000000e+03, 1.08000000e+03)
  122. 120: #endif
  123. 121: #ifndef r_tileStep
  124. 122: #define r_tileStep vec2(8.33333377e-03, 1.48148146e-02)
  125. 123: #endif
  126. 124: /*
  127. 125: ===========================================================================
  128. 126: Copyright (C) 2006-2011 Robert Beckebans <trebor_7@users.sourceforge.net>
  129. 127:
  130. 128: This file is part of XreaL source code.
  131. 129:
  132. 130: XreaL source code is free software; you can redistribute it
  133. 131: and/or modify it under the terms of the GNU General Public License as
  134. 132: published by the Free Software Foundation; either version 2 of the License,
  135. 133: or (at your option) any later version.
  136. 134:
  137. 135: XreaL source code is distributed in the hope that it will be
  138. 136: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  139. 137: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  140. 138: GNU General Public License for more details.
  141. 139:
  142. 140: You should have received a copy of the GNU General Public License
  143. 141: along with XreaL source code; if not, write to the Free Software
  144. 142: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  145. 143: ===========================================================================
  146. 144: */
  147. 145:
  148. 146: /* generic_fp.glsl */
  149. 147:
  150. 148:
  151. 149: #if !defined(GENERIC_2D)
  152. 150: #endif
  153. 151:
  154. 152: IN(smooth) vec2 var_TexCoords;
  155. 153: IN(smooth) vec4 var_Color;
  156. 154:
  157. 155: #if defined(USE_DEPTH_FADE) || defined(USE_VERTEX_SPRITE)
  158. 156: IN(smooth) vec2 var_FadeDepth;
  159. 157: #endif
  160. 158:
  161. 159: DECLARE_OUTPUT(vec4)
  162. 160:
  163. 161: void main()
  164. 162: {
  165. 163: sampler2D u_ColorMap = sampler2D(u_ColorMap_initial);
  166. 164: vec4 color = texture2D(u_ColorMap, var_TexCoords);
  167. 165:
  168. 166: #if defined(USE_ALPHA_TESTING)
  169. 167: if( abs(color.a + u_AlphaThreshold) <= 1.0 )
  170. 168: {
  171. 169: discard;
  172. 170: return;
  173. 171: }
  174. 172: #endif
  175. 173:
  176. 174: #if defined(USE_DEPTH_FADE) || defined(USE_VERTEX_SPRITE)
  177. 175: sampler2D u_DepthMap = sampler2D(u_DepthMap_initial);
  178. 176: float depth = texture2D(u_DepthMap, gl_FragCoord.xy / r_FBufSize).x;
  179. 177: float fadeDepth = 0.5 * var_FadeDepth.x / var_FadeDepth.y + 0.5;
  180. 178: color.a *= smoothstep(gl_FragCoord.z, fadeDepth, depth);
  181. 179: #endif
  182. 180:
  183. 181: color *= var_Color;
  184. 182:
  185. 183: #if !defined(GENERIC_2D) && !defined(USE_DEPTH_FADE)
  186. 184: color.rgb *= u_InverseLightFactor;
  187. 185: #endif
  188. 186:
  189. 187: outputColor = color;
  190. 188:
  191. 189: #if defined(GENERIC_2D)
  192. 190: gl_FragDepth = 0;
  193. 191: #endif
  194. 192:
  195. 193: // Debugging.
  196. 194: #if defined(r_showVertexColors) && !defined(GENERIC_2D)
  197. 195: outputColor = vec4(0.0, 0.0, 0.0, 0.0);
  198. 196: #endif
  199. 197: }
  200.  
  201. Warn: Compile log:
  202. 0:164(1): error: image/sampler variables may only be declared as function parameters or uniform-qualified global variables
  203. 0:164(1): error: opaque variables must be declared uniform
  204. 0:164(24): error: cannot initialize u_ColorMap variable opaque
  205. 0:164(24): error: cannot construct opaque type `sampler2D'
  206. 0:165(23): warning: `u_ColorMap' used uninitialized
  207.  
  208. Warn: Unhandled exception (15ShaderException): Couldn't compile fragment shader: genericMaterial
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement