Differential D13910 Diff 47374 source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl
| Show All 19 Lines | bool node_tex_tile_lookup(inout vec3 co, sampler2DArray ima, sampler1DArray map) | ||||
| } | } | ||||
| vec4 tile_info = texelFetch(map, ivec2(tile, 1), 0); | vec4 tile_info = texelFetch(map, ivec2(tile, 1), 0); | ||||
| co = vec3(((co.xy - tile_pos) * tile_info.zw) + tile_info.xy, tile_layer); | co = vec3(((co.xy - tile_pos) * tile_info.zw) + tile_info.xy, tile_layer); | ||||
| return true; | return true; | ||||
| } | } | ||||
| #ifndef WORKBENCH_SHADER_SHARED_H | |||||
| uniform sampler2DArray imageTileArray; | |||||
| uniform sampler1DArray imageTileData; | |||||
| uniform sampler2D imageTexture; | |||||
| uniform float imageTransparencyCutoff = 0.1; | |||||
| uniform bool imagePremult; | |||||
| #endif | |||||
| vec3 workbench_image_color(vec2 uvs) | vec3 workbench_image_color(vec2 uvs) | ||||
| { | { | ||||
| #ifdef V3D_SHADING_TEXTURE_COLOR | #ifdef V3D_SHADING_TEXTURE_COLOR | ||||
| vec4 color; | vec4 color; | ||||
| # ifdef TEXTURE_IMAGE_ARRAY | # ifdef TEXTURE_IMAGE_ARRAY | ||||
| vec3 co = vec3(uvs, 0.0); | vec3 co = vec3(uvs, 0.0); | ||||
| if (node_tex_tile_lookup(co, imageTileArray, imageTileData)) { | if (node_tex_tile_lookup(co, imageTileArray, imageTileData)) { | ||||
| Show All 27 Lines | |||||