diff options
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl index b5f95f2dcf8..94e41b4bcd4 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl @@ -2,7 +2,12 @@ uniform vec4 materialColorAndMetal; uniform float materialRoughness; +#ifdef TEXTURE_IMAGE_ARRAY +uniform sampler2DArray image_tile_array; +uniform sampler1DArray image_tile_data; +#else uniform sampler2D image; +#endif uniform float ImageTransparencyCutoff = 0.1; uniform bool imageNearest; uniform bool imagePremultiplied; @@ -39,7 +44,12 @@ void main() vec4 color; # if defined(V3D_SHADING_TEXTURE_COLOR) +# ifdef TEXTURE_IMAGE_ARRAY + color = workbench_sample_texture_array( + image_tile_array, image_tile_data, uv_interp, imageNearest, imagePremultiplied); +# else color = workbench_sample_texture(image, uv_interp, imageNearest, imagePremultiplied); +# endif if (color.a < ImageTransparencyCutoff) { discard; } |