Added runtime mip map generation examples (wip) (refs #178)

This commit is contained in:
saschawillems 2016-08-15 15:17:01 +02:00
parent 2749b846b4
commit 2758c47b86
10 changed files with 1180 additions and 1 deletions

View file

@ -0,0 +1,19 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout (set = 0, binding = 1) uniform texture2D textureColor;
layout (set = 0, binding = 2) uniform sampler samplers[3];
layout (location = 0) in vec2 inUV;
layout (location = 1) in float inLodBias;
layout (location = 2) in float inSamplerIndex;
layout (location = 0) out vec4 outFragColor;
void main()
{
highp int samplerIndex = int(inSamplerIndex);
outFragColor = texture(sampler2D(textureColor, samplers[samplerIndex]), inUV, inLodBias);
}