// // CCSpriteGrayscale::shaderBody from 0x6dd134 to 0x6dd140 (12 bytes) // // 2 xrefs: // > @ 0x466a8 // > @ 0x1424160 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:51:35 +0000 // const char *__fastcall CCSpriteGrayscale::shaderBody(CCSpriteGrayscale *this) { return "\n" " #ifdef GL_ES\n" " precision mediump float;\n" " #endif\n" "\n" " varying vec4 v_fragmentColor;\n" " varying vec2 v_texCoord;\n" " uniform sampler2D u_texture;\n" "\n" " uniform vec3 u_lum;\n" "\n" " void main(void) {\n" " vec4 color = texture2D(u_texture, v_texCoord);\n" " float gray = dot(color.rgb * v_fragmentColor.rgb, u_lum);\n" " float normalization = (v_fragmentColor.r + v_fragmentColor.g + v_fragmentColor.b) / 3.0;\n" " gray /= normalization; // Adjust for tint brightness\n" " gl_FragColor = vec4(v_fragmentColor.rgb*vec3(gray), color.a * v_fragmentColor.a);\n" " }\n" " "; }
GD Web Decomp Icon

GD Web Decomp

Raw Source