-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2438 from KhronosGroup/fix-2432
GLSL: Deal with gl_Layer in vert/tese.
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#version 450 | ||
#ifdef GL_ARB_shader_draw_parameters | ||
#extension GL_ARB_shader_draw_parameters : enable | ||
#endif | ||
#extension GL_ARB_shader_viewport_layer_array : require | ||
|
||
#ifdef GL_ARB_shader_draw_parameters | ||
#define SPIRV_Cross_BaseInstance gl_BaseInstanceARB | ||
#else | ||
uniform int SPIRV_Cross_BaseInstance; | ||
#endif | ||
|
||
void main() | ||
{ | ||
gl_Layer = (gl_InstanceID + SPIRV_Cross_BaseInstance); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#version 450 | ||
#extension GL_ARB_shader_viewport_layer_array : require | ||
|
||
void main() | ||
{ | ||
gl_Layer = gl_InstanceIndex; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters