Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-04-10 13:06:17 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-04-10 13:36:32 +0300
commitf2f16a2568c2006b46ba0daa851961355a42f20b (patch)
tree105dd51aacc1d5ca57d9da13bbaad4baf78df7d4 /source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
parent0811d089b4b88ff553b6514771b1e324025e15ad (diff)
Eevee: First Shadows implementation
Using Texture Arrays to store shadow maps so less texture slots are used when shading. This means a large amount of shadows can be supported. Support Projection Shadow Map for sun like in old BI/BGE. Support Cube Shadow Map for Point/Spot/Area lights. the benefit of using it for spot light is that the spot angle does not change shadow resolution (at the cost of more memory used). The implementation of the cubemap sampling is targeted for 3.3 core. We rely on 2D texture arrays to store cubemaps faces and sample the right one manualy. Significant performance improvement can be done using Cubemap Arrays on supported hardware. Shadows are only hardware filtered. Prefiltered shadows and settings comming next.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/shadow_vert.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/shadow_vert.glsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl b/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
new file mode 100644
index 00000000000..1adf2ccfab9
--- /dev/null
+++ b/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
@@ -0,0 +1,11 @@
+
+uniform mat4 ShadowMatrix;
+uniform mat4 ModelMatrix;
+
+in vec3 pos;
+
+out vec4 vPos;
+
+void main() {
+ vPos = ModelMatrix * vec4(pos, 1.0);
+} \ No newline at end of file