酷代码 AI
菜单
全部AI  /  热门  /  AI写代码神器
服务商

// __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture

```glsl #version 300 es // version 300 code #define varying in #define texture2d texture // Example shader code using the defined macros precision mediump float; varying vec4 vColor; uniform sampler2D uTexture; out vec4 fragColor; void main() { fragColor = texture(uTexture, vColor.xy) * vColor; } ``` [2024-12-14 17:34:20 | AI写代码神器 | 111点数解答]

相关提问