Is ViewPosition semantic properly supported in OGSFX shader?

Is ViewPosition semantic properly supported in OGSFX shader?

joey_skeys
Participant Participant
219 Views
0 Replies
Message 1 of 1

Is ViewPosition semantic properly supported in OGSFX shader?

joey_skeys
Participant
Participant

hi guys,

I'm writing a viewport override and want to support all rendering backends.

The shader needs to do some view dependent calculation so I need to get the viewing direction and camera position.

Currently the fx shader for DX11 works fine, but ogsfx shader is not. According to my test, the ViewPosition semantic marked uniform get the value of vec3(0.0, 0.0, 0.0). ViewDirection is fine though.

I've also tried to get these variables from the view matrix(-view[2].xyz for view direction, view[3].xyz for camera position), and seems the view matrix is also not properly setup.

 

Just want to confirm if this is a maya problem or I just continue to debug my shader.

Thanks.

0 Likes
220 Views
0 Replies
Replies (0)