icculus / mojoshader

Use Direct3D shaders with other 3D rendering APIs.
https://icculus.org/mojoshader/
zlib License
122 stars 36 forks source link

Fix matrix members in structs, vpos #9

Closed kg closed 5 years ago

kg commented 5 years ago

Fixes the VPOS shader argument type and fixes structs with matrices in them. Note that GL specifies vpos as starting at 0.5,0.5 for the bottom left, while in XNA it starts as 0,0 at top left. Both are in screen pixels.

flibitijibibo commented 5 years ago

Took care of the matrix part: https://github.com/FNA-XNA/MojoShader/commit/18f9e93ffeb7f34aa9319b781b1b3dddb3200d80

gl_FragCoord is going to have to be a whole separate thing in the form of MOJOSHADER_glViewport, which will affect both that variable as well as gl_Position, in more ways than one. That's for another day though.