Closed MashyBasker closed 1 month ago
This PR aims to add support for Bitwise AND in the translator frontend.
Fixes #106
shader main { struct VSInput { vec2 texCoord @ TEXCOORD0; }; struct VSOutput { vec4 color @ COLOR; }; sampler2D iChannel0; vertex { VSOutput main(VSInput input) { VSOutput output; // Use bitwise AND on texture coordinates (for testing purposes) output.color = vec4(float(int(input.texCoord.x * 100.0) & 15), float(int(input.texCoord.y * 100.0) & 15), 0.0, 1.0); return output; } } fragment { vec4 main(VSOutput input) @ gl_FragColor { // Simple fragment shader to display the result of the AND operation return vec4(input.color.rgb, 1.0); } } }
hii @MashyBasker the changes looking good to me can you add test for codegen also for bitwise and
Updated the PR with the requested changes @samthakur587
PR Description
This PR aims to add support for Bitwise AND in the translator frontend.
Related Issue
Fixes #106
shader Sample
Checklist