Images: add mirror extension type
This adds a new mirror image extension type for shaders and geometry nodes (next to the existing repeat, extend and clip options). See D16432 for a more detailed explanation of `wrap_mirror`. This also adds a new sampler flag `GPU_SAMPLER_MIRROR_REPEAT`. It acts as a modifier to `GPU_SAMPLER_REPEAT`, so any `REPEAT` flag must be set for the `MIRROR` flag to have an effect. Differential Revision: https://developer.blender.org/D16432
This commit is contained in:
@@ -952,6 +952,9 @@ void CUDADevice::tex_alloc(device_texture &mem)
|
||||
case EXTENSION_CLIP:
|
||||
address_mode = CU_TR_ADDRESS_MODE_BORDER;
|
||||
break;
|
||||
case EXTENSION_MIRROR:
|
||||
address_mode = CU_TR_ADDRESS_MODE_MIRROR;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user