Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shader:
- float4 main() : POSITION { return 1.0 + 2.0 * 3.0 / 4.0 - 0.5 % 1.0; }
- original IR:
- module
- {
- struct:00CE3890:main__ret{ [4 x f32] __RetVal:POSITION }
- function 'main'() -> struct:00CE3890:main__ret
- {
- block
- {
- 00CF6F00 = mod.f32(f32:0.5,f32:1)
- 00CF7130 = mul.f32(f32:2,f32:3)
- 00CF7520 = div.f32(00CF7130,f32:4)
- 00CF6E90 = add.f32(f32:1,00CF7520)
- 00CF6F70 = sub.f32(00CF6E90,00CF6F00)
- 00CFF3C0 = cast [4 x f32] 00CF6F70
- 00CFF6C0 = aggregate struct:00CE3890:main__ret (00CFF3C0)
- ret struct:00CE3890:main__ret 00CFF6C0
- }
- }
- }
- optimized IR:
- module
- {
- struct:00CE3890:main__ret{ [4 x f32] __RetVal:POSITION }
- function 'main'() -> struct:00CE3890:main__ret
- {
- block
- {
- 00CFF3C0 = cast [4 x f32] f32:2
- 00CFF6C0 = aggregate struct:00CE3890:main__ret (00CFF3C0)
- ret struct:00CE3890:main__ret 00CFF6C0
- }
- }
- }
Add Comment
Please, Sign In to add comment