{"action":"created","issue":{"url":"https://api.github.com/repos/nortikin/sverchok/issues/2331","repository_url":"https://api.github.com/repos/nortikin/sverchok","labels_url":"https://api.github.com/repos/nortikin/sverchok/issues/2331/labels{/name}","comments_url":"https://api.github.com/repos/nortikin/sverchok/issues/2331/comments","events_url":"https://api.github.com/repos/nortikin/sverchok/issues/2331/events","html_url":"https://github.com/nortikin/sverchok/issues/2331","id":390253409,"node_id":"MDU6SXNzdWUzOTAyNTM0MDk=","number":2331,"title":"Shader not working on b28_prelease_master?","user":{"login":"kalwalt","id":1275858,"node_id":"MDQ6VXNlcjEyNzU4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1275858?v=4","gravatar_id":"","url":"https://api.github.com/users/kalwalt","html_url":"https://github.com/kalwalt","followers_url":"https://api.github.com/users/kalwalt/followers","following_url":"https://api.github.com/users/kalwalt/following{/other_user}","gists_url":"https://api.github.com/users/kalwalt/gists{/gist_id}","starred_url":"https://api.github.com/users/kalwalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalwalt/subscriptions","organizations_url":"https://api.github.com/users/kalwalt/orgs","repos_url":"https://api.github.com/users/kalwalt/repos","events_url":"https://api.github.com/users/kalwalt/events{/privacy}","received_events_url":"https://api.github.com/users/kalwalt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-12T14:35:43Z","updated_at":"2018-12-12T14:50:43Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Shader not working\r\n\r\nTrying to test the new shader feature, i used this shader:\r\n\r\n>```python\r\n> vertex_shader = '''\r\n>     uniform mat4 viewProjectionMatrix;\r\n> \r\n>     in vec3 position;\r\n>     out vec3 pos;\r\n> \r\n>     void main()\r\n>     {\r\n>         pos = position;\r\n>         gl_Position = viewProjectionMatrix * vec4(position, 1.0f);\r\n>     }\r\n> '''\r\n> \r\n> fragment_shader = '''\r\n>     uniform float brightness;\r\n> \r\n>     in vec3 pos;\r\n> \r\n>     void main()\r\n>     {\r\n>         float a = floor(sin(pos.x * 5.2)*0.8 + 0.4)\r\n>         float b = floor(sin(pos.y * 7.2)*0.8 + 0.4)\r\n>         float b = floor(sin(pos.z * 1.6)*2.2 * brightness/0.7)\r\n>         gl_FragColor = vec4(a, b, c, 1.0);\r\n>     }\r\n> '''\r\n> \r\n> def draw(context, args):\r\n>     geom, config = args\r\n>     batch = config.batch\r\n>     shader = config.shader\r\n>     shader.bind()\r\n>     matrix = bpy.context.region_data.perspective_matrix\r\n>     shader.uniform_float(\"viewProjectionMatrix\", matrix)\r\n>     shader.uniform_float(\"brightness\", 0.5)\r\n>     batch.draw(shader)\r\n> ```\r\n\r\nwith internal scripting but nothing happens as expected... what is wrong?\r\n## Steps to reproduce\r\n\r\n1. create a torus and VD experimental node, connect them. \r\n2. past the code in the text scripting field, select the script in the VD experimental node.\r\n3. run the script(?)\r\n\r\n## Expected result\r\n\r\nWhat did you expect to see as a result of those steps?\r\nA torus with a chessboard texture.\r\n\r\n## Actual result\r\n\r\nWhat did you actually get?\r\nthe standard display as that in the VD experimental code.\r\n\r\n## Sverchok version\r\n\r\nthe 2.8_prelease_master branch\r\n\r\nThis is especially important for installation-related issues. Please specify how do you install Sverchok: from sverchok-master.zip from github, or from release zip file, or from cloned git repo.\r\n\r\nProbably something that i missed or changes in the code....\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nortikin/sverchok/issues/comments/446614028","html_url":"https://github.com/nortikin/sverchok/issues/2331#issuecomment-446614028","issue_url":"https://api.github.com/repos/nortikin/sverchok/issues/2331","id":446614028,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjYxNDAyOA==","user":{"login":"kalwalt","id":1275858,"node_id":"MDQ6VXNlcjEyNzU4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1275858?v=4","gravatar_id":"","url":"https://api.github.com/users/kalwalt","html_url":"https://github.com/kalwalt","followers_url":"https://api.github.com/users/kalwalt/followers","following_url":"https://api.github.com/users/kalwalt/following{/other_user}","gists_url":"https://api.github.com/users/kalwalt/gists{/gist_id}","starred_url":"https://api.github.com/users/kalwalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalwalt/subscriptions","organizations_url":"https://api.github.com/users/kalwalt/orgs","repos_url":"https://api.github.com/users/kalwalt/repos","events_url":"https://api.github.com/users/kalwalt/events{/privacy}","received_events_url":"https://api.github.com/users/kalwalt/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T14:50:43Z","updated_at":"2018-12-12T14:50:43Z","author_association":"CONTRIBUTOR","body":"@zeffii you are rigth, but this not change nothing...sigh!"}}
{"actor":{"display_login":"kalwalt"}}