I am experiencing some very strange bugs while trying to use gl_ViewID_OVR in an opengl es 3 fragment shader.
As soon as I use more than one input (in) and gl_ViewID_OVR in the fragment shader the glLinkProgram() function simply deadlocks !?!
10-15-2017 07:19 AM
10-15-2017 09:02 PM
10-15-2017 09:05 PM
In this mode there are several restrictions:
- in vertex shader gl_Position is the only output that can depend on
gl_ViewID_OVR (see Section 7.1 of the OpenGL ES Shading Language
specification)
10-16-2017 03:24 AM
This extension relaxes the restriction in OVR_multiview that only gl_Position
can depend on ViewID in the vertex shader. With this change, view-dependent
outputs like reflection vectors and similar are allowed.
(6) Is gl_ViewID_OVR visible at every pipeline stage?
Resolved: To make integration simple for app developers, the intent is for
gl_ViewID_OVR to be visible as a built-in at each programmable pipeline stage.
For non-VTG stages (eg compute and fragment) which don't have a
gl_Position output variable this means that no outputs can depend
on the gl_VIewID_OVR. It is still possible that shader side effects
(such as image or buffer stores) could be view-dependent.
...
flat out float V_VIEW_ID;
....
void main() {
...
V_VIEW_ID = (float(VIEW_ID) > 0.5 ? 1.0 : 0.0);
...
}
In fragment shader:...
flat in float V_VIEW_ID;
...
void main() {
...
int VIEW_ID = V_VIEW_ID > 0.5 ? 1 : 0;
...
}
The thing is: At least some of this does not work as intended. I was hoping some Oculus guy could maybe look over this.
10-17-2017 02:26 PM
10-18-2017 01:50 AM
01-23-2019 06:08 PM