HDR, Bloom and SSR

This commit is contained in:
Halbear 2026-09-04 00:23:48 +01:00
parent 577836a03f
commit 04befce27d
44 changed files with 1377 additions and 269 deletions

View file

@ -8,8 +8,10 @@ layout(location = 1) in vec3 inNormal;
layout(location = 2) in vec3 inTangent;
layout(location = 3) in vec3 inBitangent;
layout(location = 4) in vec2 inTextCoords;
layout(location = 5) in mat4 viewMatrix;
layout(location = 0) out vec4 outAlbedo;
layout(location = 1) out vec4 outViewPos;
struct Material {
vec4 diffuseColor; //16
@ -30,6 +32,10 @@ struct Material {
uint hasOpacityMap; //88
uint OpacityMapIdx; //92
float OpacityFactor; //96
float reflectiveness; //100
float refractiveness; //104
float Padding1; //108
float Padding2; //112
};
layout(set = 2, binding = 0) readonly buffer MaterialUniform{
@ -44,6 +50,9 @@ layout(push_constant) uniform pc{
void main()
{
vec4 viewPos = vec4(viewMatrix * inPos);
outViewPos = viewPos;
Material material = matUniform.materials[push_constants.materialIdx];
int textureIndex = int(material.textureIdx);
if (textureIndex >= MAX_TEXTURES){