forked from JeanPhilippeKernel/RendererEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added bindless support on imgui_renderer (JeanPhilippeKernel#420)
- Loading branch information
1 parent
adb990c
commit fc9cdf7
Showing
11 changed files
with
105 additions
and
184 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 |
---|---|---|
@@ -1,12 +1,22 @@ | ||
#version 460 core | ||
#extension GL_EXT_nonuniform_qualifier : require | ||
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : enable | ||
|
||
layout(location = 0) out vec4 fColor; | ||
layout(set = 0, binding = 0) uniform sampler2D sTexture; | ||
layout(set = 0, binding = 0) uniform sampler2D TextureArray[]; | ||
|
||
layout(location = 0) in struct | ||
{ | ||
vec4 Color; | ||
vec2 UV; | ||
vec4 TexData; | ||
} In; | ||
|
||
void main() | ||
{ | ||
fColor = In.Color * texture(sTexture, In.UV.st); | ||
uint texId = uint(In.TexData.z); | ||
if (texId < 0xFFFFFFFFu) | ||
{ | ||
vec4 texVal = texture(TextureArray[nonuniformEXT(texId)], In.TexData.xy); | ||
fColor = In.Color * texVal; | ||
} | ||
} |
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
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
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
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
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
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
Oops, something went wrong.