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-09-30 20:34:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-30 20:37:40 +0300
commit1054f65a29b0b9ee9cf7db8a4036e4a55506ce03 (patch)
treea3976079acd1863d7889ffd02ea3cdad8ec45f27 /source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl
parent8249e1ce5e279b97e60cc847fe715a0e1a58a9f1 (diff)
Object Mode : Add probes data outlines and selectability
This required some small changes to the data display shaders so that they match the way the object mode renders them. Strangely enough, I had to remove the normal attribute from the display code because it was being not bound as soon as I created another rendering call in object mode. The problem may be deeper but I did not have time for this so I derive the normal from the sphere pos.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl
index 3c620982273..a9716332eb5 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_display_vert.glsl
@@ -1,13 +1,17 @@
in vec3 pos;
-uniform mat4 ModelViewProjectionMatrix;
-uniform mat4 ModelMatrix;
+in int probe_id;
+in mat4 probe_mat;
+
+uniform mat4 ViewProjectionMatrix;
out vec3 worldPosition;
+flat out int probeIdx;
void main()
{
- gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- worldPosition = (ModelMatrix * vec4(pos, 1.0)).xyz;
+ gl_Position = ViewProjectionMatrix * probe_mat * vec4(pos, 1.0);
+ worldPosition = (probe_mat * vec4(pos, 1.0)).xyz;
+ probeIdx = probe_id;
} \ No newline at end of file