HDR, Bloom and SSR
This commit is contained in:
parent
577836a03f
commit
04befce27d
44 changed files with 1377 additions and 269 deletions
|
|
@ -26,7 +26,8 @@ layout(set = 0, binding = 3) uniform sampler2D pbrSampler;
|
|||
layout(set = 0, binding = 4) uniform sampler2D emissiveSampler;
|
||||
layout(set = 0, binding = 5) uniform sampler2D TranslucencySampler;
|
||||
layout(set = 0, binding = 6) uniform sampler2D OpacitySampler;
|
||||
layout(set = 0, binding = 7) uniform sampler2D ssaoBlur;
|
||||
layout(set = 0, binding = 7) uniform sampler2D ViewPos;
|
||||
layout(set = 0, binding = 8) uniform sampler2D ssaoBlur;
|
||||
|
||||
layout(scalar, set = 1, binding = 0) readonly buffer Lights {
|
||||
Light lights[];
|
||||
|
|
@ -128,17 +129,18 @@ vec3 calculateDirectionalLight(Light light, vec3 V, vec3 N, vec3 F0, vec3 albedo
|
|||
|
||||
void main() {
|
||||
vec3 albedo = texture(albedoSampler, inTextCoord).rgb;
|
||||
vec3 normal = texture(normalsSampler, inTextCoord).rgb;
|
||||
vec4 normalW = texture(normalsSampler, inTextCoord);
|
||||
vec3 normal = normalW.rgb;
|
||||
vec3 viewPos = texture(ViewPos, inTextCoord).rgb;
|
||||
vec3 worldPos = texture(posSampler, inTextCoord).rgb;
|
||||
vec3 pbr = texture(pbrSampler, inTextCoord).rgb;
|
||||
vec4 pbr = texture(pbrSampler, inTextCoord);
|
||||
vec3 emissive = texture(emissiveSampler, inTextCoord).rgb;
|
||||
vec3 translucency = texture(TranslucencySampler, inTextCoord).rgb;
|
||||
float emissiveness = emissive.r;
|
||||
|
||||
// outFragColor = vec4(vec3(texture(ssaoBlur, inTextCoord).r), 1);
|
||||
// return;
|
||||
|
||||
float ssao = texture(ssaoBlur, inTextCoord).r;
|
||||
outFragColor = vec4(vec3(normalW.a/2.0,normalW.a/2.0,normalW.a/2.0), 1);
|
||||
return;
|
||||
|
||||
float roughness = pbr.g;
|
||||
float metallic = pbr.b;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue