{"action":"opened","issue":{"url":"https://api.github.com/repos/cbaggers/cepl/issues/273","repository_url":"https://api.github.com/repos/cbaggers/cepl","labels_url":"https://api.github.com/repos/cbaggers/cepl/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/cbaggers/cepl/issues/273/comments","events_url":"https://api.github.com/repos/cbaggers/cepl/issues/273/events","html_url":"https://github.com/cbaggers/cepl/issues/273","id":342396615,"node_id":"MDU6SXNzdWUzNDIzOTY2MTU=","number":273,"title":"Struct import not recursive in this case (when not used maybe?)","user":{"login":"cbaggers","id":1579326,"node_id":"MDQ6VXNlcjE1NzkzMjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1579326?v=4","gravatar_id":"","url":"https://api.github.com/users/cbaggers","html_url":"https://github.com/cbaggers","followers_url":"https://api.github.com/users/cbaggers/followers","following_url":"https://api.github.com/users/cbaggers/following{/other_user}","gists_url":"https://api.github.com/users/cbaggers/gists{/gist_id}","starred_url":"https://api.github.com/users/cbaggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbaggers/subscriptions","organizations_url":"https://api.github.com/users/cbaggers/orgs","repos_url":"https://api.github.com/users/cbaggers/repos","events_url":"https://api.github.com/users/cbaggers/events{/privacy}","received_events_url":"https://api.github.com/users/cbaggers/received_events","type":"User","site_admin":false},"labels":[{"id":4351365,"node_id":"MDU6TGFiZWw0MzUxMzY1","url":"https://api.github.com/repos/cbaggers/cepl/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"cbaggers","id":1579326,"node_id":"MDQ6VXNlcjE1NzkzMjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1579326?v=4","gravatar_id":"","url":"https://api.github.com/users/cbaggers","html_url":"https://github.com/cbaggers","followers_url":"https://api.github.com/users/cbaggers/followers","following_url":"https://api.github.com/users/cbaggers/following{/other_user}","gists_url":"https://api.github.com/users/cbaggers/gists{/gist_id}","starred_url":"https://api.github.com/users/cbaggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbaggers/subscriptions","organizations_url":"https://api.github.com/users/cbaggers/orgs","repos_url":"https://api.github.com/users/cbaggers/repos","events_url":"https://api.github.com/users/cbaggers/events{/privacy}","received_events_url":"https://api.github.com/users/cbaggers/received_events","type":"User","site_admin":false},"assignees":[{"login":"cbaggers","id":1579326,"node_id":"MDQ6VXNlcjE1NzkzMjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1579326?v=4","gravatar_id":"","url":"https://api.github.com/users/cbaggers","html_url":"https://github.com/cbaggers","followers_url":"https://api.github.com/users/cbaggers/followers","following_url":"https://api.github.com/users/cbaggers/following{/other_user}","gists_url":"https://api.github.com/users/cbaggers/gists{/gist_id}","starred_url":"https://api.github.com/users/cbaggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbaggers/subscriptions","organizations_url":"https://api.github.com/users/cbaggers/orgs","repos_url":"https://api.github.com/users/cbaggers/repos","events_url":"https://api.github.com/users/cbaggers/events{/privacy}","received_events_url":"https://api.github.com/users/cbaggers/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-18T16:10:31Z","updated_at":"2018-07-18T16:10:31Z","closed_at":null,"author_association":"OWNER","body":"```\r\n(defstruct-g (plight :layout :std-140)\r\n  (pos :vec3)\r\n  (color :vec3)\r\n  (strength :float))\r\n\r\n(defstruct-g light-set\r\n  (plights (plight 3)))\r\n\r\n(defun make-lights ()\r\n  (make-ubo\r\n   (list (list (list (v! 0 4 0) (v! 1.0 1.0 1.0) 0.0)\r\n               (list (v! 1000 -1000 1000) (v! 0.0 1.0 0.0) 0.0)\r\n               (list (v! 1000 -1000 1000) (v! 0.0 0.0 1.0) 0.0)))\r\n   'light-set))\r\n\r\n(defun-g some-frag-stage ((frag-normal :vec3)\r\n                          (world-pos :vec3)\r\n                          (uv :vec2)\r\n                          &uniform\r\n                          (albedo :sampler-2d)\r\n                          (now :float)\r\n                          (lights light-set :ubo :std-140))\r\n  (let* ((frag-normal (normalize frag-normal))\r\n         (albedo (gamma-correct (s~ (texture albedo uv) :xyz)))\r\n         (ambient 0.0)\r\n         (vec-to-light (- (v! 0 4 0) world-pos))\r\n         (dir-to-light (normalize vec-to-light))\r\n         (point-light-strength 400.8)\r\n         (final-light-strength (* point-light-strength\r\n                                  (attenuate (length vec-to-light))))\r\n         (diffuse (* (saturate (dot dir-to-light frag-normal))\r\n                     final-light-strength))\r\n         (light-amount (+ ambient diffuse))\r\n         (color (s~ (* albedo light-amount) :xyz) 0 ))\r\n    (v! (gamma-encode color) 0)))\r\n```\r\n\r\n```\r\nError compiling fragment-shader: \r\n0(17) : error C0000: syntax error, unexpected '[', expecting \"::\" at token \"[\"\r\n\r\n\r\n// fragment-stage\r\n#version 460\r\n\r\nin _FROM_VERTEX_STAGE_\r\n{\r\n     in vec3 _VERTEX_STAGE_OUT_1;\r\n     in vec3 _VERTEX_STAGE_OUT_2;\r\n     in vec2 _VERTEX_STAGE_OUT_3;\r\n} v_in;\r\n\r\nlayout(location = 0)  out vec4 _FRAGMENT_STAGE_OUT_0;\r\n\r\nuniform sampler2D ALBEDO;\r\nuniform float NOW;\r\nlayout(std140) uniform _UBO_LIGHTS\r\n{\r\n    PLIGHT[3] PLIGHTS;\r\n} LIGHTS;\r\n\r\nvec3 GAMMA_ENCODE(vec3 COLOR1);\r\nfloat ATTENUATE(float DIST);\r\nvec3 GAMMA_CORRECT(vec3 COLOR);\r\n\r\nvec3 GAMMA_CORRECT(vec3 COLOR)\r\n{\r\n    return pow(COLOR, vec3(2.2f));\r\n}\r\n\r\nfloat ATTENUATE(float DIST)\r\n{\r\n    return (1.0f / (DIST * DIST));\r\n}\r\n\r\nvec3 GAMMA_ENCODE(vec3 COLOR1)\r\n{\r\n    return pow(COLOR1, vec3((1.0f / 2.2f)));\r\n}\r\n\r\nvoid main()\r\n{\r\n    vec3 FRAG_NORMAL = normalize(v_in._VERTEX_STAGE_OUT_1);\r\n    vec3 ALBEDO0 = GAMMA_CORRECT(texture(ALBEDO,v_in._VERTEX_STAGE_OUT_3).xyz);\r\n    float AMBIENT = 0.0f;\r\n    vec3 VEC_TO_LIGHT = (vec3(float(0),float(4),float(0)) - v_in._VERTEX_STAGE_OUT_2);\r\n    vec3 DIR_TO_LIGHT = normalize(VEC_TO_LIGHT);\r\n    float POINT_LIGHT_STRENGTH = 400.8f;\r\n    float FINAL_LIGHT_STRENGTH = (POINT_LIGHT_STRENGTH * ATTENUATE(length(VEC_TO_LIGHT)));\r\n    float DIFFUSE = (clamp(dot(DIR_TO_LIGHT,FRAG_NORMAL), 0, 1) * FINAL_LIGHT_STRENGTH);\r\n    float LIGHT_AMOUNT = (AMBIENT + DIFFUSE);\r\n    vec3 COLOR0 = (ALBEDO0 * LIGHT_AMOUNT).xyz;\r\n    vec4 g_GEXPR0_6859 = vec4(GAMMA_ENCODE(COLOR0),float(0));\r\n    _FRAGMENT_STAGE_OUT_0 = g_GEXPR0_6859;\r\n    return;\r\n}\r\n   [Condition of type SIMPLE-ERROR]\r\n\r\nRestarts:\r\n 0: [CONTINUE] Livesupport: Continue\r\n 1: [RETRY] Retry SLIME REPL evaluation request.\r\n 2: [*ABORT] Return to SLIME's top level.\r\n 3: [ABORT] abort thread (#<THREAD \"repl-thread\" RUNNING {1002330433}>)\r\n\r\nBacktrace:\r\n  0: (CEPL.PIPELINES::MAKE-SHADER :FRAGMENT-SHADER \"// fragment-stage ..)\r\n  1: (CEPL.PIPELINES::%COMPILE-LINK-AND-UPLOAD SOME-PIPELINE #<VARJO.INTERNALS:TRIANGLES {100957FDB3}> ((:VERTEX . #<CEPL.PIPELINES::GPU-FUNC-SPEC {1004419A13}>) (:FRAGMENT . #<CEPL.PIPELINES::GPU-FUNC-SPE..\r\n  2: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN CEPL.HIDDEN::PLAY-WITH-VERTS.SOME-PIPELINE.INIT))\r\n  3: ((FLET #:WITHOUT-INTERRUPTS-BODY-358 :IN SB-THREAD::CALL-WITH-MUTEX))\r\n  4: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN CEPL.HIDDEN::PLAY-WITH-VERTS.SOME-PIPELINE.INIT) {7FFFF46558AB}> #<SB-THREAD:MUTEX \"Anonymous lock\" owner: #<SB-THREAD:THREA..\r\n  5: (CEPL.HIDDEN::PLAY-WITH-VERTS.SOME-PIPELINE.INIT #S(CEPL.PIPELINES::PIPELINE-STATE :DIFF-TAG 1223 :PROG-IDS #(3 4294967295 4294967295 4294967295 4294967295 4294967295 ...) :IMPLICIT-UNIFORM-UPLOAD-FUN..\r\n  6: (SOME-PIPELINE #<CEPL-CONTEXT #<THREAD \"repl-thread\" RUNNING {1002330433}>> #<CEPL:BUFFER-STREAM (12) :LENGTH 5580 :INDEXED T> :MODEL->WORLD #(1.0 0.0 0.0 0.0 0.0 1.0 ...) :WORLD->VIEW #(-0.23745131 -..\r\n  7: (GAME-STEP)\r\n  8: (PLAY :START NIL)\r\n  9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (PLAY :START) #<NULL-LEXENV>)\r\n 10: (EVAL (PLAY :START))\r\n --more--\r\n```"}}
{"actor":{"display_login":"cbaggers"}}