Standard.Shader.MergeScenes.merge_scenes.frag Maven / Gradle / Ivy
#version 450
#extension GL_ARB_separate_shader_objects:enable
const int MAX_NUM_SCENES=8;
layout(set=0,binding=0) uniform texture2D albedoTextures[MAX_NUM_SCENES];
layout(set=0,binding=1) uniform texture2D depthTextures[MAX_NUM_SCENES];
layout(set=0,binding=2) uniform texture2D positionTextures[MAX_NUM_SCENES];
layout(set=0,binding=3) uniform texture2D normalTextures[MAX_NUM_SCENES];
layout(set=0,binding=4) uniform texture2D stencilTextures[MAX_NUM_SCENES];
layout(set=1,binding=0) uniform sampler textureSampler;
layout(set=2,binding=0) uniform MergeScenesInfoUBO{
int numScenes;
}mergeScenesInfo;
layout(location=0) in vec2 fragTexCoords;
layout(location=0) out vec4 outAlbedo;
layout(location=1) out vec4 outDepth;
layout(location=2) out vec4 outPosition;
layout(location=3) out vec4 outNormal;
layout(location=4) out vec4 outStencil;
void main(){
vec4 curAlbedo=vec4(0.0);
float curDepth=1.0;
vec3 curPosition=vec3(0.0);
vec3 curNormal=vec3(0.0);
float curStencil=1.0;
for(int i=0;i