SSAO, performance sucks and it flickers so tweaking is needed, also more material support
This commit is contained in:
parent
5b231d6920
commit
577836a03f
39 changed files with 889 additions and 74 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#version 450
|
||||
|
||||
const int MAX_TEXTURES = 256;
|
||||
const int MAX_TEXTURES = 512;
|
||||
|
||||
layout(location = 0) in vec4 inPos;
|
||||
layout(location = 1) in vec3 inNormal;
|
||||
|
|
@ -44,7 +44,12 @@ layout(push_constant) uniform pc{
|
|||
void main()
|
||||
{
|
||||
|
||||
|
||||
Material material = matUniform.materials[inMaterialIdx];
|
||||
int textureIndex = int(material.textureIdx);
|
||||
if (textureIndex >= MAX_TEXTURES){
|
||||
outAlbedo = vec4(0.0,0.0,1.0,1.0);
|
||||
return;
|
||||
}
|
||||
Material material = matUniform.materials[push_constants.materialIdx];
|
||||
if(material.hasTexture == 1){
|
||||
vec4 texColor = texture(textSampler[material.textureIdx],inTextCoords);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue