9 #ifndef USE_GPU_SHADER_CREATE_INFO
21 using draw::Framebuffer;
22 using draw::SwapChain;
24 using draw::TextureFromPool;
28 #define UBO_MIN_MAX_SUPPORTED_SIZE 1 << 14
35 SAMPLING_FILTER_U = 0u,
36 SAMPLING_FILTER_V = 1u,
40 SAMPLING_SHADOW_U = 5u,
41 SAMPLING_SHADOW_V = 6u,
42 SAMPLING_SHADOW_W = 7u,
43 SAMPLING_SHADOW_X = 8u,
44 SAMPLING_SHADOW_Y = 9u,
45 SAMPLING_CLOSURE = 10u,
46 SAMPLING_LIGHTPROBE = 11u,
47 SAMPLING_TRANSPARENCY = 12u,
50 SAMPLING_RAYTRACE_U = 15u,
51 SAMPLING_RAYTRACE_V = 16u,
52 SAMPLING_RAYTRACE_W = 17u,
53 SAMPLING_RAYTRACE_X = 18u
60 #define SAMPLING_DIMENSION_COUNT 20
70 static inline
int sampling_web_sample_count_get(
int web_density,
int ring_count)
72 return ((ring_count * ring_count + ring_count) / 2) * web_density + 1;
76 static inline int sampling_web_ring_count_get(
int web_density,
int sample_count)
79 float x = 2.0f * (
float(sample_count) - 1.0f) /
float(web_density);
81 float discriminant = 1.0f + 4.0f *
x;
82 return int(
ceilf(0.5f * (
sqrtf(discriminant) - 1.0f)));
94 CAMERA_PANO_EQUIRECT = 2u,
95 CAMERA_PANO_EQUISOLID = 3u,
96 CAMERA_PANO_EQUIDISTANT = 4u,
97 CAMERA_PANO_MIRROR = 5u
100 static inline bool is_panoramic(eCameraType
type)
102 return type > CAMERA_ORTHO;
118 float2 equirect_scale_inv;
142 #define FILM_PRECOMP_SAMPLE_MAX 16
148 float weight_sum_inv;
171 bool1 use_reprojection;
175 bool1 any_render_pass_1;
176 bool1 any_render_pass_2;
178 float background_opacity;
181 int color_len, value_len;
186 int diffuse_light_id;
187 int diffuse_color_id;
188 int specular_light_id;
189 int specular_color_id;
194 int ambient_occlusion_id;
201 bool1 display_is_value;
205 int aov_color_id, aov_color_len;
206 int aov_value_id, aov_value_len;
208 float mist_scale, mist_bias, mist_exponent;
210 float exposure_scale;
218 float samples_weight_total;
223 static inline
float film_filter_weight(
float filter_radius,
float sample_distance_sqr)
227 float r = sample_distance_sqr / (filter_radius * filter_radius);
228 const float sigma = 0.284;
229 const float fac = -0.5 / (sigma * sigma);
230 float weight =
expf(fac *
r);
233 float r = M_2PI *
saturate(0.5 +
sqrtf(sample_distance_sqr) / (2.0 * filter_radius));
234 float weight = 0.35875 - 0.48829 *
cosf(
r) + 0.14128 *
cosf(2.0 *
r) - 0.01168 *
cosf(3.0 *
r);
260 bool1 display_is_value;
270 #define VELOCITY_INVALID 512.0
278 struct VelocityObjectIndex {
285 VelocityObjectIndex() : ofs(-1, -1, -1), resource_id(-1){};
290 struct VelocityGeometryIndex {
301 VelocityGeometryIndex() : ofs(-1, -1, -1), do_deform(false),
len(-1, -1, -1), _pad0(1){};
307 VelocityObjectIndex obj;
308 VelocityGeometryIndex geo;
320 CLOSURE_DIFFUSE = (1u << 0u),
321 CLOSURE_SSS = (1u << 1u),
322 CLOSURE_REFLECTION = (1u << 2u),
323 CLOSURE_REFRACTION = (1u << 3u),
325 CLOSURE_TRANSPARENCY = (1u << 8u),
326 CLOSURE_EMISSION = (1u << 9u),
327 CLOSURE_HOLDOUT = (1u << 10u),
328 CLOSURE_VOLUME = (1u << 11u),
329 CLOSURE_AMBIENT_OCCLUSION = (1u << 12u),
338 #define UTIL_TEX_SIZE 64
339 #define UTIL_BTDF_LAYER_COUNT 16
342 #define UTIL_TEX_UV_SCALE ((UTIL_TEX_SIZE - 1.0f) / UTIL_TEX_SIZE)
343 #define UTIL_TEX_UV_BIAS (0.5f / UTIL_TEX_SIZE)
345 #define UTIL_BLUE_NOISE_LAYER 0
346 #define UTIL_LTC_MAT_LAYER 1
347 #define UTIL_LTC_MAG_LAYER 2
348 #define UTIL_BSDF_LAYER 2
349 #define UTIL_BTDF_LAYER 3
350 #define UTIL_DISK_INTEGRAL_LAYER 3
351 #define UTIL_DISK_INTEGRAL_COMP 2
355 float4 utility_tx_fetch(sampler2DArray util_tx,
float2 texel,
float layer)
361 float4 utility_tx_sample(sampler2DArray util_tx,
float2 uv,
float layer)
363 return textureLod(util_tx,
float3(uv, layer), 0.0);
371 using AOVsInfoDataBuf = draw::StorageBuffer<AOVsInfoData>;
372 using CameraDataBuf = draw::UniformBuffer<CameraData>;
373 using FilmDataBuf = draw::UniformBuffer<FilmData>;
374 using SamplingDataBuf = draw::StorageBuffer<SamplingData>;
375 using VelocityGeometryBuf = draw::StorageArrayBuffer<float4, 16, true>;
376 using VelocityIndexBuf = draw::StorageArrayBuffer<VelocityIndex, 16>;
377 using VelocityObjectBuf = draw::StorageArrayBuffer<float4x4, 16>;
typedef float(TangentPoint)[2]
#define BLI_STATIC_ASSERT_ALIGN(st, align)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Texture
aov_color_img AOVsInfoData
#define FILM_PRECOMP_SAMPLE_MAX
#define SAMPLING_DIMENSION_COUNT
Frequency::PASS Frequency::PASS VelocityIndex
smooth(Type::VEC3, "prev") .smooth(Type CameraData
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_device_inline float3 saturate(float3 a)
vec_base< float, 3 > float3
vec_base< float, 4 > float4
vec_base< int32_t, 3 > int3
vec_base< int32_t, 2 > int2
StrongAnonymousAttributeID normal_id