This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/engines/eevee/shaders/shadow_process_geom.glsl
Clément Foucault 942a748d5d Eevee: Merge shadow map processing into one drawcall per light
This removes a lot of framebuffer configuration and binding.
2019-06-04 18:42:50 +02:00

37 lines
674 B
GLSL

layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;
layout(std140) uniform shadow_render_block
{
/* Use vectors to avoid alignement padding. */
ivec4 shadowSampleCount;
vec4 shadowInvSampleCount;
vec4 filterSize;
int viewCount;
int baseId;
float cubeTexelSize;
float storedTexelSize;
float nearClip;
float farClip;
float exponent;
};
in int layerID_g[];
flat out int layerID;
void main()
{
gl_Layer = layerID_g[0];
layerID = gl_Layer - baseId;
gl_Position = gl_in[0].gl_Position;
EmitVertex();
gl_Position = gl_in[1].gl_Position;
EmitVertex();
gl_Position = gl_in[2].gl_Position;
EmitVertex();
EndPrimitive();
}