Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_tex_environment.cc
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | static int node_shader_gpu_tex_environment(GPUMaterial *mat, | ||||
| const char *gpu_fn; | const char *gpu_fn; | ||||
| static const char *names[] = { | static const char *names[] = { | ||||
| "node_tex_image_linear", | "node_tex_image_linear", | ||||
| "node_tex_image_cubic", | "node_tex_image_cubic", | ||||
| }; | }; | ||||
| switch (tex->interpolation) { | switch (tex->interpolation) { | ||||
| case SHD_INTERP_LINEAR: | case IMAGE_TEX_INTERP_LINEAR: | ||||
| gpu_fn = names[0]; | gpu_fn = names[0]; | ||||
| break; | break; | ||||
| case SHD_INTERP_CLOSEST: | case IMAGE_TEX_INTERP_CLOSEST: | ||||
| sampler &= ~(GPU_SAMPLER_FILTER | GPU_SAMPLER_MIPMAP); | sampler &= ~(GPU_SAMPLER_FILTER | GPU_SAMPLER_MIPMAP); | ||||
| gpu_fn = names[0]; | gpu_fn = names[0]; | ||||
| break; | break; | ||||
| default: | default: | ||||
| gpu_fn = names[1]; | gpu_fn = names[1]; | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||