Changes between Initial Version and Version 1 of Ticket #14749, comment 5


Ignore:
Timestamp:
Dec 9, 2018, 6:31:19 PM (6 years ago)
Author:
bullfrog

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14749, comment 5

    initial v1  
    1 That improved the rendering (still no sprite, but the block trail left by mouse movement in the window refreshes nearly immediately.) It still gives the same output.
    2 
    3 ~/src/godot-projects/New Game Project> export MESA_GL_VERSION_OVERRIDE="3.1COMPAT"
    4 
    5 ~/src/godot-projects/New Game Project> export MESA_GLSL_VERSION_OVERRIDE="130"
    6 
    7 ~/src/godot-projects/New Game Project> godot
    8 
    9 GalliumContext: CreateScreen: Using llvmpipe (LLVM 5.0, 128 bits) driver.
    10 
    11 OpenGL ES 3.0 Renderer: Gallium 0.4 on llvmpipe (LLVM 5.0, 128 bits)
    12 
    13 1: #version 330
    14 
    15 2: #define GLES_OVER_GL
    16 
    17 3: #define USE_TEXTURE_RECT
    18 
    19 4: precision highp float;
    20 
    21 5: precision highp int;
    22 
    23 6:
    24 
    25 7:
    26 
    27 8: layout(location=0) in highp vec2 vertex;
    28 
    29 9: layout(location=3) in vec4 color_attrib;
    30 
    31 10:
    32 
    33 11: #ifdef USE_TEXTURE_RECT
    34 
    35 12:
    36 
    37 13: uniform vec4 dst_rect;
    38 
    39 14: uniform vec4 src_rect;
    40 
    41 15:
    42 
    43 16: #else
    44 
    45 17:
    46 
    47 18: #ifdef USE_INSTANCING
    48 
    49 19:
    50 
    51 20: layout(location=8) in highp vec4 instance_xform0;
    52 
    53 21: layout(location=9) in highp vec4 instance_xform1;
    54 
    55 22: layout(location=10) in highp vec4 instance_xform2;
    56 
    57 23: layout(location=11) in lowp vec4 instance_color;
    58 
    59 24:
    60 
    61 25: #ifdef USE_INSTANCE_CUSTOM
    62 
    63 26: layout(location=12) in highp vec4 instance_custom_data;
    64 
    65 27: #endif
    66 
    67 28:
    68 
    69 29: #endif
    70 
    71 30:
    72 
    73 31: layout(location=4) in highp vec2 uv_attrib;
    74 
    75 32:
    76 
    77 33: //skeletn
    78 
    79 34: #endif
    80 
    81 35:
    82 
    83 36: uniform highp vec2 color_texpixel_size;
    84 
    85 37:
    86 
    87 38:
    88 
    89 39: layout(std140) uniform CanvasItemData { //ubo:0
    90 
    91 40:
    92 
    93 41:     highp mat4 projection_matrix;
    94 
    95 42:     highp float time;
    96 
    97 43: };
    98 
    99 44:
    100 
    101 45: uniform highp mat4 modelview_matrix;
    102 
    103 46: uniform highp mat4 extra_matrix;
    104 
    105 47:
    106 
    107 48:
    108 
    109 49: out highp vec2 uv_interp;
    110 
    111 50: out mediump vec4 color_interp;
    112 
    113 51:
    114 
    115 52: #ifdef USE_NINEPATCH
    116 
    117 53:
    118 
    119 54: out highp vec2 pixel_size_interp;
    120 
    121 55: #endif
    122 
    123 56:
    124 
    125 57:
    126 
    127 58: #ifdef USE_LIGHTING
    128 
    129 59:
    130 
    131 60: layout(std140) uniform LightData { //ubo:1
    132 
    133 61:
    134 
    135 62:     //light matrices
    136 
    137 63:     highp mat4 light_matrix;
    138 
    139 64:     highp mat4 light_local_matrix;
    140 
    141 65:     highp mat4 shadow_matrix;
    142 
    143 66:     highp vec4 light_color;
    144 
    145 67:     highp vec4 light_shadow_color;
    146 
    147 68:     highp vec2 light_pos;
    148 
    149 69:     highp float shadowpixel_size;
    150 
    151 70:     highp float shadow_gradient;
    152 
    153 71:     highp float light_height;
    154 
    155 72:     highp float light_outside_alpha;
    156 
    157 73:     highp float shadow_distance_mult;
    158 
    159 74: };
    160 
    161 75:
    162 
    163 76:
    164 
    165 77: out vec4 light_uv_interp;
    166 
    167 78:
    168 
    169 79:
    170 
    171 80: out vec4 local_rot;
    172 
    173 81:
    174 
    175 82:
    176 
    177 83: #ifdef USE_SHADOWS
    178 
    179 84: out highp vec2 pos;
    180 
    181 85: #endif
    182 
    183 86:
    184 
    185 87: const bool at_light_pass = true;
    186 
    187 88: #else
    188 
    189 89: const bool at_light_pass = false;
    190 
    191 90: #endif
    192 
    193 91:
    194 
    195 92: #ifdef USE_PARTICLES
    196 
    197 93: uniform int h_frames;
    198 
    199 94: uniform int v_frames;
    200 
    201 95: #endif
    202 
    203 96:
    204 
    205 97:
    206 
    207 98: #if defined(USE_MATERIAL)
    208 
    209 99:
    210 
    211 100: layout(std140) uniform UniformData { //ubo:2
    212 
    213 101:
    214 
    215 102:
    216 
    217 103: };
    218 
    219 104:
    220 
    221 105: #endif
    222 
    223 106:
    224 
    225 107:
    226 
    227 108: void main() {
    228 
    229 109:
    230 
    231 110:    vec4 color = color_attrib;
    232 
    233 111:
    234 
    235 112: #ifdef USE_INSTANCING
    236 
    237 113:    mat4 extra_matrix2 = extra_matrix *
    238 transpose(mat4(instance_xform0,instance_xform1,instance_xform2,vec4(0.0,0.0,0.0,1.0)));
    239 
    240 114:    color*=instance_color;
    241 
    242 115:    vec4 instance_custom = instance_custom_data;
    243 
    244 116:
    245 
    246 117: #else
    247 
    248 118:    mat4 extra_matrix2 = extra_matrix;
    249 
    250 119:    vec4 instance_custom = vec4(0.0);
    251 
    252 120: #endif
    253 
    254 121:
    255 
    256 122: #ifdef USE_TEXTURE_RECT
    257 
    258 123:
    259 
    260 124:    if (dst_rect.z < 0.0) { // Transpose is encoded as negative dst_rect.z
    261 
    262 125:            uv_interp = src_rect.xy + abs(src_rect.zw) * vertex.yx;
    263 
    264 126:    } else {
    265 
    266 127:            uv_interp = src_rect.xy + abs(src_rect.zw) * vertex;
    267 
    268 128:    }
    269 
    270 129:    highp vec4 outvec = vec4(dst_rect.xy + abs(dst_rect.zw) * mix(vertex,vec2(1.0,1.0)-
    271 vertex,lessThan(src_rect.zw,vec2(0.0,0.0))),0.0,1.0);
    272 
    273 130:
    274 
    275 131: #else
    276 
    277 132:    uv_interp = uv_attrib;
    278 
    279 133:    highp vec4 outvec = vec4(vertex,0.0,1.0);
    280 
    281 134: #endif
    282 
    283 135:
    284 
    285 136:
    286 
    287 137: #ifdef USE_PARTICLES
    288 
    289 138:    //scale by texture size
    290 
    291 139:    outvec.xy/=color_texpixel_size;
    292 
    293 140:
    294 
    295 141:    //compute h and v frames and adjust UV interp for animation
    296 
    297 142:    int total_frames = h_frames * v_frames;
    298 
    299 143:    int frame = min(int(float(total_frames) *instance_custom.z),total_frames-1);
    300 
    301 144:    float frame_w = 1.0/float(h_frames);
    302 
    303 145:    float frame_h = 1.0/float(v_frames);
    304 
    305 146:    uv_interp.x = uv_interp.x * frame_w + frame_w * float(frame % h_frames);
    306 
    307 147:    uv_interp.y = uv_interp.y * frame_h + frame_h * float(frame / h_frames);
    308 
    309 148:
    310 
    311 149: #endif
    312 
    313 150:
    314 
    315 151: #define extra_matrix extra_matrix2
    316 
    317 152:
    318 
    319 153: {
    320 
    321 154:
    322 
    323 155:
    324 
    325 156: }
    326 
    327 157:
    328 
    329 158:
    330 
    331 159: #ifdef USE_NINEPATCH
    332 
    333 160:
    334 
    335 161:    pixel_size_interp=abs(dst_rect.zw) * vertex;
    336 
    337 162: #endif
    338 
    339 163:
    340 
    341 164: #if !defined(SKIP_TRANSFORM_USED)
    342 
    343 165:    outvec = extra_matrix * outvec;
    344 
    345 166:    outvec = modelview_matrix * outvec;
    346 
    347 167: #endif
    348 
    349 168:
    350 
    351 169: #undef extra_matrix
    352 
    353 170:
    354 
    355 171:    color_interp = color;
    356 
    357 172:
    358 
    359 173: #ifdef USE_PIXEL_SNAP
    360 
    361 174:
    362 
    363 175:    outvec.xy=floor(outvec+0.5).xy;
    364 
    365 176: #endif
    366 
    367 177:
    368 
    369 178:
    370 
    371 179:    gl_Position = projection_matrix * outvec;
    372 
    373 180:
    374 
    375 181: #ifdef USE_LIGHTING
    376 
    377 182:
    378 
    379 183:    light_uv_interp.xy = (light_matrix * outvec).xy;
    380 
    381 184:    light_uv_interp.zw =(light_local_matrix * outvec).xy;
    382 
    383 185: #ifdef USE_SHADOWS
    384 
    385 186:    pos=outvec.xy;
    386 
    387 187: #endif
    388 
    389 188:
    390 
    391 189:
    392 
    393 190:    local_rot.xy=normalize( (modelview_matrix * ( extra_matrix * vec4(1.0,0.0,0.0,0.0) )).xy  );
    394 
    395 191:    local_rot.zw=normalize( (modelview_matrix * ( extra_matrix * vec4(0.0,1.0,0.0,0.0) )).xy  );
    396 
    397 192: #ifdef USE_TEXTURE_RECT
    398 
    399 193:    local_rot.xy*=sign(src_rect.z);
    400 
    401 194:    local_rot.zw*=sign(src_rect.w);
    402 
    403 195: #endif
    404 
    405 196:
    406 
    407 197:
    408 
    409 198:
    410 
    411 199: #endif
    412 
    413 200:
    414 
    415 201: }
    416 
    417 202:
    418 
    419 203:
    420 
    421 ERROR: _display_error_with_code: CanvasShaderGLES3: Vertex Program Compilation Failed:
    422 
    423 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES
    424 
    425 
    426 
    427    At: drivers/gles3/shader_gles3.cpp:168.
    428 
    429 ERROR: get_current_version: Method/Function Failed, returning: __null
    430 
    431    At: drivers/gles3/shader_gles3.cpp:354.
    432 
    433 ERROR: bind: Condition ' !version ' is true. returned: false
    434 
    435    At: drivers/gles3/shader_gles3.cpp:123.
    436 
    437 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    438 
    439    At: drivers/gles3/shader_gles3.h:377.
    440 
    441 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    442 
    443    At: drivers/gles3/shader_gles3.h:377.
    444 
    445 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    446 
    447    At: drivers/gles3/shader_gles3.h:377.
    448 
    449 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    450 
    451    At: drivers/gles3/shader_gles3.h:377.
    452 
    453 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    454 
    455    At: drivers/gles3/shader_gles3.h:377.
    456 
    457 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    458 
    459    At: drivers/gles3/shader_gles3.h:377.
    460 
    461 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    462 
    463    At: drivers/gles3/shader_gles3.h:377.
    464 
    465 1: #version 330
    466 
    467 2: #define GLES_OVER_GL
    468 
    469 3: #define USE_SOURCE_PANORAMA
    470 
    471 4: #define LOW_QUALITY
    472 
    473 5: #define USE_DUAL_PARABOLOID
    474 
    475 6: #define USE_DIRECT_WRITE
    476 
    477 7: precision highp float;
    478 
    479 8: precision highp int;
    480 
    481 9:
    482 
    483 10:
    484 
    485 11: layout(location=0) in highp vec2 vertex;
    486 
    487 12:
    488 
    489 13: layout(location=4) in highp vec2 uv;
    490 
    491 14:
    492 
    493 15: out highp vec2 uv_interp;
    494 
    495 16:
    496 
    497 17: void main() {
    498 
    499 18:
    500 
    501 19:     uv_interp=uv;
    502 
    503 20:     gl_Position=vec4(vertex,0,1);
    504 
    505 21: }
    506 
    507 22:
    508 
    509 23:
    510 
    511 ERROR: _display_error_with_code: CubemapFilterShaderGLES3: Vertex Program Compilation Failed:
    512 
    513 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES
    514 
    515 
    516 
    517    At: drivers/gles3/shader_gles3.cpp:168.
    518 
    519 ERROR: get_current_version: Method/Function Failed, returning: __null
    520 
    521    At: drivers/gles3/shader_gles3.cpp:354.
    522 
    523 ERROR: bind: Condition ' !version ' is true. returned: false
    524 
    525    At: drivers/gles3/shader_gles3.cpp:123.
    526 
    527 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    528 
    529    At: drivers/gles3/shader_gles3.h:377.
    530 
    531 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    532 
    533    At: drivers/gles3/shader_gles3.h:377.
    534 
    535 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    536 
    537    At: drivers/gles3/shader_gles3.h:377.
    538 
    539 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    540 
    541    At: drivers/gles3/shader_gles3.h:377.
    542 
    543 1: #version 330
    544 
    545 2: #define GLES_OVER_GL
    546 
    547 3: #define USE_SOURCE_DUAL_PARABOLOID_ARRAY
    548 
    549 4: #define LOW_QUALITY
    550 
    551 5: #define USE_DUAL_PARABOLOID
    552 
    553 6: precision highp float;
    554 
    555 7: precision highp int;
    556 
    557 8:
    558 
    559 9:
    560 
    561 10: layout(location=0) in highp vec2 vertex;
    562 
    563 11:
    564 
    565 12: layout(location=4) in highp vec2 uv;
    566 
    567 13:
    568 
    569 14: out highp vec2 uv_interp;
    570 
    571 15:
    572 
    573 16: void main() {
    574 
    575 17:
    576 
    577 18:     uv_interp=uv;
    578 
    579 19:     gl_Position=vec4(vertex,0,1);
    580 
    581 20: }
    582 
    583 21:
    584 
    585 22:
    586 
    587 ERROR: _display_error_with_code: CubemapFilterShaderGLES3: Vertex Program Compilation Failed:
    588 
    589 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES
    590 
    591 
    592 
    593    At: drivers/gles3/shader_gles3.cpp:168.
    594 
    595 ERROR: get_current_version: Method/Function Failed, returning: __null
    596 
    597    At: drivers/gles3/shader_gles3.cpp:354.
    598 
    599 ERROR: bind: Condition ' !version ' is true. returned: false
    600 
    601    At: drivers/gles3/shader_gles3.cpp:123.
    602 
    603 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    604 
    605    At: drivers/gles3/shader_gles3.h:377.
    606 
    607 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    608 
    609    At: drivers/gles3/shader_gles3.h:377.
    610 
    611 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    612 
    613    At: drivers/gles3/shader_gles3.h:377.
    614 
    615 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    616 
    617    At: drivers/gles3/shader_gles3.h:377.
    618 
    619 ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
    620 
    621    At: drivers/gles3/shader_gles3.h:377.
    622 
    623 
    624 
    625