| 244 | } |
| 245 | |
| 246 | static void AddPostProcessing(cc_string* dst) { |
| 247 | switch (postProcess) { |
| 248 | case POSTPROCESS_GRAYSCALE: |
| 249 | String_AppendConst(dst, " float gray = 0.21 * col.r + 0.71 * col.g + 0.07 * col.b;\n"); |
| 250 | String_AppendConst(dst, " col = vec4(gray, gray, gray, col.a);\n"); |
| 251 | break; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /* Generates source code for a GLSL fragment shader, based on shader's flags */ |
| 256 | static void GenFragmentShader(const struct GLShader* shader, cc_string* dst) { |
no test coverage detected