Skip to content

Commit 2cc0163

Browse files
committed
Remove Out suffix from frag inputs as they no longer make sense in vulkan glsl.
Reverted half-chanced FilterGaussian2d until ready to fully change it.
1 parent b04cf8b commit 2cc0163

532 files changed

Lines changed: 6612 additions & 6878 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.

Nu/Nu.Gaia/Assets/Default/EnvironmentFilter.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ layout(set = 1, binding = 0) uniform textureCube cubeMap;
1515

1616
layout(set = 2, binding = 0) uniform sampler samp;
1717

18-
layout(location = 0) in vec3 positionOut;
18+
layout(location = 0) in vec3 position;
1919

2020
layout(location = 0) out vec4 frag;
2121

@@ -79,7 +79,7 @@ void main()
7979
// compute normal
8080
float roughness = environmentFilter.roughness;
8181
float resolution = environmentFilter.resolution;
82-
vec3 normal = normalize(positionOut);
82+
vec3 normal = normalize(position);
8383

8484
// make the simplifying assumption that v equals r equals the normal
8585
vec3 r = normal;

Nu/Nu.Gaia/Assets/Default/FilterBox1d.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout(set = 0, binding = 0) uniform texture2D inputTexture;
44

55
layout(set = 1, binding = 0) uniform sampler inputSampler;
66

7-
layout(location = 0) in vec2 texCoordsOut;
7+
layout(location = 0) in vec2 texCoords;
88

99
layout(location = 0) out float frag;
1010

@@ -19,7 +19,7 @@ void main()
1919
{
2020
float y = float(j);
2121
vec2 offset = vec2(x, y) * texelSize;
22-
result += texture(sampler2D(inputTexture, inputSampler), texCoordsOut + offset).r;
22+
result += texture(sampler2D(inputTexture, inputSampler), texCoords + offset).r;
2323
}
2424
}
2525
frag = result / 25.0f;

Nu/Nu.Gaia/Assets/Default/FilterFxaa.frag

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ layout(set = 0, binding = 1) uniform texture2D inputTexture;
1212

1313
layout(set = 1, binding = 0) uniform sampler inputSampler;
1414

15-
layout(location = 0) in vec2 texCoordsOut;
15+
layout(location = 0) in vec2 texCoords;
1616

1717
layout(location = 0) out vec4 frag;
1818

@@ -27,11 +27,11 @@ void main()
2727

2828
// compute luminosity values
2929
vec3 lum = vec3(0.299, 0.587, 0.114);
30-
float lumTL = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(-1.0, -1.0) * texelSize + texCoordsOut.xy).xyz);
31-
float lumTR = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(+1.0, -1.0) * texelSize + texCoordsOut.xy).xyz);
32-
float lumBL = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(-1.0, +1.0) * texelSize + texCoordsOut.xy).xyz);
33-
float lumBR = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(+1.0, +1.0) * texelSize + texCoordsOut.xy).xyz);
34-
float lumCC = dot(lum, texture(sampler2D(inputTexture, inputSampler), texCoordsOut.xy).xyz);
30+
float lumTL = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(-1.0, -1.0) * texelSize + texCoords.xy).xyz);
31+
float lumTR = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(+1.0, -1.0) * texelSize + texCoords.xy).xyz);
32+
float lumBL = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(-1.0, +1.0) * texelSize + texCoords.xy).xyz);
33+
float lumBR = dot(lum, texture(sampler2D(inputTexture, inputSampler), vec2(+1.0, +1.0) * texelSize + texCoords.xy).xyz);
34+
float lumCC = dot(lum, texture(sampler2D(inputTexture, inputSampler), texCoords.xy).xyz);
3535

3636
// compute blur direction
3737
vec2 dir;
@@ -43,13 +43,13 @@ void main()
4343

4444
// sample the texture in two locations along the computed direction to create an initial blurred color
4545
vec3 result1 = 0.5 * (
46-
texture(sampler2D(inputTexture, inputSampler), dir * vec2(1.0 / 3.0 - 0.5) + texCoordsOut.xy).xyz +
47-
texture(sampler2D(inputTexture, inputSampler), dir * vec2(2.0 / 3.0 - 0.5) + texCoordsOut.xy).xyz);
46+
texture(sampler2D(inputTexture, inputSampler), dir * vec2(1.0 / 3.0 - 0.5) + texCoords.xy).xyz +
47+
texture(sampler2D(inputTexture, inputSampler), dir * vec2(2.0 / 3.0 - 0.5) + texCoords.xy).xyz);
4848

4949
// sample the texture at additional points and blend them with the initial blur to refine the result
5050
vec3 result2 = result1 * 0.5 + 0.25 * (
51-
texture(sampler2D(inputTexture, inputSampler), dir * vec2(0.0 / 3.0 - 0.5) + texCoordsOut.xy).xyz +
52-
texture(sampler2D(inputTexture, inputSampler), dir * vec2(3.0 / 3.0 - 0.5) + texCoordsOut.xy).xyz);
51+
texture(sampler2D(inputTexture, inputSampler), dir * vec2(0.0 / 3.0 - 0.5) + texCoords.xy).xyz +
52+
texture(sampler2D(inputTexture, inputSampler), dir * vec2(3.0 / 3.0 - 0.5) + texCoords.xy).xyz);
5353

5454
// compute the minimum and maximum luminosity of the surrounding texels to use for edge detection
5555
float lumMin = min(lumCC, min(min(lumTL, lumTR), min(lumBL, lumBR)));

Nu/Nu.Gaia/Assets/Default/FilterGammaCorrection.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ layout(set = 0, binding = 0) uniform texture2D inputTexture;
66

77
layout(set = 1, binding = 0) uniform sampler inputSampler;
88

9-
layout(location = 0) in vec2 texCoordsOut;
9+
layout(location = 0) in vec2 texCoords;
1010

1111
layout(location = 0) out vec4 frag;
1212

1313
void main()
1414
{
15-
vec3 color = texture(sampler2D(inputTexture, inputSampler), texCoordsOut, 0).rgb;
15+
vec3 color = texture(sampler2D(inputTexture, inputSampler), texCoords, 0).rgb;
1616
color = pow(color, vec3(1.0 / GAMMA));
1717
frag = vec4(color, 1.0);
1818
}
File renamed without changes.

Nu/Nu.Gaia/Assets/Default/FilterGaussian2d.vert

Lines changed: 0 additions & 12 deletions
This file was deleted.

Nu/Nu.Gaia/Assets/Default/FilterGaussianEsm.frag

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ layout(set = 1, binding = 0) uniform texture2D esmTexture;
1212

1313
layout(set = 2, binding = 0) uniform sampler filteredSampler;
1414

15-
layout(location = 0) in vec2 texCoordsOut;
15+
layout(location = 0) in vec2 texCoords;
1616

1717
layout(location = 0) out vec2 frag;
1818

@@ -22,9 +22,9 @@ void main()
2222
gaussianEsm.scale *
2323
gaussianEsm.radius;
2424
frag =
25-
texture(sampler2D(esmTexture, filteredSampler), texCoordsOut + vec2(-2.0) * scalar).xy * (1.0 / 16.0) +
26-
texture(sampler2D(esmTexture, filteredSampler), texCoordsOut + vec2(-1.0) * scalar).xy * (4.0 / 16.0) +
27-
texture(sampler2D(esmTexture, filteredSampler), texCoordsOut + vec2( 0.0) * scalar).xy * (6.0 / 16.0) +
28-
texture(sampler2D(esmTexture, filteredSampler), texCoordsOut + vec2( 1.0) * scalar).xy * (4.0 / 16.0) +
29-
texture(sampler2D(esmTexture, filteredSampler), texCoordsOut + vec2( 2.0) * scalar).xy * (1.0 / 16.0);
25+
texture(sampler2D(esmTexture, filteredSampler), texCoords + vec2(-2.0) * scalar).xy * (1.0 / 16.0) +
26+
texture(sampler2D(esmTexture, filteredSampler), texCoords + vec2(-1.0) * scalar).xy * (4.0 / 16.0) +
27+
texture(sampler2D(esmTexture, filteredSampler), texCoords + vec2( 0.0) * scalar).xy * (6.0 / 16.0) +
28+
texture(sampler2D(esmTexture, filteredSampler), texCoords + vec2( 1.0) * scalar).xy * (4.0 / 16.0) +
29+
texture(sampler2D(esmTexture, filteredSampler), texCoords + vec2( 2.0) * scalar).xy * (1.0 / 16.0);
3030
}

Nu/Nu.Gaia/Assets/Default/FilterToneMapping.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ layout(set = 0, binding = 1) uniform texture2D inputTexture;
1616

1717
layout(set = 1, binding = 0) uniform sampler inputSampler;
1818

19-
layout(location = 0) in vec2 texCoordsOut;
19+
layout(location = 0) in vec2 texCoords;
2020

2121
layout(location = 0) out vec4 frag;
2222

@@ -216,7 +216,7 @@ vec3 applyKronosNeutralToneMap(vec3 color)
216216
void main()
217217
{
218218
// apply tone mapping
219-
vec3 color = texture(sampler2D(inputTexture, inputSampler), texCoordsOut, 0).xyz;
219+
vec3 color = texture(sampler2D(inputTexture, inputSampler), texCoords, 0).xyz;
220220
switch (toneMapping.toneMapType)
221221
{
222222
case 0: color = applyAgXToneMap(color * toneMapping.lightExposure, toneMapping.toneMapSlope, toneMapping.toneMapOffset, toneMapping.toneMapPower, toneMapping.toneMapSaturation); break;

Nu/Nu.Gaia/Assets/Default/Irradiance.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ layout(set = 1, binding = 0) uniform textureCube cubeMap;
77

88
layout(set = 2, binding = 0) uniform sampler samp;
99

10-
layout(location = 0) in vec3 positionOut;
10+
layout(location = 0) in vec3 position;
1111

1212
layout(location = 0) out vec4 frag;
1313

1414
void main()
1515
{
1616
// compute normal
17-
vec3 normal = normalize(positionOut);
17+
vec3 normal = normalize(position);
1818

1919
// calculate tangent space
2020
vec3 up = vec3(0.0, 1.0, 0.0);

Nu/Nu.Gaia/Assets/Default/PhysicallyBasedDeferredAmbient.frag

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ layout(set = 0, binding = 4) uniform texture2D lightMappingTexture;
2929

3030
layout(set = 1, binding = 0) uniform sampler colorSampler;
3131

32-
layout(location = 0) in vec2 texCoordsOut;
32+
layout(location = 0) in vec2 texCoords;
3333

3434
layout(location = 0) out vec4 frag;
3535

@@ -44,14 +44,14 @@ vec4 depthToPosition(float depth, vec2 texCoords)
4444
void main()
4545
{
4646
// ensure fragment was written
47-
float depth = texture(sampler2D(depthTexture, colorSampler), texCoordsOut).r;
47+
float depth = texture(sampler2D(depthTexture, colorSampler), texCoords).r;
4848
if (depth == 0.0) discard;
4949

5050
// recover position from depth
51-
vec4 position = depthToPosition(depth, texCoordsOut);
51+
vec4 position = depthToPosition(depth, texCoords);
5252

5353
// retrieve light mapping data
54-
vec4 lmData = texture(sampler2D(lightMappingTexture, colorSampler), texCoordsOut);
54+
vec4 lmData = texture(sampler2D(lightMappingTexture, colorSampler), texCoords);
5555
int lm1 = int(lmData.r) - 1;
5656
int lm2 = int(lmData.g) - 1;
5757
float lmRatio = lmData.b;

0 commit comments

Comments
 (0)