-
Notifications
You must be signed in to change notification settings - Fork 862
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 #856 from TiemoJung/texture_upgrade
Pure Texture to Sampled Texture Transform
- Loading branch information
Showing
9 changed files
with
159 additions
and
2 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,38 @@ | ||
spv.texture.sampler.transform.frag | ||
Warning, version 440 is not yet complete; most version-specific features are present, but some are missing. | ||
|
||
// Module Version 10000 | ||
// Generated by (magic number): 80001 | ||
// Id's are bound by 19 | ||
|
||
Capability Shader | ||
1: ExtInstImport "GLSL.std.450" | ||
MemoryModel Logical GLSL450 | ||
EntryPoint Fragment 4 "main" 9 16 | ||
ExecutionMode 4 OriginUpperLeft | ||
Source GLSL 440 | ||
Name 4 "main" | ||
Name 9 "color" | ||
Name 12 "tex" | ||
Name 16 "coord" | ||
Decorate 12(tex) DescriptorSet 0 | ||
2: TypeVoid | ||
3: TypeFunction 2 | ||
6: TypeFloat 32 | ||
7: TypeVector 6(float) 4 | ||
8: TypePointer Output 7(fvec4) | ||
9(color): 8(ptr) Variable Output | ||
10: TypeImage 6(float) 2D sampled format:Unknown | ||
11: TypePointer UniformConstant 10 | ||
12(tex): 11(ptr) Variable UniformConstant | ||
14: TypeVector 6(float) 2 | ||
15: TypePointer Input 14(fvec2) | ||
16(coord): 15(ptr) Variable Input | ||
4(main): 2 Function None 3 | ||
5: Label | ||
13: 10 Load 12(tex) | ||
17: 14(fvec2) Load 16(coord) | ||
18: 7(fvec4) ImageSampleImplicitLod 13 17 | ||
Store 9(color) 18 | ||
Return | ||
FunctionEnd |
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,13 @@ | ||
#version 440 | ||
|
||
uniform sampler smp; | ||
uniform texture2D tex; | ||
|
||
in vec2 coord; | ||
|
||
out vec4 color; | ||
|
||
void main() | ||
{ | ||
color = texture(sampler2D(tex, smp), coord); | ||
} |
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
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