Skip to content

Commit 407635f

Browse files
committed
Propagated assets.
1 parent f655b5c commit 407635f

54 files changed

Lines changed: 666 additions & 594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#version 450 core
2+
3+
struct ChromaticAberrationStruct
4+
{
5+
vec3 channelOffsets;
6+
vec2 focalPoint;
7+
};
8+
9+
layout(set = 0, binding = 0) uniform ChromaticAberrationUniform { ChromaticAberrationStruct chromaticAberration; };
10+
layout(set = 0, binding = 1) uniform texture2D inputTexture;
11+
12+
layout(set = 1, binding = 0) uniform sampler inputSampler;
13+
14+
layout(location = 0) in vec2 texCoordsOut;
15+
16+
layout(location = 0) out vec4 frag;
17+
18+
void main()
19+
{
20+
vec2 direction = texCoordsOut - (chromaticAberration.focalPoint + vec2(0.5));
21+
frag = texture(sampler2D(inputTexture, inputSampler), texCoordsOut);
22+
frag.r = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.r)).r;
23+
frag.g = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.g)).g;
24+
frag.b = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.b)).b;
25+
}

Nu/Nu.Pipe/Assets/Default/FilterChromaticAberration.glsl

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#version 450 core
2+
3+
layout(location = 0) in vec3 position;
4+
layout(location = 1) in vec2 texCoords;
5+
6+
layout(location = 0) out vec2 texCoordsOut;
7+
8+
void main()
9+
{
10+
texCoordsOut = texCoords;
11+
gl_Position = vec4(position, 1.0);
12+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#version 450 core
2+
3+
struct ChromaticAberrationStruct
4+
{
5+
vec3 channelOffsets;
6+
vec2 focalPoint;
7+
};
8+
9+
layout(set = 0, binding = 0) uniform ChromaticAberrationUniform { ChromaticAberrationStruct chromaticAberration; };
10+
layout(set = 0, binding = 1) uniform texture2D inputTexture;
11+
12+
layout(set = 1, binding = 0) uniform sampler inputSampler;
13+
14+
layout(location = 0) in vec2 texCoordsOut;
15+
16+
layout(location = 0) out vec4 frag;
17+
18+
void main()
19+
{
20+
vec2 direction = texCoordsOut - (chromaticAberration.focalPoint + vec2(0.5));
21+
frag = texture(sampler2D(inputTexture, inputSampler), texCoordsOut);
22+
frag.r = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.r)).r;
23+
frag.g = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.g)).g;
24+
frag.b = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.b)).b;
25+
}

Nu/Nu.Template.ImSim.Empty/Assets/Default/FilterChromaticAberration.glsl

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#version 450 core
2+
3+
layout(location = 0) in vec3 position;
4+
layout(location = 1) in vec2 texCoords;
5+
6+
layout(location = 0) out vec2 texCoordsOut;
7+
8+
void main()
9+
{
10+
texCoordsOut = texCoords;
11+
gl_Position = vec4(position, 1.0);
12+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#version 450 core
2+
3+
struct ChromaticAberrationStruct
4+
{
5+
vec3 channelOffsets;
6+
vec2 focalPoint;
7+
};
8+
9+
layout(set = 0, binding = 0) uniform ChromaticAberrationUniform { ChromaticAberrationStruct chromaticAberration; };
10+
layout(set = 0, binding = 1) uniform texture2D inputTexture;
11+
12+
layout(set = 1, binding = 0) uniform sampler inputSampler;
13+
14+
layout(location = 0) in vec2 texCoordsOut;
15+
16+
layout(location = 0) out vec4 frag;
17+
18+
void main()
19+
{
20+
vec2 direction = texCoordsOut - (chromaticAberration.focalPoint + vec2(0.5));
21+
frag = texture(sampler2D(inputTexture, inputSampler), texCoordsOut);
22+
frag.r = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.r)).r;
23+
frag.g = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.g)).g;
24+
frag.b = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.b)).b;
25+
}

Nu/Nu.Template.ImSim.Game/Assets/Default/FilterChromaticAberration.glsl

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#version 450 core
2+
3+
layout(location = 0) in vec3 position;
4+
layout(location = 1) in vec2 texCoords;
5+
6+
layout(location = 0) out vec2 texCoordsOut;
7+
8+
void main()
9+
{
10+
texCoordsOut = texCoords;
11+
gl_Position = vec4(position, 1.0);
12+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#version 450 core
2+
3+
struct ChromaticAberrationStruct
4+
{
5+
vec3 channelOffsets;
6+
vec2 focalPoint;
7+
};
8+
9+
layout(set = 0, binding = 0) uniform ChromaticAberrationUniform { ChromaticAberrationStruct chromaticAberration; };
10+
layout(set = 0, binding = 1) uniform texture2D inputTexture;
11+
12+
layout(set = 1, binding = 0) uniform sampler inputSampler;
13+
14+
layout(location = 0) in vec2 texCoordsOut;
15+
16+
layout(location = 0) out vec4 frag;
17+
18+
void main()
19+
{
20+
vec2 direction = texCoordsOut - (chromaticAberration.focalPoint + vec2(0.5));
21+
frag = texture(sampler2D(inputTexture, inputSampler), texCoordsOut);
22+
frag.r = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.r)).r;
23+
frag.g = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.g)).g;
24+
frag.b = texture(sampler2D(inputTexture, inputSampler), texCoordsOut + direction * vec2(chromaticAberration.channelOffsets.b)).b;
25+
}

0 commit comments

Comments
 (0)