MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / AddPostProcessing

Function AddPostProcessing

src/Graphics_GL2.c:246–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246static 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 */
256static void GenFragmentShader(const struct GLShader* shader, cc_string* dst) {

Callers 1

GenFragmentShaderFunction · 0.85

Calls 1

String_AppendConstFunction · 0.85

Tested by

no test coverage detected