Title: 无效的GLSL · Issue #2 · leftcoding/AndroidOpenGLView · GitHub
Open Graph Title: 无效的GLSL · Issue #2 · leftcoding/AndroidOpenGLView
X Title: 无效的GLSL · Issue #2 · leftcoding/AndroidOpenGLView
Description: 还有片元着色器中的一段代码和上边的一个rect数组,能麻烦解释下是干什么用的吗?我注释掉也没什么问题。 #extension GL_OES_EGL_image_external : require precision mediump float; struct Rect { vec4 color; float left; float top; float right; float bottom; }; // important to include in order t...
Open Graph Description: 还有片元着色器中的一段代码和上边的一个rect数组,能麻烦解释下是干什么用的吗?我注释掉也没什么问题。 #extension GL_OES_EGL_image_external : require precision mediump float; struct Rect { vec4 color; float left; float top; float right; float botto...
X Description: 还有片元着色器中的一段代码和上边的一个rect数组,能麻烦解释下是干什么用的吗?我注释掉也没什么问题。 #extension GL_OES_EGL_image_external : require precision mediump float; struct Rect { vec4 color; float left; float top; float right; float botto...
Opengraph URL: https://github.com/leftcoding/AndroidOpenGLView/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"无效的GLSL","articleBody":"还有片元着色器中的一段代码和上边的一个rect数组,能麻烦解释下是干什么用的吗?我注释掉也没什么问题。\r\n\r\n\r\n#extension GL_OES_EGL_image_external : require\r\nprecision mediump float;\r\n\r\n\r\nstruct Rect {\r\n vec4 color;\r\n float left;\r\n float top;\r\n float right;\r\n float bottom;\r\n};\r\n\r\n\r\n// important to include in order to use rendered Android View to gl texture\r\nuniform samplerExternalOES u_Texture;\r\n\r\nuniform float u_GlobalTime;\r\n\r\n\r\n//const int MAX_RECTS = 4;\r\n//uniform Rect u_Rects[MAX_RECTS];\r\n\r\nvarying vec2 v_TexCoordinate;\r\n\r\nvoid main()\r\n{\r\n\r\n vec2 uv = v_TexCoordinate.xy;\r\n\r\n vec4 primary_color = texture2D(u_Texture, uv);\r\n\r\n// vec4 tmpColor = vec4(0.0, 0.0, 0.0, 0.0);\r\n//\r\n// bool set = false;\r\n//\r\n// for(int idx = 0; idx \u003c MAX_RECTS; idx++) {\r\n// if(uv.x \u003e u_Rects[idx].left \u0026\u0026 uv.x \u003c u_Rects[idx].right \u0026\u0026 uv.y \u003e u_Rects[idx].top \u0026\u0026 uv.y \u003c u_Rects[idx].bottom) {\r\n// tmpColor += u_Rects[idx].color;\r\n// set = true;\r\n// }\r\n// }\r\n//\r\n// if(set) {\r\n// primary_color *= tmpColor;\r\n// }\r\n\r\n gl_FragColor = primary_color;\r\n}","author":{"url":"https://github.com/Chen-Alexander","@type":"Person","name":"Chen-Alexander"},"datePublished":"2021-07-20T15:47:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/AndroidOpenGLView/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c0d903d2-a305-9a76-1e3b-30e9208878c3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCD8:9C773:318B5E7:43A151E:6980A89F |
| html-safe-nonce | d687e65af63506451f4ce8f24d6142a0b96a031211a59c757cd4426fe88ad6ff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0Q4OjlDNzczOjMxOEI1RTc6NDNBMTUxRTo2OTgwQTg5RiIsInZpc2l0b3JfaWQiOiI4NDg4NDA4NzM5NDg3OTgzNzc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 35a3ecbfca5e4e5e26daa11b2970d544eed12f8cc59279cc6a885bf003712505 |
| hovercard-subject-tag | issue:948795071 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/leftcoding/AndroidOpenGLView/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/655fb902e84170c538c2aa990be2a03ba91e1608d20f11df45f7c223afe78e9e/leftcoding/AndroidOpenGLView/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/655fb902e84170c538c2aa990be2a03ba91e1608d20f11df45f7c223afe78e9e/leftcoding/AndroidOpenGLView/issues/2 |
| og:image:alt | 还有片元着色器中的一段代码和上边的一个rect数组,能麻烦解释下是干什么用的吗?我注释掉也没什么问题。 #extension GL_OES_EGL_image_external : require precision mediump float; struct Rect { vec4 color; float left; float top; float right; float botto... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Chen-Alexander |
| hostname | github.com |
| expected-hostname | github.com |
| None | 397d19ba710db18a5bb8753941062283effd69f9bf1c4828adfea0f79443f2f8 |
| turbo-cache-control | no-preview |
| go-import | github.com/leftcoding/AndroidOpenGLView git https://github.com/leftcoding/AndroidOpenGLView.git |
| octolytics-dimension-user_id | 7122926 |
| octolytics-dimension-user_login | leftcoding |
| octolytics-dimension-repository_id | 146373697 |
| octolytics-dimension-repository_nwo | leftcoding/AndroidOpenGLView |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 146373697 |
| octolytics-dimension-repository_network_root_nwo | leftcoding/AndroidOpenGLView |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af3ed57de2d3e996d6b26c9b863321bbc7aeae13 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width