diff options
Diffstat (limited to 'source/blender/draw/modes/shaders/object_lightprobe_grid_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_lightprobe_grid_vert.glsl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/draw/modes/shaders/object_lightprobe_grid_vert.glsl b/source/blender/draw/modes/shaders/object_lightprobe_grid_vert.glsl index 144024a7d5d..d27d55c3fd6 100644 --- a/source/blender/draw/modes/shaders/object_lightprobe_grid_vert.glsl +++ b/source/blender/draw/modes/shaders/object_lightprobe_grid_vert.glsl @@ -1,11 +1,18 @@ +uniform mat4 ViewProjectionMatrix; + +uniform float sphere_size; uniform ivec3 grid_resolution; uniform vec3 corner; uniform vec3 increment_x; uniform vec3 increment_y; uniform vec3 increment_z; +uniform vec3 screen_vecs[2]; + +uniform int call_id; /* we don't want the builtin callId which would be 0. */ +uniform int baseId; -flat out int objectId; +flat out uint finalId; void main() { @@ -22,8 +29,7 @@ void main() gl_Position = ViewProjectionMatrix * vec4(ws_cell_location, 1.0); gl_PointSize = 2.0f; - /* ID 0 is nothing (background) */ - objectId = resource_handle + 1; + finalId = uint(baseId + call_id); #ifdef USE_WORLD_CLIP_PLANES world_clip_planes_calc_clip_distance(ws_cell_location); |