mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 09:21:30 +11:00
Use #include in crt/ shaders.
This commit is contained in:
parent
1d33c8decb
commit
7ea771e71f
6
crt/common.inc
Normal file
6
crt/common.inc
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
layout(std140, set = 0, binding = 1) uniform UBO
|
||||||
|
{
|
||||||
|
mat4 MVP;
|
||||||
|
vec4 SourceSize;
|
||||||
|
} global;
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
layout(std140, set = 0, binding = 0) uniform UBO
|
#include "common.inc"
|
||||||
{
|
|
||||||
mat4 MVP;
|
|
||||||
vec4 OutputSize;
|
|
||||||
vec4 OriginalSize;
|
|
||||||
vec4 SourceSize;
|
|
||||||
} global;
|
|
||||||
|
|
||||||
#pragma stage vertex
|
#pragma stage vertex
|
||||||
layout(location = 0) in vec4 Position;
|
layout(location = 0) in vec4 Position;
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
layout(std140, set = 0, binding = 0) uniform UBO
|
#include "common.inc"
|
||||||
{
|
|
||||||
mat4 MVP;
|
|
||||||
vec4 OutputSize;
|
|
||||||
vec4 OriginalSize;
|
|
||||||
vec4 SourceSize;
|
|
||||||
} global;
|
|
||||||
|
|
||||||
#pragma stage vertex
|
#pragma stage vertex
|
||||||
layout(location = 0) in vec4 Position;
|
layout(location = 0) in vec4 Position;
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
layout(std140, set = 0, binding = 0) uniform UBO
|
#include "common.inc"
|
||||||
{
|
|
||||||
mat4 MVP;
|
|
||||||
vec4 OutputSize;
|
|
||||||
vec4 OriginalSize;
|
|
||||||
vec4 SourceSize;
|
|
||||||
} global;
|
|
||||||
|
|
||||||
#pragma stage vertex
|
#pragma stage vertex
|
||||||
layout(location = 0) in vec4 Position;
|
layout(location = 0) in vec4 Position;
|
||||||
|
@ -22,7 +16,7 @@ void main()
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
layout(location = 0) in vec2 vTexCoord;
|
layout(location = 0) in vec2 vTexCoord;
|
||||||
layout(location = 0) out vec4 FragColor;
|
layout(location = 0) out vec4 FragColor;
|
||||||
layout(set = 0, binding = 2) uniform sampler2D Source;
|
layout(set = 0, binding = 0) uniform sampler2D Source;
|
||||||
|
|
||||||
#define PI 3.1415926535
|
#define PI 3.1415926535
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue