Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_material.c
| Show First 20 Lines • Show All 491 Lines • ▼ Show 20 Lines | static void compute_sss_translucence_kernel(const GPUSssKernelData *kd, | ||||
| mul_v3_fl(texels[resolution - 2], 0.25f); | mul_v3_fl(texels[resolution - 2], 0.25f); | ||||
| mul_v3_fl(texels[resolution - 3], 0.5f); | mul_v3_fl(texels[resolution - 3], 0.5f); | ||||
| mul_v3_fl(texels[resolution - 4], 0.75f); | mul_v3_fl(texels[resolution - 4], 0.75f); | ||||
| } | } | ||||
| #undef INTEGRAL_RESOLUTION | #undef INTEGRAL_RESOLUTION | ||||
| void GPU_material_sss_profile_create(GPUMaterial *material, | void GPU_material_sss_profile_create(GPUMaterial *material, | ||||
| float radii[3], | float radii[3], | ||||
| short *falloff_type, | const short *falloff_type, | ||||
| float *sharpness) | const float *sharpness) | ||||
| { | { | ||||
| copy_v3_v3(material->sss_radii, radii); | copy_v3_v3(material->sss_radii, radii); | ||||
| material->sss_falloff = (falloff_type) ? *falloff_type : 0.0; | material->sss_falloff = (falloff_type) ? *falloff_type : 0.0; | ||||
| material->sss_sharpness = (sharpness) ? *sharpness : 0.0; | material->sss_sharpness = (sharpness) ? *sharpness : 0.0; | ||||
| material->sss_dirty = true; | material->sss_dirty = true; | ||||
| material->sss_enabled = true; | material->sss_enabled = true; | ||||
| /* Update / Create UBO */ | /* Update / Create UBO */ | ||||
| ▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines | |||||