Closed MashyBasker closed 3 weeks ago
Implementation details:
Test details:
Fixes #185
shader main { // Fragment Shader fragment { PSOutput PSMain(PSInput input ) { PSOutput output; output.out_color = vec4(0.0, 0.0, 0.0, 1.0); if (input.in_position.r > 0.5) { output.out_color += input.in_position; } if (input.in_position.r < 0.5) { output.out_color -= vec4(0.1, 0.1, 0.1, 0.1); } if (input.in_position.g > 0.5) { output.out_color *= 2.0; } if (input.in_position.b > 0.5) { out_color /= 2.0; } if (input.in_position.r == 0.5) { uint redValue = asuint(output.out_color.r); output.redValue ^= 0 x1; output.out_color.r = asfloat( redValue); output.redValue |= 0 x2; output.redValue &= 0 x3; } return output; } } }
The above CrossGL code was generated from the following Directx HLSL code
PSOutput PSMain(PSInput input) { PSOutput output; output.out_color = float4(0.0, 0.0, 0.0, 1.0); if (input.in_position.r > 0.5) { output.out_color += input.in_position; } if (input.in_position.r < 0.5) { output.out_color -= float4(0.1, 0.1, 0.1, 0.1); } if (input.in_position.g > 0.5) { output.out_color *= 2.0; } if (input.in_position.b > 0.5) { out_color /= 2.0; } if (input.in_position.r == 0.5) { uint redValue = asuint(output.out_color.r); output.redValue ^= 0x1; output.out_color.r = asfloat(redValue); output.redValue |= 0x2; output.redValue &= 0x3; } return output; }
PR Description
Implementation details:
Test details:
Related Issue
Fixes #185
shader Sample
The above CrossGL code was generated from the following Directx HLSL code
Checklist