Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- E/BLITZ: [2019-11-20 17:47:09.196] [gapi] [error] fragment-program compilation failed (terrain_pbr.fp):
- [2019-11-20 17:47:09.196] [gapi] [error] | 1 | #version 300 es
- [2019-11-20 17:47:09.196] [gapi] [error] | 2 | precision highp float;
- [2019-11-20 17:47:09.196] [gapi] [error] | 3 | precision mediump sampler2DArray;
- [2019-11-20 17:47:09.196] [gapi] [error] | 4 | precision mediump sampler2DShadow;
- [2019-11-20 17:47:09.196] [gapi] [error] | 5 | vec3 matrix_row0(mat3 m, int i) { return vec3( m[0][i], m[1][i], m[2][i] ); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 6 | vec4 matrix_row0(mat4 m, int i) { return vec4( m[0][i], m[1][i], m[2][i], m[3][i] ); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 7 | vec2 m_scalar_swizzle20(float x) { return vec2(x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 8 | ivec2 m_scalar_swizzle20(int x) { return ivec2(x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 9 | vec3 m_scalar_swizzle30(float x) { return vec3(x, x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 10 | ivec3 m_scalar_swizzle30(int x) { return ivec3(x, x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 11 | vec4 m_scalar_swizzle40(float x) { return vec4(x, x, x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 12 | ivec4 m_scalar_swizzle40(int x) { return ivec4(x, x, x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 13 | uvec2 m_scalar_swizzle20(uint x) { return uvec2(x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 14 | uvec3 m_scalar_swizzle30(uint x) { return uvec3(x, x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 15 | uvec4 m_scalar_swizzle40(uint x) { return uvec4(x, x, x, x); }
- [2019-11-20 17:47:09.196] [gapi] [error] | 16 | vec2 bvecTernary0(bvec2 cond, vec2 trueExpr, vec2 falseExpr) { vec2 ret; ret.x = cond.x ? trueExpr.x : falseExpr.x; ret.y = cond.y ? trueExpr.y : falseExpr.y; return ret; }
- [2019-11-20 17:47:09.196] [gapi] [error] | 17 | vec3 bvecTernary0(bvec3 cond, vec3 trueExpr, vec3 falseExpr) { vec3 ret; ret.x = cond.x ? trueExpr.x : falseExpr.x; ret.y = cond.y ? trueExpr.y : falseExpr.y; ret.z = cond.z ? trueExpr.z : falseExpr.z; return ret; }
- [2019-11-20 17:47:09.196] [gapi] [error] | 18 | vec4 bvecTernary0(bvec4 cond, vec4 trueExpr, vec4 falseExpr) { vec4 ret; ret.x = cond.x ? trueExpr.x : falseExpr.x; ret.y = cond.y ? trueExpr.y : falseExpr.y; ret.z = cond.z ? trueExpr.z : falseExpr.z; ret.w = cond.w ? trueExpr.w : falseExpr.w; return ret; }
- [2019-11-20 17:47:09.196] [gapi] [error] | 19 | in highp vec4 frag_TEXCOORD0;
- [2019-11-20 17:47:09.196] [gapi] [error] | 20 | in highp vec3 frag_TEXCOORD1;
- [2019-11-20 17:47:09.196] [gapi] [error] | 21 | in highp vec4 frag_TEXCOORD2;
- [2019-11-20 17:47:09.196] [gapi] [error] | 22 | layout (location = 0) out mediump vec4 rast_FragData0;
- [2019-11-20 17:47:09.196] [gapi] [error] | 23 | layout (location = 1) out highp vec4 rast_FragData1;
- [2019-11-20 17:47:09.196] [gapi] [error] | 24 | layout (location = 2) out mediump vec4 rast_FragData2;
- [2019-11-20 17:47:09.196] [gapi] [error] | 25 | layout (location = 3) out highp vec4 rast_FragData3;
- [2019-11-20 17:47:09.196] [gapi] [error] | 26 | layout (location = 4) out mediump vec4 rast_FragData4;
- [2019-11-20 17:47:09.196] [gapi] [error] | 27 | highp vec2 unpack_normal(highp vec2 normal) {
- [2019-11-20 17:47:09.196] [gapi] [error] | 28 | return ((normal * vec2 (2.000000)) - vec2 (1.000000));
- [2019-11-20 17:47:09.196] [gapi] [error] | 29 | }
- [2019-11-20 17:47:09.196] [gapi] [error] | 30 | highp vec3 pack_normal(highp vec3 normal) {
- [2019-11-20 17:47:09.196] [gapi] [error] | 31 | return ((normal * vec3 (0.500000)) + vec3 (0.500000));
- [2019-11-20 17:47:09.196] [gapi] [error] | 32 | }
- [2019-11-20 17:47:09.196] [gapi] [error] | 33 | highp vec3 get_tbn_normal(highp vec2 normal_unpacked) {
- [2019-11-20 17:47:09.196] [gapi] [error] | 34 | highp vec3 tbn_normal = vec3(normal_unpacked, sqrt((1.000000 - clamp(dot(normal_unpacked, normal_unpacked), 0.0, 1.0))));
- E/BLITZ: [2019-11-20 17:47:09.197] [gapi] [error] | 35 | return normalize(tbn_normal);
- [2019-11-20 17:47:09.197] [gapi] [error] | 36 | }
- [2019-11-20 17:47:09.197] [gapi] [error] | 37 | highp vec3 restore_tbn(highp vec2 normal) {
- [2019-11-20 17:47:09.197] [gapi] [error] | 38 | highp vec2 normal_unpacked = unpack_normal(normal);
- [2019-11-20 17:47:09.197] [gapi] [error] | 39 | return get_tbn_normal(normal_unpacked);
- [2019-11-20 17:47:09.197] [gapi] [error] | 40 | }
- [2019-11-20 17:47:09.197] [gapi] [error] | 41 | struct SphericalHarmonicsHalfp {
- [2019-11-20 17:47:09.197] [gapi] [error] | 42 | mediump vec3 sh[9];
- [2019-11-20 17:47:09.197] [gapi] [error] | 43 | };
- [2019-11-20 17:47:09.197] [gapi] [error] | 44 | void unpack_harmonics_from_float4_array(highp vec4 sh_in[7], inout SphericalHarmonicsHalfp sh) {
- [2019-11-20 17:47:09.197] [gapi] [error] | 45 | ((sh).sh[0] = vec3((sh_in[0]).xyz));
- [2019-11-20 17:47:09.197] [gapi] [error] | 46 | ((sh).sh[1] = vec3(float((sh_in[0]).w), vec2((sh_in[1]).xy)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 47 | ((sh).sh[2] = vec3(vec2((sh_in[1]).zw), float((sh_in[2]).x)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 48 | ((sh).sh[3] = vec3((sh_in[2]).yzw));
- [2019-11-20 17:47:09.197] [gapi] [error] | 49 | ((sh).sh[4] = vec3((sh_in[3]).xyz));
- [2019-11-20 17:47:09.197] [gapi] [error] | 50 | ((sh).sh[5] = vec3(float((sh_in[3]).w), vec2((sh_in[4]).xy)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 51 | ((sh).sh[6] = vec3(vec2((sh_in[4]).zw), float((sh_in[5]).x)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 52 | ((sh).sh[7] = vec3((sh_in[5]).yzw));
- [2019-11-20 17:47:09.197] [gapi] [error] | 53 | ((sh).sh[8] = vec3((sh_in[6]).xyz));
- [2019-11-20 17:47:09.197] [gapi] [error] | 54 | }
- [2019-11-20 17:47:09.197] [gapi] [error] | 55 | mediump vec3 apply_premul_spherical_harmonics(in SphericalHarmonicsHalfp sh, mediump vec3 direction) {
- [2019-11-20 17:47:09.197] [gapi] [error] | 56 | mediump vec3 result = ((sh).sh[0]).xyz;
- [2019-11-20 17:47:09.197] [gapi] [error] | 57 | (result += (((sh).sh[1]).xyz * vec3 ((direction).y)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 58 | (result += (((sh).sh[2]).xyz * vec3 ((direction).z)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 59 | (result += (((sh).sh[3]).xyz * vec3 ((direction).x)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 60 | (result += (((sh).sh[4]).xyz * vec3 (((direction).x * (direction).y))));
- [2019-11-20 17:47:09.197] [gapi] [error] | 61 | (result += (((sh).sh[5]).xyz * vec3 (((direction).y * (direction).z))));
- [2019-11-20 17:47:09.197] [gapi] [error] | 62 | mediump vec3 sq_direction = (direction * direction);
- [2019-11-20 17:47:09.197] [gapi] [error] | 63 | (result += (((sh).sh[6]).xyz * vec3 (((3.000000 * (sq_direction).z) - 1.000000))));
- [2019-11-20 17:47:09.197] [gapi] [error] | 64 | (result += (((sh).sh[7]).xyz * vec3 (((direction).x * (direction).z))));
- [2019-11-20 17:47:09.197] [gapi] [error] | 65 | (result += (((sh).sh[8]).xyz * vec3 (((sq_direction).x - (sq_direction).y))));
- [2019-11-20 17:47:09.197] [gapi] [error] | 66 | return result;
- [2019-11-20 17:47:09.197] [gapi] [error] | 67 | }
- [2019-11-20 17:47:09.197] [gapi] [error] | 68 | mediump vec3 compute_sky_lighting(highp vec3 world_space_normal, in SphericalHarmonicsHalfp sh) {
- [2019-11-20 17:47:09.197] [gapi] [error] | 69 | highp vec3 diffuse_direction = world_space_normal;
- [2019-11-20 17:47:09.197] [gapi] [error] | 70 | mediump vec3 environment_diffuse = max(vec3 (0.000000), apply_premul_spherical_harmonics(sh, vec3(diffuse_direction)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 71 | return environment_diffuse;
- [2019-11-20 17:47:09.197] [gapi] [error] | 72 | }
- [2019-11-20 17:47:09.197] [gapi] [error] | 73 | uniform mediump sampler2DArray base_color_map /* min = linear, mag = linear, mip = linear, addr = clamp, max_anisotropy = 4, halfp, */ ;
- [2019-11-20 17:47:09.197] [gapi] [error] | 74 | uniform mediump sampler2DArray normal_map /* min = linear, mag = linear, mip = linear, addr = clamp, max_anisotropy = 4, halfp, */ ;
- [2019-11-20 17:47:09.197] [gapi] [error] | 75 | uniform highp sampler2D heightfield_tangent_map /* min = linear, mag = linear, mip = linear, addr = clamp, */ ;
- [2019-11-20 17:47:09.197] [gapi] [error] | 76 | layout(std140) uniform fp_probes { /* dynamic, */
- [2019-11-20 17:47:09.197] [gapi] [error] | 77 | vec4 fp_global_diffuse_probe_sh[7];
- [2019-11-20 17:47:09.197] [gapi] [error] | 78 | float fp_global_cubemap_last_mip;
- [2019-11-20 17:47:09.197] [gapi] [error] | 79 | float fp_global_cubemap_size;
- [2019-11-20 17:47:09.197] [gapi] [error] | 80 | float fp_dfg_size;
- [2019-11-20 17:47:09.197] [gapi] [error] | 81 | };
- [2019-11-20 17:47:09.197] [gapi] [error] | 82 | layout(std140) uniform fp_normal_transform { /* dynamic, */
- [2019-11-20 17:47:09.197] [gapi] [error] | 83 | mat4 fp_inverse_transposed_world_matrix;
- [2019-11-20 17:47:09.197] [gapi] [error] | 84 | };
- [2019-11-20 17:47:09.197] [gapi] [error] | 85 | struct fp_in {
- [2019-11-20 17:47:09.197] [gapi] [error] | 86 | highp vec4 fragment_position;
- [2019-11-20 17:47:09.197] [gapi] [error] | 87 | highp vec4 texcoord;
- [2019-11-20 17:47:09.197] [gapi] [error] | 88 | highp vec3 page0_coords;
- [2019-11-20 17:47:09.197] [gapi] [error] | 89 | highp vec4 page1_coords;
- [2019-11-20 17:47:09.197] [gapi] [error] | 90 | };
- [2019-11-20 17:47:09.197] [gapi] [error] | 91 | struct fp_out {
- [2019-11-20 17:47:09.197] [gapi] [error] | 92 | mediump vec4 base_color_target;
- [2019-11-20 17:47:09.197] [gapi] [error] | 93 | highp vec4 normals_target;
- [2019-11-20 17:47:09.197] [gapi] [error] | 94 | mediump vec4 params_target;
- [2019-11-20 17:47:09.197] [gapi] [error] | 95 | highp vec4 depth_target;
- [2019-11-20 17:47:09.197] [gapi] [error] | 96 | mediump vec4 gi_emissive_target;
- [2019-11-20 17:47:09.197] [gapi] [error] | 97 | };
- [2019-11-20 17:47:09.197] [gapi] [error] | 98 | fp_out fp_main( fp_in input0) {
- [2019-11-20 17:47:09.197] [gapi] [error] | 99 | fp_out output0;
- [2019-11-20 17:47:09.197] [gapi] [error] | 100 | mediump vec4 base_color_sample = texture(base_color_map, ((input0).page0_coords).xyz);
- [2019-11-20 17:47:09.197] [gapi] [error] | 101 | mediump vec4 normal_sample = texture(normal_map, ((input0).page0_coords).xyz);
- [2019-11-20 17:47:09.197] [gapi] [error] | 102 | highp vec3 tangent_space_normal = restore_tbn(vec2((normal_sample).xy));
- [2019-11-20 17:47:09.197] [gapi] [error] | 103 | highp vec2 heightfield_normal_xz = (texture(heightfield_tangent_map, ((input0).texcoord).xy)).xy;
- [2019-11-20 17:47:09.197] [gapi] [error] | 104 | highp vec3 heightfield_normal = (restore_tbn(heightfield_normal_xz)).xzy;
- [2019-11-20 17:47:09.197] [gapi] [error] | 105 | highp vec3 heightfield_tangent = normalize(cross(heightfield_normal, vec3(0.000000, 0.000000, 1.000000)));
- [2019-11-20 17:47:09.197] [gapi] [error] | 106 | highp vec3 heightfield_binormal = cross(heightfield_tangent, heightfield_normal);
- [2019-11-20 17:47:09.197] [gapi] [error] | 107 | (heightfield_normal = (((fp_inverse_transposed_world_matrix)*(vec4(heightfield_normal, 0.000000)))).xyz);
- [2019-11-20 17:47:09.197] [gapi] [error] | 108 | (heightfield_tangent = (((fp_inverse_transposed_world_matrix)*(vec4(heightfield_tangent, 0.000000)))).xyz);
- [2019-11-20 17:47:09.197] [gapi] [error] | 109 | (heightfield_binormal = (-(((fp_inverse_transposed_world_matrix)*(vec4(heightfield_binormal, 0.000000)))).xyz));
- E/BLITZ: [2019-11-20 17:47:09.198] [gapi] [error] | 110 | highp vec3 world_space_normal;
- [2019-11-20 17:47:09.198] [gapi] [error] | 111 | ((world_space_normal).x = dot(tangent_space_normal, vec3((heightfield_tangent).x, (heightfield_binormal).x, (heightfield_normal).x)));
- [2019-11-20 17:47:09.198] [gapi] [error] | 112 | ((world_space_normal).y = dot(tangent_space_normal, vec3((heightfield_tangent).y, (heightfield_binormal).y, (heightfield_normal).y)));
- [2019-11-20 17:47:09.198] [gapi] [error] | 113 | ((world_space_normal).z = dot(tangent_space_normal, vec3((heightfield_tangent).z, (heightfield_binormal).z, (heightfield_normal).z)));
- [2019-11-20 17:47:09.198] [gapi] [error] | 114 | (world_space_normal = normalize(world_space_normal));
- [2019-11-20 17:47:09.198] [gapi] [error] | 115 | highp float flags = 0.000000;
- [2019-11-20 17:47:09.198] [gapi] [error] | 116 | mediump float static_shadow = 1.000000;
- [2019-11-20 17:47:09.198] [gapi] [error] | 117 | mediump float specular = (base_color_sample).w;
- [2019-11-20 17:47:09.198] [gapi] [error] | 118 | mediump float roughness = (normal_sample).z;
- [2019-11-20 17:47:09.198] [gapi] [error] | 119 | mediump float metallicity = 0.000000;
- [2019-11-20 17:47:09.198] [gapi] [error] | 120 | mediump vec3 base_color = (base_color_sample).rgb;
- [2019-11-20 17:47:09.198] [gapi] [error] | 121 | highp vec3 packed_normal = pack_normal(world_space_normal);
- [2019-11-20 17:47:09.198] [gapi] [error] | 122 | ((output0).base_color_target = vec4(base_color, 1.000000));
- [2019-11-20 17:47:09.198] [gapi] [error] | 123 | ((output0).normals_target = vec4(packed_normal, flags));
- [2019-11-20 17:47:09.198] [gapi] [error] | 124 | ((output0).params_target = vec4(roughness, metallicity, specular, static_shadow));
- [2019-11-20 17:47:09.198] [gapi] [error] | 125 | ((output0).depth_target = vec4 (((input0).fragment_position).z));
- [2019-11-20 17:47:09.198] [gapi] [error] | 126 | SphericalHarmonicsHalfp sh;
- [2019-11-20 17:47:09.198] [gapi] [error] | 127 | unpack_harmonics_from_float4_array(fp_global_diffuse_probe_sh, sh);
- [2019-11-20 17:47:09.198] [gapi] [error] | 128 | mediump vec3 sky_indirect_diffuse = compute_sky_lighting(world_space_normal, sh);
- [2019-11-20 17:47:09.198] [gapi] [error] | 129 | (((output0).gi_emissive_target).rgba = vec4(sky_indirect_diffuse, 1.000000));
- [2019-11-20 17:47:09.198] [gapi] [error] | 130 | return output0;
- [2019-11-20 17:47:09.198] [gapi] [error] | 131 | }
- [2019-11-20 17:47:09.198] [gapi] [error] | 132 | void main() {
- [2019-11-20 17:47:09.198] [gapi] [error] | 133 | fp_in input0;
- [2019-11-20 17:47:09.198] [gapi] [error] | 134 | input0.fragment_position = gl_FragCoord;
- [2019-11-20 17:47:09.198] [gapi] [error] | 135 | input0.texcoord = frag_TEXCOORD0;
- [2019-11-20 17:47:09.198] [gapi] [error] | 136 | input0.page0_coords = frag_TEXCOORD1;
- [2019-11-20 17:47:09.198] [gapi] [error] | 137 | input0.page1_coords = frag_TEXCOORD2;
- [2019-11-20 17:47:09.198] [gapi] [error] | 138 | fp_out result = fp_main(input0);
- [2019-11-20 17:47:09.198] [gapi] [error] | 139 | rast_FragData0 = result.base_color_target;
- [2019-11-20 17:47:09.198] [gapi] [error] | 140 | rast_FragData1 = result.normals_target;
- [2019-11-20 17:47:09.198] [gapi] [error] | 141 | rast_FragData2 = result.params_target;
- [2019-11-20 17:47:09.198] [gapi] [error] | 142 | rast_FragData3 = result.depth_target;
- [2019-11-20 17:47:09.198] [gapi] [error] | 143 | rast_FragData4 = result.gi_emissive_target;
- [2019-11-20 17:47:09.198] [gapi] [error] | 144 | }
- [2019-11-20 17:47:09.198] [gapi] [error] message: 0:26: S0059: Invalid layout qualifier ('location = 4', maximum allowed value is 3) for variable 'rast_FragData4'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement