Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BLENDER DEBUG OUTPUT.txt
- ---------------------------------------------------------------------------------------------------------------------------------------
- Switching to fully guarded memory allocator.
- Blender 2.80 (sub 58)
- Build: 23/04/2019 20:12 Windows Release
- argv[0] = blender
- argv[1] = --debug
- argv[2] = --python-expr
- argv[3] = import bpy; bpy.ops.wm.sysinfo(filepath=r'C:\Users\Administrator\AppData\Local\Temp\blender\debug_logs\blender_system_info.txt')
- read file C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
- Version 280 sub 57 date 2019-04-17 19:26 hash b46245470f79
- Read prefs: C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
- read file
- Version 280 sub 39 date unknown hash unknown
- AL lib: (EE) UpdateDeviceParams: Failed to set 48000hz, got 192000hz instead
- found bundled python: I:\BlenderUpdater\2.80\python
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- ===== shader string 6 ====
- 15 uniform mat4 ModelViewProjectionMatrix;
- 16 uniform mat4 ModelMatrix;
- 17 uniform mat4 ModelMatrixInverse;
- 18 uniform mat4 ProjectionMatrix;
- 19 uniform mat4 ViewProjectionMatrix;
- 20 uniform mat4 ViewMatrixInverse;
- 21 uniform mat3 NormalMatrix;
- 22
- 23 #ifndef HAIR_SHADER
- 24 in vec3 pos;
- 25 in vec3 nor;
- 26 in vec2 u; /* active texture layer */
- 27 # ifdef V3D_SHADING_VERTEX_COLOR
- 28 in vec3 c; /* active color */
- 29 # endif
- 30 # define uv u
- 31 #else /* HAIR_SHADER */
- 32 # ifdef V3D_SHADING_TEXTURE_COLOR
- 33 uniform samplerBuffer u; /* active texture layer */
- 34 # endif
- 35 flat out float hair_rand;
- 36 #endif /* HAIR_SHADER */
- 37
- 38 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 39 out vec3 normal_viewport;
- 40 #endif
- 41
- 42 #ifdef V3D_SHADING_TEXTURE_COLOR
- 43 out vec2 uv_interp;
- 44 #endif
- 45 #ifdef V3D_SHADING_VERTEX_COLOR
- 46 out vec3 vertexColor;
- 47 #endif
- 48
- 49 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 50 float integer_noise(int n)
- 51 {
- 52 n = (n >> 13) ^ n;
- 53 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 54 return (float(nn) / 1073741824.0);
- 55 }
- 56
- 57 #ifdef V3D_SHADING_VERTEX_COLOR
- 58 vec3 srgb_to_linear_attr(vec3 c)
- 59 {
- 60 c = max(c, vec3(0.0));
- 61 vec3 c1 = c * (1.0 / 12.92);
- 62 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 63 return mix(c1, c2, step(vec3(0.04045), c));
- 64 }
- 65 #endif
- 66
- 67 void main()
- 68 {
- 69 #ifdef HAIR_SHADER
- 70 # ifdef V3D_SHADING_TEXTURE_COLOR
- 71 vec2 uv = hair_get_customdata_vec2(u);
- 72 # endif
- 73 float time, thick_time, thickness;
- 74 vec3 pos, tan, binor;
- 75 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 76 ModelMatrixInverse,
- 77 ViewMatrixInverse[3].xyz,
- 78 ViewMatrixInverse[2].xyz,
- 79 pos,
- 80 tan,
- 81 binor,
- 82 time,
- 83 thickness,
- 84 thick_time);
- 85 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 86 hair_rand = integer_noise(hair_get_strand_id());
- 87 tan = normalize(tan);
- 88 vec3 nor = normalize(cross(binor, tan));
- 89 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 90 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 91 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 92 nor = nor * sin_theta + binor * cos_theta;
- 93 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 94 #else
- 95 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 96 #endif
- 97 #ifdef V3D_SHADING_TEXTURE_COLOR
- 98 uv_interp = uv;
- 99 #endif
- 100
- 101 #ifdef V3D_SHADING_VERTEX_COLOR
- 102 # ifndef HAIR_SHADER
- 103 vertexColor = srgb_to_linear_attr(c);
- 104 # endif
- 105 #endif
- 106
- 107 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 108 normal_viewport = NormalMatrix * nor;
- 109 # ifndef HAIR_SHADER
- 110 normal_viewport = normalize(normal_viewport);
- 111 # endif
- 112 #endif
- 113
- 114 #ifdef USE_WORLD_CLIP_PLANES
- 115 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 116 #endif
- 117 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- 15 #define HAIR_SHADER
- ===== shader string 6 ====
- 16 /**
- 17 * Library to create hairs dynamically from control points.
- 18 * This is less bandwidth intensive than fetching the vertex attributes
- 19 * but does more ALU work per vertex. This also reduce the number
- 20 * of data the CPU has to precompute and transfert for each update.
- 21 */
- 22
- 23 /**
- 24 * hairStrandsRes: Number of points per hair strand.
- 25 * 2 - no subdivision
- 26 * 3+ - 1 or more interpolated points per hair.
- 27 */
- 28 uniform int hairStrandsRes = 8;
- 29
- 30 /**
- 31 * hairThicknessRes : Subdiv around the hair.
- 32 * 1 - Wire Hair: Only one pixel thick, independent of view distance.
- 33 * 2 - Polystrip Hair: Correct width, flat if camera is parallel.
- 34 * 3+ - Cylinder Hair: Massive calculation but potentially perfect. Still need proper support.
- 35 */
- 36 uniform int hairThicknessRes = 1;
- 37
- 38 /* Hair thickness shape. */
- 39 uniform float hairRadRoot = 0.01;
- 40 uniform float hairRadTip = 0.0;
- 41 uniform float hairRadShape = 0.5;
- 42 uniform bool hairCloseTip = true;
- 43
- 44 uniform mat4 hairDupliMatrix;
- 45
- 46 /* -- Per control points -- */
- 47 uniform samplerBuffer hairPointBuffer; /* RGBA32F */
- 48 #define point_position xyz
- 49 #define point_time w /* Position along the hair length */
- 50
- 51 /* -- Per strands data -- */
- 52 uniform usamplerBuffer hairStrandBuffer; /* R32UI */
- 53 uniform usamplerBuffer hairStrandSegBuffer; /* R16UI */
- 54
- 55 /* Not used, use one buffer per uv layer */
- 56 //uniform samplerBuffer hairUVBuffer; /* RG32F */
- 57 //uniform samplerBuffer hairColBuffer; /* RGBA16 linear color */
- 58
- 59 /* -- Subdivision stage -- */
- 60 /**
- 61 * We use a transform feedback to preprocess the strands and add more subdivision to it.
- 62 * For the moment theses are simple smooth interpolation but one could hope to see the full
- 63 * children particle modifiers being evaluated at this stage.
- 64 *
- 65 * If no more subdivision is needed, we can skip this step.
- 66 */
- 67
- 68 #ifdef HAIR_PHASE_SUBDIV
- 69 int hair_get_base_id(float local_time, int strand_segments, out float interp_time)
- 70 {
- 71 float time_per_strand_seg = 1.0 / float(strand_segments);
- 72
- 73 float ratio = local_time / time_per_strand_seg;
- 74 interp_time = fract(ratio);
- 75
- 76 return int(ratio);
- 77 }
- 78
- 79 void hair_get_interp_attrs(
- 80 out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time)
- 81 {
- 82 float local_time = float(gl_VertexID % hairStrandsRes) / float(hairStrandsRes - 1);
- 83
- 84 int hair_id = gl_VertexID / hairStrandsRes;
- 85 int strand_offset = int(texelFetch(hairStrandBuffer, hair_id).x);
- 86 int strand_segments = int(texelFetch(hairStrandSegBuffer, hair_id).x);
- 87
- 88 int id = hair_get_base_id(local_time, strand_segments, interp_time);
- 89
- 90 int ofs_id = id + strand_offset;
- 91
- 92 data0 = texelFetch(hairPointBuffer, ofs_id - 1);
- 93 data1 = texelFetch(hairPointBuffer, ofs_id);
- 94 data2 = texelFetch(hairPointBuffer, ofs_id + 1);
- 95 data3 = texelFetch(hairPointBuffer, ofs_id + 2);
- 96
- 97 if (id <= 0) {
- 98 /* root points. Need to reconstruct previous data. */
- 99 data0 = data1 * 2.0 - data2;
- 100 }
- 101 if (id + 1 >= strand_segments) {
- 102 /* tip points. Need to reconstruct next data. */
- 103 data3 = data2 * 2.0 - data1;
- 104 }
- 105 }
- 106 #endif
- 107
- 108 /* -- Drawing stage -- */
- 109 /**
- 110 * For final drawing, the vertex index and the number of vertex per segment
- 111 */
- 112
- 113 #ifndef HAIR_PHASE_SUBDIV
- 114 int hair_get_strand_id(void)
- 115 {
- 116 return gl_VertexID / (hairStrandsRes * hairThicknessRes);
- 117 }
- 118
- 119 int hair_get_base_id(void)
- 120 {
- 121 return gl_VertexID / hairThicknessRes;
- 122 }
- 123
- 124 /* Copied from cycles. */
- 125 float hair_shaperadius(float shape, float root, float tip, float time)
- 126 {
- 127 float radius = 1.0 - time;
- 128
- 129 if (shape < 0.0) {
- 130 radius = pow(radius, 1.0 + shape);
- 131 }
- 132 else {
- 133 radius = pow(radius, 1.0 / (1.0 - shape));
- 134 }
- 135
- 136 if (hairCloseTip && (time > 0.99)) {
- 137 return 0.0;
- 138 }
- 139
- 140 return (radius * (root - tip)) + tip;
- 141 }
- 142
- 143 # ifdef OS_MAC
- 144 in float dummy;
- 145 # endif
- 146
- 147 void hair_get_pos_tan_binor_time(bool is_persp,
- 148 mat4 invmodel_mat,
- 149 vec3 camera_pos,
- 150 vec3 camera_z,
- 151 out vec3 wpos,
- 152 out vec3 wtan,
- 153 out vec3 wbinor,
- 154 out float time,
- 155 out float thickness,
- 156 out float thick_time)
- 157 {
- 158 int id = hair_get_base_id();
- 159 vec4 data = texelFetch(hairPointBuffer, id);
- 160 wpos = data.point_position;
- 161 time = data.point_time;
- 162
- 163 # ifdef OS_MAC
- 164 /* Generate a dummy read to avoid the driver bug with shaders having no
- 165 * vertex reads on macOS (T60171) */
- 166 wpos.y += dummy * 0.0;
- 167 # endif
- 168
- 169 if (time == 0.0) {
- 170 /* Hair root */
- 171 wtan = texelFetch(hairPointBuffer, id + 1).point_position - wpos;
- 172 }
- 173 else {
- 174 wtan = wpos - texelFetch(hairPointBuffer, id - 1).point_position;
- 175 }
- 176
- 177 wpos = (hairDupliMatrix * vec4(wpos, 1.0)).xyz;
- 178 wtan = mat3(hairDupliMatrix) * wtan;
- 179
- 180 vec3 camera_vec = (is_persp) ? wpos - camera_pos : -camera_z;
- 181 wbinor = normalize(cross(camera_vec, wtan));
- 182
- 183 thickness = hair_shaperadius(hairRadShape, hairRadRoot, hairRadTip, time);
- 184
- 185 if (hairThicknessRes > 1) {
- 186 thick_time = float(gl_VertexID % hairThicknessRes) / float(hairThicknessRes - 1);
- 187 thick_time = thickness * (thick_time * 2.0 - 1.0);
- 188
- 189 /* Take object scale into account.
- 190 * NOTE: This only works fine with uniform scaling. */
- 191 float scale = 1.0 / length(mat3(invmodel_mat) * wbinor);
- 192
- 193 wpos += wbinor * thick_time * scale;
- 194 }
- 195 }
- 196
- 197 vec2 hair_get_customdata_vec2(const samplerBuffer cd_buf)
- 198 {
- 199 int id = hair_get_strand_id();
- 200 return texelFetch(cd_buf, id).rg;
- 201 }
- 202
- 203 vec3 hair_get_customdata_vec3(const samplerBuffer cd_buf)
- 204 {
- 205 int id = hair_get_strand_id();
- 206 return texelFetch(cd_buf, id).rgb;
- 207 }
- 208
- 209 vec4 hair_get_customdata_vec4(const samplerBuffer cd_buf)
- 210 {
- 211 int id = hair_get_strand_id();
- 212 return texelFetch(cd_buf, id).rgba;
- 213 }
- 214
- 215 vec3 hair_get_strand_pos(void)
- 216 {
- 217 int id = hair_get_strand_id() * hairStrandsRes;
- 218 return texelFetch(hairPointBuffer, id).point_position;
- 219 }
- 220
- 221 #endif
- 222 uniform mat4 ModelViewProjectionMatrix;
- 223 uniform mat4 ModelMatrix;
- 224 uniform mat4 ModelMatrixInverse;
- 225 uniform mat4 ProjectionMatrix;
- 226 uniform mat4 ViewProjectionMatrix;
- 227 uniform mat4 ViewMatrixInverse;
- 228 uniform mat3 NormalMatrix;
- 229
- 230 #ifndef HAIR_SHADER
- 231 in vec3 pos;
- 232 in vec3 nor;
- 233 in vec2 u; /* active texture layer */
- 234 # ifdef V3D_SHADING_VERTEX_COLOR
- 235 in vec3 c; /* active color */
- 236 # endif
- 237 # define uv u
- 238 #else /* HAIR_SHADER */
- 239 # ifdef V3D_SHADING_TEXTURE_COLOR
- 240 uniform samplerBuffer u; /* active texture layer */
- 241 # endif
- 242 flat out float hair_rand;
- 243 #endif /* HAIR_SHADER */
- 244
- 245 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 246 out vec3 normal_viewport;
- 247 #endif
- 248
- 249 #ifdef V3D_SHADING_TEXTURE_COLOR
- 250 out vec2 uv_interp;
- 251 #endif
- 252 #ifdef V3D_SHADING_VERTEX_COLOR
- 253 out vec3 vertexColor;
- 254 #endif
- 255
- 256 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 257 float integer_noise(int n)
- 258 {
- 259 n = (n >> 13) ^ n;
- 260 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 261 return (float(nn) / 1073741824.0);
- 262 }
- 263
- 264 #ifdef V3D_SHADING_VERTEX_COLOR
- 265 vec3 srgb_to_linear_attr(vec3 c)
- 266 {
- 267 c = max(c, vec3(0.0));
- 268 vec3 c1 = c * (1.0 / 12.92);
- 269 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 270 return mix(c1, c2, step(vec3(0.04045), c));
- 271 }
- 272 #endif
- 273
- 274 void main()
- 275 {
- 276 #ifdef HAIR_SHADER
- 277 # ifdef V3D_SHADING_TEXTURE_COLOR
- 278 vec2 uv = hair_get_customdata_vec2(u);
- 279 # endif
- 280 float time, thick_time, thickness;
- 281 vec3 pos, tan, binor;
- 282 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 283 ModelMatrixInverse,
- 284 ViewMatrixInverse[3].xyz,
- 285 ViewMatrixInverse[2].xyz,
- 286 pos,
- 287 tan,
- 288 binor,
- 289 time,
- 290 thickness,
- 291 thick_time);
- 292 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 293 hair_rand = integer_noise(hair_get_strand_id());
- 294 tan = normalize(tan);
- 295 vec3 nor = normalize(cross(binor, tan));
- 296 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 297 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 298 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 299 nor = nor * sin_theta + binor * cos_theta;
- 300 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 301 #else
- 302 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 303 #endif
- 304 #ifdef V3D_SHADING_TEXTURE_COLOR
- 305 uv_interp = uv;
- 306 #endif
- 307
- 308 #ifdef V3D_SHADING_VERTEX_COLOR
- 309 # ifndef HAIR_SHADER
- 310 vertexColor = srgb_to_linear_attr(c);
- 311 # endif
- 312 #endif
- 313
- 314 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 315 normal_viewport = NormalMatrix * nor;
- 316 # ifndef HAIR_SHADER
- 317 normal_viewport = normalize(normal_viewport);
- 318 # endif
- 319 #endif
- 320
- 321 #ifdef USE_WORLD_CLIP_PLANES
- 322 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 323 #endif
- 324 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- ===== shader string 6 ====
- 15 uniform mat4 ModelViewProjectionMatrix;
- 16 uniform mat4 ModelMatrix;
- 17 uniform mat4 ModelMatrixInverse;
- 18 uniform mat4 ProjectionMatrix;
- 19 uniform mat4 ViewProjectionMatrix;
- 20 uniform mat4 ViewMatrixInverse;
- 21 uniform mat3 NormalMatrix;
- 22
- 23 #ifndef HAIR_SHADER
- 24 in vec3 pos;
- 25 in vec3 nor;
- 26 in vec2 u; /* active texture layer */
- 27 # ifdef V3D_SHADING_VERTEX_COLOR
- 28 in vec3 c; /* active color */
- 29 # endif
- 30 # define uv u
- 31 #else /* HAIR_SHADER */
- 32 # ifdef V3D_SHADING_TEXTURE_COLOR
- 33 uniform samplerBuffer u; /* active texture layer */
- 34 # endif
- 35 flat out float hair_rand;
- 36 #endif /* HAIR_SHADER */
- 37
- 38 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 39 out vec3 normal_viewport;
- 40 #endif
- 41
- 42 #ifdef V3D_SHADING_TEXTURE_COLOR
- 43 out vec2 uv_interp;
- 44 #endif
- 45 #ifdef V3D_SHADING_VERTEX_COLOR
- 46 out vec3 vertexColor;
- 47 #endif
- 48
- 49 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 50 float integer_noise(int n)
- 51 {
- 52 n = (n >> 13) ^ n;
- 53 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 54 return (float(nn) / 1073741824.0);
- 55 }
- 56
- 57 #ifdef V3D_SHADING_VERTEX_COLOR
- 58 vec3 srgb_to_linear_attr(vec3 c)
- 59 {
- 60 c = max(c, vec3(0.0));
- 61 vec3 c1 = c * (1.0 / 12.92);
- 62 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 63 return mix(c1, c2, step(vec3(0.04045), c));
- 64 }
- 65 #endif
- 66
- 67 void main()
- 68 {
- 69 #ifdef HAIR_SHADER
- 70 # ifdef V3D_SHADING_TEXTURE_COLOR
- 71 vec2 uv = hair_get_customdata_vec2(u);
- 72 # endif
- 73 float time, thick_time, thickness;
- 74 vec3 pos, tan, binor;
- 75 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 76 ModelMatrixInverse,
- 77 ViewMatrixInverse[3].xyz,
- 78 ViewMatrixInverse[2].xyz,
- 79 pos,
- 80 tan,
- 81 binor,
- 82 time,
- 83 thickness,
- 84 thick_time);
- 85 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 86 hair_rand = integer_noise(hair_get_strand_id());
- 87 tan = normalize(tan);
- 88 vec3 nor = normalize(cross(binor, tan));
- 89 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 90 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 91 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 92 nor = nor * sin_theta + binor * cos_theta;
- 93 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 94 #else
- 95 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 96 #endif
- 97 #ifdef V3D_SHADING_TEXTURE_COLOR
- 98 uv_interp = uv;
- 99 #endif
- 100
- 101 #ifdef V3D_SHADING_VERTEX_COLOR
- 102 # ifndef HAIR_SHADER
- 103 vertexColor = srgb_to_linear_attr(c);
- 104 # endif
- 105 #endif
- 106
- 107 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 108 normal_viewport = NormalMatrix * nor;
- 109 # ifndef HAIR_SHADER
- 110 normal_viewport = normalize(normal_viewport);
- 111 # endif
- 112 #endif
- 113
- 114 #ifdef USE_WORLD_CLIP_PLANES
- 115 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 116 #endif
- 117 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- 15 #define HAIR_SHADER
- ===== shader string 6 ====
- 16 /**
- 17 * Library to create hairs dynamically from control points.
- 18 * This is less bandwidth intensive than fetching the vertex attributes
- 19 * but does more ALU work per vertex. This also reduce the number
- 20 * of data the CPU has to precompute and transfert for each update.
- 21 */
- 22
- 23 /**
- 24 * hairStrandsRes: Number of points per hair strand.
- 25 * 2 - no subdivision
- 26 * 3+ - 1 or more interpolated points per hair.
- 27 */
- 28 uniform int hairStrandsRes = 8;
- 29
- 30 /**
- 31 * hairThicknessRes : Subdiv around the hair.
- 32 * 1 - Wire Hair: Only one pixel thick, independent of view distance.
- 33 * 2 - Polystrip Hair: Correct width, flat if camera is parallel.
- 34 * 3+ - Cylinder Hair: Massive calculation but potentially perfect. Still need proper support.
- 35 */
- 36 uniform int hairThicknessRes = 1;
- 37
- 38 /* Hair thickness shape. */
- 39 uniform float hairRadRoot = 0.01;
- 40 uniform float hairRadTip = 0.0;
- 41 uniform float hairRadShape = 0.5;
- 42 uniform bool hairCloseTip = true;
- 43
- 44 uniform mat4 hairDupliMatrix;
- 45
- 46 /* -- Per control points -- */
- 47 uniform samplerBuffer hairPointBuffer; /* RGBA32F */
- 48 #define point_position xyz
- 49 #define point_time w /* Position along the hair length */
- 50
- 51 /* -- Per strands data -- */
- 52 uniform usamplerBuffer hairStrandBuffer; /* R32UI */
- 53 uniform usamplerBuffer hairStrandSegBuffer; /* R16UI */
- 54
- 55 /* Not used, use one buffer per uv layer */
- 56 //uniform samplerBuffer hairUVBuffer; /* RG32F */
- 57 //uniform samplerBuffer hairColBuffer; /* RGBA16 linear color */
- 58
- 59 /* -- Subdivision stage -- */
- 60 /**
- 61 * We use a transform feedback to preprocess the strands and add more subdivision to it.
- 62 * For the moment theses are simple smooth interpolation but one could hope to see the full
- 63 * children particle modifiers being evaluated at this stage.
- 64 *
- 65 * If no more subdivision is needed, we can skip this step.
- 66 */
- 67
- 68 #ifdef HAIR_PHASE_SUBDIV
- 69 int hair_get_base_id(float local_time, int strand_segments, out float interp_time)
- 70 {
- 71 float time_per_strand_seg = 1.0 / float(strand_segments);
- 72
- 73 float ratio = local_time / time_per_strand_seg;
- 74 interp_time = fract(ratio);
- 75
- 76 return int(ratio);
- 77 }
- 78
- 79 void hair_get_interp_attrs(
- 80 out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time)
- 81 {
- 82 float local_time = float(gl_VertexID % hairStrandsRes) / float(hairStrandsRes - 1);
- 83
- 84 int hair_id = gl_VertexID / hairStrandsRes;
- 85 int strand_offset = int(texelFetch(hairStrandBuffer, hair_id).x);
- 86 int strand_segments = int(texelFetch(hairStrandSegBuffer, hair_id).x);
- 87
- 88 int id = hair_get_base_id(local_time, strand_segments, interp_time);
- 89
- 90 int ofs_id = id + strand_offset;
- 91
- 92 data0 = texelFetch(hairPointBuffer, ofs_id - 1);
- 93 data1 = texelFetch(hairPointBuffer, ofs_id);
- 94 data2 = texelFetch(hairPointBuffer, ofs_id + 1);
- 95 data3 = texelFetch(hairPointBuffer, ofs_id + 2);
- 96
- 97 if (id <= 0) {
- 98 /* root points. Need to reconstruct previous data. */
- 99 data0 = data1 * 2.0 - data2;
- 100 }
- 101 if (id + 1 >= strand_segments) {
- 102 /* tip points. Need to reconstruct next data. */
- 103 data3 = data2 * 2.0 - data1;
- 104 }
- 105 }
- 106 #endif
- 107
- 108 /* -- Drawing stage -- */
- 109 /**
- 110 * For final drawing, the vertex index and the number of vertex per segment
- 111 */
- 112
- 113 #ifndef HAIR_PHASE_SUBDIV
- 114 int hair_get_strand_id(void)
- 115 {
- 116 return gl_VertexID / (hairStrandsRes * hairThicknessRes);
- 117 }
- 118
- 119 int hair_get_base_id(void)
- 120 {
- 121 return gl_VertexID / hairThicknessRes;
- 122 }
- 123
- 124 /* Copied from cycles. */
- 125 float hair_shaperadius(float shape, float root, float tip, float time)
- 126 {
- 127 float radius = 1.0 - time;
- 128
- 129 if (shape < 0.0) {
- 130 radius = pow(radius, 1.0 + shape);
- 131 }
- 132 else {
- 133 radius = pow(radius, 1.0 / (1.0 - shape));
- 134 }
- 135
- 136 if (hairCloseTip && (time > 0.99)) {
- 137 return 0.0;
- 138 }
- 139
- 140 return (radius * (root - tip)) + tip;
- 141 }
- 142
- 143 # ifdef OS_MAC
- 144 in float dummy;
- 145 # endif
- 146
- 147 void hair_get_pos_tan_binor_time(bool is_persp,
- 148 mat4 invmodel_mat,
- 149 vec3 camera_pos,
- 150 vec3 camera_z,
- 151 out vec3 wpos,
- 152 out vec3 wtan,
- 153 out vec3 wbinor,
- 154 out float time,
- 155 out float thickness,
- 156 out float thick_time)
- 157 {
- 158 int id = hair_get_base_id();
- 159 vec4 data = texelFetch(hairPointBuffer, id);
- 160 wpos = data.point_position;
- 161 time = data.point_time;
- 162
- 163 # ifdef OS_MAC
- 164 /* Generate a dummy read to avoid the driver bug with shaders having no
- 165 * vertex reads on macOS (T60171) */
- 166 wpos.y += dummy * 0.0;
- 167 # endif
- 168
- 169 if (time == 0.0) {
- 170 /* Hair root */
- 171 wtan = texelFetch(hairPointBuffer, id + 1).point_position - wpos;
- 172 }
- 173 else {
- 174 wtan = wpos - texelFetch(hairPointBuffer, id - 1).point_position;
- 175 }
- 176
- 177 wpos = (hairDupliMatrix * vec4(wpos, 1.0)).xyz;
- 178 wtan = mat3(hairDupliMatrix) * wtan;
- 179
- 180 vec3 camera_vec = (is_persp) ? wpos - camera_pos : -camera_z;
- 181 wbinor = normalize(cross(camera_vec, wtan));
- 182
- 183 thickness = hair_shaperadius(hairRadShape, hairRadRoot, hairRadTip, time);
- 184
- 185 if (hairThicknessRes > 1) {
- 186 thick_time = float(gl_VertexID % hairThicknessRes) / float(hairThicknessRes - 1);
- 187 thick_time = thickness * (thick_time * 2.0 - 1.0);
- 188
- 189 /* Take object scale into account.
- 190 * NOTE: This only works fine with uniform scaling. */
- 191 float scale = 1.0 / length(mat3(invmodel_mat) * wbinor);
- 192
- 193 wpos += wbinor * thick_time * scale;
- 194 }
- 195 }
- 196
- 197 vec2 hair_get_customdata_vec2(const samplerBuffer cd_buf)
- 198 {
- 199 int id = hair_get_strand_id();
- 200 return texelFetch(cd_buf, id).rg;
- 201 }
- 202
- 203 vec3 hair_get_customdata_vec3(const samplerBuffer cd_buf)
- 204 {
- 205 int id = hair_get_strand_id();
- 206 return texelFetch(cd_buf, id).rgb;
- 207 }
- 208
- 209 vec4 hair_get_customdata_vec4(const samplerBuffer cd_buf)
- 210 {
- 211 int id = hair_get_strand_id();
- 212 return texelFetch(cd_buf, id).rgba;
- 213 }
- 214
- 215 vec3 hair_get_strand_pos(void)
- 216 {
- 217 int id = hair_get_strand_id() * hairStrandsRes;
- 218 return texelFetch(hairPointBuffer, id).point_position;
- 219 }
- 220
- 221 #endif
- 222 uniform mat4 ModelViewProjectionMatrix;
- 223 uniform mat4 ModelMatrix;
- 224 uniform mat4 ModelMatrixInverse;
- 225 uniform mat4 ProjectionMatrix;
- 226 uniform mat4 ViewProjectionMatrix;
- 227 uniform mat4 ViewMatrixInverse;
- 228 uniform mat3 NormalMatrix;
- 229
- 230 #ifndef HAIR_SHADER
- 231 in vec3 pos;
- 232 in vec3 nor;
- 233 in vec2 u; /* active texture layer */
- 234 # ifdef V3D_SHADING_VERTEX_COLOR
- 235 in vec3 c; /* active color */
- 236 # endif
- 237 # define uv u
- 238 #else /* HAIR_SHADER */
- 239 # ifdef V3D_SHADING_TEXTURE_COLOR
- 240 uniform samplerBuffer u; /* active texture layer */
- 241 # endif
- 242 flat out float hair_rand;
- 243 #endif /* HAIR_SHADER */
- 244
- 245 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 246 out vec3 normal_viewport;
- 247 #endif
- 248
- 249 #ifdef V3D_SHADING_TEXTURE_COLOR
- 250 out vec2 uv_interp;
- 251 #endif
- 252 #ifdef V3D_SHADING_VERTEX_COLOR
- 253 out vec3 vertexColor;
- 254 #endif
- 255
- 256 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 257 float integer_noise(int n)
- 258 {
- 259 n = (n >> 13) ^ n;
- 260 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 261 return (float(nn) / 1073741824.0);
- 262 }
- 263
- 264 #ifdef V3D_SHADING_VERTEX_COLOR
- 265 vec3 srgb_to_linear_attr(vec3 c)
- 266 {
- 267 c = max(c, vec3(0.0));
- 268 vec3 c1 = c * (1.0 / 12.92);
- 269 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 270 return mix(c1, c2, step(vec3(0.04045), c));
- 271 }
- 272 #endif
- 273
- 274 void main()
- 275 {
- 276 #ifdef HAIR_SHADER
- 277 # ifdef V3D_SHADING_TEXTURE_COLOR
- 278 vec2 uv = hair_get_customdata_vec2(u);
- 279 # endif
- 280 float time, thick_time, thickness;
- 281 vec3 pos, tan, binor;
- 282 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 283 ModelMatrixInverse,
- 284 ViewMatrixInverse[3].xyz,
- 285 ViewMatrixInverse[2].xyz,
- 286 pos,
- 287 tan,
- 288 binor,
- 289 time,
- 290 thickness,
- 291 thick_time);
- 292 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 293 hair_rand = integer_noise(hair_get_strand_id());
- 294 tan = normalize(tan);
- 295 vec3 nor = normalize(cross(binor, tan));
- 296 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 297 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 298 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 299 nor = nor * sin_theta + binor * cos_theta;
- 300 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 301 #else
- 302 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 303 #endif
- 304 #ifdef V3D_SHADING_TEXTURE_COLOR
- 305 uv_interp = uv;
- 306 #endif
- 307
- 308 #ifdef V3D_SHADING_VERTEX_COLOR
- 309 # ifndef HAIR_SHADER
- 310 vertexColor = srgb_to_linear_attr(c);
- 311 # endif
- 312 #endif
- 313
- 314 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 315 normal_viewport = NormalMatrix * nor;
- 316 # ifndef HAIR_SHADER
- 317 normal_viewport = normalize(normal_viewport);
- 318 # endif
- 319 #endif
- 320
- 321 #ifdef USE_WORLD_CLIP_PLANES
- 322 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 323 #endif
- 324 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- ===== shader string 6 ====
- 15 uniform mat4 ModelViewProjectionMatrix;
- 16 uniform mat4 ModelMatrix;
- 17 uniform mat4 ModelMatrixInverse;
- 18 uniform mat4 ProjectionMatrix;
- 19 uniform mat4 ViewProjectionMatrix;
- 20 uniform mat4 ViewMatrixInverse;
- 21 uniform mat3 NormalMatrix;
- 22
- 23 #ifndef HAIR_SHADER
- 24 in vec3 pos;
- 25 in vec3 nor;
- 26 in vec2 u; /* active texture layer */
- 27 # ifdef V3D_SHADING_VERTEX_COLOR
- 28 in vec3 c; /* active color */
- 29 # endif
- 30 # define uv u
- 31 #else /* HAIR_SHADER */
- 32 # ifdef V3D_SHADING_TEXTURE_COLOR
- 33 uniform samplerBuffer u; /* active texture layer */
- 34 # endif
- 35 flat out float hair_rand;
- 36 #endif /* HAIR_SHADER */
- 37
- 38 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 39 out vec3 normal_viewport;
- 40 #endif
- 41
- 42 #ifdef V3D_SHADING_TEXTURE_COLOR
- 43 out vec2 uv_interp;
- 44 #endif
- 45 #ifdef V3D_SHADING_VERTEX_COLOR
- 46 out vec3 vertexColor;
- 47 #endif
- 48
- 49 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 50 float integer_noise(int n)
- 51 {
- 52 n = (n >> 13) ^ n;
- 53 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 54 return (float(nn) / 1073741824.0);
- 55 }
- 56
- 57 #ifdef V3D_SHADING_VERTEX_COLOR
- 58 vec3 srgb_to_linear_attr(vec3 c)
- 59 {
- 60 c = max(c, vec3(0.0));
- 61 vec3 c1 = c * (1.0 / 12.92);
- 62 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 63 return mix(c1, c2, step(vec3(0.04045), c));
- 64 }
- 65 #endif
- 66
- 67 void main()
- 68 {
- 69 #ifdef HAIR_SHADER
- 70 # ifdef V3D_SHADING_TEXTURE_COLOR
- 71 vec2 uv = hair_get_customdata_vec2(u);
- 72 # endif
- 73 float time, thick_time, thickness;
- 74 vec3 pos, tan, binor;
- 75 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 76 ModelMatrixInverse,
- 77 ViewMatrixInverse[3].xyz,
- 78 ViewMatrixInverse[2].xyz,
- 79 pos,
- 80 tan,
- 81 binor,
- 82 time,
- 83 thickness,
- 84 thick_time);
- 85 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 86 hair_rand = integer_noise(hair_get_strand_id());
- 87 tan = normalize(tan);
- 88 vec3 nor = normalize(cross(binor, tan));
- 89 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 90 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 91 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 92 nor = nor * sin_theta + binor * cos_theta;
- 93 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 94 #else
- 95 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 96 #endif
- 97 #ifdef V3D_SHADING_TEXTURE_COLOR
- 98 uv_interp = uv;
- 99 #endif
- 100
- 101 #ifdef V3D_SHADING_VERTEX_COLOR
- 102 # ifndef HAIR_SHADER
- 103 vertexColor = srgb_to_linear_attr(c);
- 104 # endif
- 105 #endif
- 106
- 107 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 108 normal_viewport = NormalMatrix * nor;
- 109 # ifndef HAIR_SHADER
- 110 normal_viewport = normalize(normal_viewport);
- 111 # endif
- 112 #endif
- 113
- 114 #ifdef USE_WORLD_CLIP_PLANES
- 115 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 116 #endif
- 117 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- ===== shader string 6 ====
- 15 uniform mat4 ModelViewProjectionMatrix;
- 16 uniform mat4 ModelMatrix;
- 17 uniform mat4 ModelMatrixInverse;
- 18 uniform mat4 ProjectionMatrix;
- 19 uniform mat4 ViewProjectionMatrix;
- 20 uniform mat4 ViewMatrixInverse;
- 21 uniform mat3 NormalMatrix;
- 22
- 23 #ifndef HAIR_SHADER
- 24 in vec3 pos;
- 25 in vec3 nor;
- 26 in vec2 u; /* active texture layer */
- 27 # ifdef V3D_SHADING_VERTEX_COLOR
- 28 in vec3 c; /* active color */
- 29 # endif
- 30 # define uv u
- 31 #else /* HAIR_SHADER */
- 32 # ifdef V3D_SHADING_TEXTURE_COLOR
- 33 uniform samplerBuffer u; /* active texture layer */
- 34 # endif
- 35 flat out float hair_rand;
- 36 #endif /* HAIR_SHADER */
- 37
- 38 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 39 out vec3 normal_viewport;
- 40 #endif
- 41
- 42 #ifdef V3D_SHADING_TEXTURE_COLOR
- 43 out vec2 uv_interp;
- 44 #endif
- 45 #ifdef V3D_SHADING_VERTEX_COLOR
- 46 out vec3 vertexColor;
- 47 #endif
- 48
- 49 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 50 float integer_noise(int n)
- 51 {
- 52 n = (n >> 13) ^ n;
- 53 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 54 return (float(nn) / 1073741824.0);
- 55 }
- 56
- 57 #ifdef V3D_SHADING_VERTEX_COLOR
- 58 vec3 srgb_to_linear_attr(vec3 c)
- 59 {
- 60 c = max(c, vec3(0.0));
- 61 vec3 c1 = c * (1.0 / 12.92);
- 62 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 63 return mix(c1, c2, step(vec3(0.04045), c));
- 64 }
- 65 #endif
- 66
- 67 void main()
- 68 {
- 69 #ifdef HAIR_SHADER
- 70 # ifdef V3D_SHADING_TEXTURE_COLOR
- 71 vec2 uv = hair_get_customdata_vec2(u);
- 72 # endif
- 73 float time, thick_time, thickness;
- 74 vec3 pos, tan, binor;
- 75 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 76 ModelMatrixInverse,
- 77 ViewMatrixInverse[3].xyz,
- 78 ViewMatrixInverse[2].xyz,
- 79 pos,
- 80 tan,
- 81 binor,
- 82 time,
- 83 thickness,
- 84 thick_time);
- 85 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 86 hair_rand = integer_noise(hair_get_strand_id());
- 87 tan = normalize(tan);
- 88 vec3 nor = normalize(cross(binor, tan));
- 89 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 90 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 91 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 92 nor = nor * sin_theta + binor * cos_theta;
- 93 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 94 #else
- 95 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 96 #endif
- 97 #ifdef V3D_SHADING_TEXTURE_COLOR
- 98 uv_interp = uv;
- 99 #endif
- 100
- 101 #ifdef V3D_SHADING_VERTEX_COLOR
- 102 # ifndef HAIR_SHADER
- 103 vertexColor = srgb_to_linear_attr(c);
- 104 # endif
- 105 #endif
- 106
- 107 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 108 normal_viewport = NormalMatrix * nor;
- 109 # ifndef HAIR_SHADER
- 110 normal_viewport = normalize(normal_viewport);
- 111 # endif
- 112 #endif
- 113
- 114 #ifdef USE_WORLD_CLIP_PLANES
- 115 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 116 #endif
- 117 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- 15 #define HAIR_SHADER
- ===== shader string 6 ====
- 16 /**
- 17 * Library to create hairs dynamically from control points.
- 18 * This is less bandwidth intensive than fetching the vertex attributes
- 19 * but does more ALU work per vertex. This also reduce the number
- 20 * of data the CPU has to precompute and transfert for each update.
- 21 */
- 22
- 23 /**
- 24 * hairStrandsRes: Number of points per hair strand.
- 25 * 2 - no subdivision
- 26 * 3+ - 1 or more interpolated points per hair.
- 27 */
- 28 uniform int hairStrandsRes = 8;
- 29
- 30 /**
- 31 * hairThicknessRes : Subdiv around the hair.
- 32 * 1 - Wire Hair: Only one pixel thick, independent of view distance.
- 33 * 2 - Polystrip Hair: Correct width, flat if camera is parallel.
- 34 * 3+ - Cylinder Hair: Massive calculation but potentially perfect. Still need proper support.
- 35 */
- 36 uniform int hairThicknessRes = 1;
- 37
- 38 /* Hair thickness shape. */
- 39 uniform float hairRadRoot = 0.01;
- 40 uniform float hairRadTip = 0.0;
- 41 uniform float hairRadShape = 0.5;
- 42 uniform bool hairCloseTip = true;
- 43
- 44 uniform mat4 hairDupliMatrix;
- 45
- 46 /* -- Per control points -- */
- 47 uniform samplerBuffer hairPointBuffer; /* RGBA32F */
- 48 #define point_position xyz
- 49 #define point_time w /* Position along the hair length */
- 50
- 51 /* -- Per strands data -- */
- 52 uniform usamplerBuffer hairStrandBuffer; /* R32UI */
- 53 uniform usamplerBuffer hairStrandSegBuffer; /* R16UI */
- 54
- 55 /* Not used, use one buffer per uv layer */
- 56 //uniform samplerBuffer hairUVBuffer; /* RG32F */
- 57 //uniform samplerBuffer hairColBuffer; /* RGBA16 linear color */
- 58
- 59 /* -- Subdivision stage -- */
- 60 /**
- 61 * We use a transform feedback to preprocess the strands and add more subdivision to it.
- 62 * For the moment theses are simple smooth interpolation but one could hope to see the full
- 63 * children particle modifiers being evaluated at this stage.
- 64 *
- 65 * If no more subdivision is needed, we can skip this step.
- 66 */
- 67
- 68 #ifdef HAIR_PHASE_SUBDIV
- 69 int hair_get_base_id(float local_time, int strand_segments, out float interp_time)
- 70 {
- 71 float time_per_strand_seg = 1.0 / float(strand_segments);
- 72
- 73 float ratio = local_time / time_per_strand_seg;
- 74 interp_time = fract(ratio);
- 75
- 76 return int(ratio);
- 77 }
- 78
- 79 void hair_get_interp_attrs(
- 80 out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time)
- 81 {
- 82 float local_time = float(gl_VertexID % hairStrandsRes) / float(hairStrandsRes - 1);
- 83
- 84 int hair_id = gl_VertexID / hairStrandsRes;
- 85 int strand_offset = int(texelFetch(hairStrandBuffer, hair_id).x);
- 86 int strand_segments = int(texelFetch(hairStrandSegBuffer, hair_id).x);
- 87
- 88 int id = hair_get_base_id(local_time, strand_segments, interp_time);
- 89
- 90 int ofs_id = id + strand_offset;
- 91
- 92 data0 = texelFetch(hairPointBuffer, ofs_id - 1);
- 93 data1 = texelFetch(hairPointBuffer, ofs_id);
- 94 data2 = texelFetch(hairPointBuffer, ofs_id + 1);
- 95 data3 = texelFetch(hairPointBuffer, ofs_id + 2);
- 96
- 97 if (id <= 0) {
- 98 /* root points. Need to reconstruct previous data. */
- 99 data0 = data1 * 2.0 - data2;
- 100 }
- 101 if (id + 1 >= strand_segments) {
- 102 /* tip points. Need to reconstruct next data. */
- 103 data3 = data2 * 2.0 - data1;
- 104 }
- 105 }
- 106 #endif
- 107
- 108 /* -- Drawing stage -- */
- 109 /**
- 110 * For final drawing, the vertex index and the number of vertex per segment
- 111 */
- 112
- 113 #ifndef HAIR_PHASE_SUBDIV
- 114 int hair_get_strand_id(void)
- 115 {
- 116 return gl_VertexID / (hairStrandsRes * hairThicknessRes);
- 117 }
- 118
- 119 int hair_get_base_id(void)
- 120 {
- 121 return gl_VertexID / hairThicknessRes;
- 122 }
- 123
- 124 /* Copied from cycles. */
- 125 float hair_shaperadius(float shape, float root, float tip, float time)
- 126 {
- 127 float radius = 1.0 - time;
- 128
- 129 if (shape < 0.0) {
- 130 radius = pow(radius, 1.0 + shape);
- 131 }
- 132 else {
- 133 radius = pow(radius, 1.0 / (1.0 - shape));
- 134 }
- 135
- 136 if (hairCloseTip && (time > 0.99)) {
- 137 return 0.0;
- 138 }
- 139
- 140 return (radius * (root - tip)) + tip;
- 141 }
- 142
- 143 # ifdef OS_MAC
- 144 in float dummy;
- 145 # endif
- 146
- 147 void hair_get_pos_tan_binor_time(bool is_persp,
- 148 mat4 invmodel_mat,
- 149 vec3 camera_pos,
- 150 vec3 camera_z,
- 151 out vec3 wpos,
- 152 out vec3 wtan,
- 153 out vec3 wbinor,
- 154 out float time,
- 155 out float thickness,
- 156 out float thick_time)
- 157 {
- 158 int id = hair_get_base_id();
- 159 vec4 data = texelFetch(hairPointBuffer, id);
- 160 wpos = data.point_position;
- 161 time = data.point_time;
- 162
- 163 # ifdef OS_MAC
- 164 /* Generate a dummy read to avoid the driver bug with shaders having no
- 165 * vertex reads on macOS (T60171) */
- 166 wpos.y += dummy * 0.0;
- 167 # endif
- 168
- 169 if (time == 0.0) {
- 170 /* Hair root */
- 171 wtan = texelFetch(hairPointBuffer, id + 1).point_position - wpos;
- 172 }
- 173 else {
- 174 wtan = wpos - texelFetch(hairPointBuffer, id - 1).point_position;
- 175 }
- 176
- 177 wpos = (hairDupliMatrix * vec4(wpos, 1.0)).xyz;
- 178 wtan = mat3(hairDupliMatrix) * wtan;
- 179
- 180 vec3 camera_vec = (is_persp) ? wpos - camera_pos : -camera_z;
- 181 wbinor = normalize(cross(camera_vec, wtan));
- 182
- 183 thickness = hair_shaperadius(hairRadShape, hairRadRoot, hairRadTip, time);
- 184
- 185 if (hairThicknessRes > 1) {
- 186 thick_time = float(gl_VertexID % hairThicknessRes) / float(hairThicknessRes - 1);
- 187 thick_time = thickness * (thick_time * 2.0 - 1.0);
- 188
- 189 /* Take object scale into account.
- 190 * NOTE: This only works fine with uniform scaling. */
- 191 float scale = 1.0 / length(mat3(invmodel_mat) * wbinor);
- 192
- 193 wpos += wbinor * thick_time * scale;
- 194 }
- 195 }
- 196
- 197 vec2 hair_get_customdata_vec2(const samplerBuffer cd_buf)
- 198 {
- 199 int id = hair_get_strand_id();
- 200 return texelFetch(cd_buf, id).rg;
- 201 }
- 202
- 203 vec3 hair_get_customdata_vec3(const samplerBuffer cd_buf)
- 204 {
- 205 int id = hair_get_strand_id();
- 206 return texelFetch(cd_buf, id).rgb;
- 207 }
- 208
- 209 vec4 hair_get_customdata_vec4(const samplerBuffer cd_buf)
- 210 {
- 211 int id = hair_get_strand_id();
- 212 return texelFetch(cd_buf, id).rgba;
- 213 }
- 214
- 215 vec3 hair_get_strand_pos(void)
- 216 {
- 217 int id = hair_get_strand_id() * hairStrandsRes;
- 218 return texelFetch(hairPointBuffer, id).point_position;
- 219 }
- 220
- 221 #endif
- 222 uniform mat4 ModelViewProjectionMatrix;
- 223 uniform mat4 ModelMatrix;
- 224 uniform mat4 ModelMatrixInverse;
- 225 uniform mat4 ProjectionMatrix;
- 226 uniform mat4 ViewProjectionMatrix;
- 227 uniform mat4 ViewMatrixInverse;
- 228 uniform mat3 NormalMatrix;
- 229
- 230 #ifndef HAIR_SHADER
- 231 in vec3 pos;
- 232 in vec3 nor;
- 233 in vec2 u; /* active texture layer */
- 234 # ifdef V3D_SHADING_VERTEX_COLOR
- 235 in vec3 c; /* active color */
- 236 # endif
- 237 # define uv u
- 238 #else /* HAIR_SHADER */
- 239 # ifdef V3D_SHADING_TEXTURE_COLOR
- 240 uniform samplerBuffer u; /* active texture layer */
- 241 # endif
- 242 flat out float hair_rand;
- 243 #endif /* HAIR_SHADER */
- 244
- 245 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 246 out vec3 normal_viewport;
- 247 #endif
- 248
- 249 #ifdef V3D_SHADING_TEXTURE_COLOR
- 250 out vec2 uv_interp;
- 251 #endif
- 252 #ifdef V3D_SHADING_VERTEX_COLOR
- 253 out vec3 vertexColor;
- 254 #endif
- 255
- 256 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 257 float integer_noise(int n)
- 258 {
- 259 n = (n >> 13) ^ n;
- 260 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 261 return (float(nn) / 1073741824.0);
- 262 }
- 263
- 264 #ifdef V3D_SHADING_VERTEX_COLOR
- 265 vec3 srgb_to_linear_attr(vec3 c)
- 266 {
- 267 c = max(c, vec3(0.0));
- 268 vec3 c1 = c * (1.0 / 12.92);
- 269 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 270 return mix(c1, c2, step(vec3(0.04045), c));
- 271 }
- 272 #endif
- 273
- 274 void main()
- 275 {
- 276 #ifdef HAIR_SHADER
- 277 # ifdef V3D_SHADING_TEXTURE_COLOR
- 278 vec2 uv = hair_get_customdata_vec2(u);
- 279 # endif
- 280 float time, thick_time, thickness;
- 281 vec3 pos, tan, binor;
- 282 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 283 ModelMatrixInverse,
- 284 ViewMatrixInverse[3].xyz,
- 285 ViewMatrixInverse[2].xyz,
- 286 pos,
- 287 tan,
- 288 binor,
- 289 time,
- 290 thickness,
- 291 thick_time);
- 292 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 293 hair_rand = integer_noise(hair_get_strand_id());
- 294 tan = normalize(tan);
- 295 vec3 nor = normalize(cross(binor, tan));
- 296 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 297 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 298 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 299 nor = nor * sin_theta + binor * cos_theta;
- 300 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 301 #else
- 302 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 303 #endif
- 304 #ifdef V3D_SHADING_TEXTURE_COLOR
- 305 uv_interp = uv;
- 306 #endif
- 307
- 308 #ifdef V3D_SHADING_VERTEX_COLOR
- 309 # ifndef HAIR_SHADER
- 310 vertexColor = srgb_to_linear_attr(c);
- 311 # endif
- 312 #endif
- 313
- 314 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 315 normal_viewport = NormalMatrix * nor;
- 316 # ifndef HAIR_SHADER
- 317 normal_viewport = normalize(normal_viewport);
- 318 # endif
- 319 #endif
- 320
- 321 #ifdef USE_WORLD_CLIP_PLANES
- 322 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 323 #endif
- 324 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- ===== shader string 6 ====
- 15 uniform mat4 ModelViewProjectionMatrix;
- 16 uniform mat4 ModelMatrix;
- 17 uniform mat4 ModelMatrixInverse;
- 18 uniform mat4 ProjectionMatrix;
- 19 uniform mat4 ViewProjectionMatrix;
- 20 uniform mat4 ViewMatrixInverse;
- 21 uniform mat3 NormalMatrix;
- 22
- 23 #ifndef HAIR_SHADER
- 24 in vec3 pos;
- 25 in vec3 nor;
- 26 in vec2 u; /* active texture layer */
- 27 # ifdef V3D_SHADING_VERTEX_COLOR
- 28 in vec3 c; /* active color */
- 29 # endif
- 30 # define uv u
- 31 #else /* HAIR_SHADER */
- 32 # ifdef V3D_SHADING_TEXTURE_COLOR
- 33 uniform samplerBuffer u; /* active texture layer */
- 34 # endif
- 35 flat out float hair_rand;
- 36 #endif /* HAIR_SHADER */
- 37
- 38 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 39 out vec3 normal_viewport;
- 40 #endif
- 41
- 42 #ifdef V3D_SHADING_TEXTURE_COLOR
- 43 out vec2 uv_interp;
- 44 #endif
- 45 #ifdef V3D_SHADING_VERTEX_COLOR
- 46 out vec3 vertexColor;
- 47 #endif
- 48
- 49 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 50 float integer_noise(int n)
- 51 {
- 52 n = (n >> 13) ^ n;
- 53 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 54 return (float(nn) / 1073741824.0);
- 55 }
- 56
- 57 #ifdef V3D_SHADING_VERTEX_COLOR
- 58 vec3 srgb_to_linear_attr(vec3 c)
- 59 {
- 60 c = max(c, vec3(0.0));
- 61 vec3 c1 = c * (1.0 / 12.92);
- 62 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 63 return mix(c1, c2, step(vec3(0.04045), c));
- 64 }
- 65 #endif
- 66
- 67 void main()
- 68 {
- 69 #ifdef HAIR_SHADER
- 70 # ifdef V3D_SHADING_TEXTURE_COLOR
- 71 vec2 uv = hair_get_customdata_vec2(u);
- 72 # endif
- 73 float time, thick_time, thickness;
- 74 vec3 pos, tan, binor;
- 75 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 76 ModelMatrixInverse,
- 77 ViewMatrixInverse[3].xyz,
- 78 ViewMatrixInverse[2].xyz,
- 79 pos,
- 80 tan,
- 81 binor,
- 82 time,
- 83 thickness,
- 84 thick_time);
- 85 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 86 hair_rand = integer_noise(hair_get_strand_id());
- 87 tan = normalize(tan);
- 88 vec3 nor = normalize(cross(binor, tan));
- 89 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 90 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 91 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 92 nor = nor * sin_theta + binor * cos_theta;
- 93 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 94 #else
- 95 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 96 #endif
- 97 #ifdef V3D_SHADING_TEXTURE_COLOR
- 98 uv_interp = uv;
- 99 #endif
- 100
- 101 #ifdef V3D_SHADING_VERTEX_COLOR
- 102 # ifndef HAIR_SHADER
- 103 vertexColor = srgb_to_linear_attr(c);
- 104 # endif
- 105 #endif
- 106
- 107 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 108 normal_viewport = NormalMatrix * nor;
- 109 # ifndef HAIR_SHADER
- 110 normal_viewport = normalize(normal_viewport);
- 111 # endif
- 112 #endif
- 113
- 114 #ifdef USE_WORLD_CLIP_PLANES
- 115 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 116 #endif
- 117 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- 15 #define HAIR_SHADER
- ===== shader string 6 ====
- 16 /**
- 17 * Library to create hairs dynamically from control points.
- 18 * This is less bandwidth intensive than fetching the vertex attributes
- 19 * but does more ALU work per vertex. This also reduce the number
- 20 * of data the CPU has to precompute and transfert for each update.
- 21 */
- 22
- 23 /**
- 24 * hairStrandsRes: Number of points per hair strand.
- 25 * 2 - no subdivision
- 26 * 3+ - 1 or more interpolated points per hair.
- 27 */
- 28 uniform int hairStrandsRes = 8;
- 29
- 30 /**
- 31 * hairThicknessRes : Subdiv around the hair.
- 32 * 1 - Wire Hair: Only one pixel thick, independent of view distance.
- 33 * 2 - Polystrip Hair: Correct width, flat if camera is parallel.
- 34 * 3+ - Cylinder Hair: Massive calculation but potentially perfect. Still need proper support.
- 35 */
- 36 uniform int hairThicknessRes = 1;
- 37
- 38 /* Hair thickness shape. */
- 39 uniform float hairRadRoot = 0.01;
- 40 uniform float hairRadTip = 0.0;
- 41 uniform float hairRadShape = 0.5;
- 42 uniform bool hairCloseTip = true;
- 43
- 44 uniform mat4 hairDupliMatrix;
- 45
- 46 /* -- Per control points -- */
- 47 uniform samplerBuffer hairPointBuffer; /* RGBA32F */
- 48 #define point_position xyz
- 49 #define point_time w /* Position along the hair length */
- 50
- 51 /* -- Per strands data -- */
- 52 uniform usamplerBuffer hairStrandBuffer; /* R32UI */
- 53 uniform usamplerBuffer hairStrandSegBuffer; /* R16UI */
- 54
- 55 /* Not used, use one buffer per uv layer */
- 56 //uniform samplerBuffer hairUVBuffer; /* RG32F */
- 57 //uniform samplerBuffer hairColBuffer; /* RGBA16 linear color */
- 58
- 59 /* -- Subdivision stage -- */
- 60 /**
- 61 * We use a transform feedback to preprocess the strands and add more subdivision to it.
- 62 * For the moment theses are simple smooth interpolation but one could hope to see the full
- 63 * children particle modifiers being evaluated at this stage.
- 64 *
- 65 * If no more subdivision is needed, we can skip this step.
- 66 */
- 67
- 68 #ifdef HAIR_PHASE_SUBDIV
- 69 int hair_get_base_id(float local_time, int strand_segments, out float interp_time)
- 70 {
- 71 float time_per_strand_seg = 1.0 / float(strand_segments);
- 72
- 73 float ratio = local_time / time_per_strand_seg;
- 74 interp_time = fract(ratio);
- 75
- 76 return int(ratio);
- 77 }
- 78
- 79 void hair_get_interp_attrs(
- 80 out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time)
- 81 {
- 82 float local_time = float(gl_VertexID % hairStrandsRes) / float(hairStrandsRes - 1);
- 83
- 84 int hair_id = gl_VertexID / hairStrandsRes;
- 85 int strand_offset = int(texelFetch(hairStrandBuffer, hair_id).x);
- 86 int strand_segments = int(texelFetch(hairStrandSegBuffer, hair_id).x);
- 87
- 88 int id = hair_get_base_id(local_time, strand_segments, interp_time);
- 89
- 90 int ofs_id = id + strand_offset;
- 91
- 92 data0 = texelFetch(hairPointBuffer, ofs_id - 1);
- 93 data1 = texelFetch(hairPointBuffer, ofs_id);
- 94 data2 = texelFetch(hairPointBuffer, ofs_id + 1);
- 95 data3 = texelFetch(hairPointBuffer, ofs_id + 2);
- 96
- 97 if (id <= 0) {
- 98 /* root points. Need to reconstruct previous data. */
- 99 data0 = data1 * 2.0 - data2;
- 100 }
- 101 if (id + 1 >= strand_segments) {
- 102 /* tip points. Need to reconstruct next data. */
- 103 data3 = data2 * 2.0 - data1;
- 104 }
- 105 }
- 106 #endif
- 107
- 108 /* -- Drawing stage -- */
- 109 /**
- 110 * For final drawing, the vertex index and the number of vertex per segment
- 111 */
- 112
- 113 #ifndef HAIR_PHASE_SUBDIV
- 114 int hair_get_strand_id(void)
- 115 {
- 116 return gl_VertexID / (hairStrandsRes * hairThicknessRes);
- 117 }
- 118
- 119 int hair_get_base_id(void)
- 120 {
- 121 return gl_VertexID / hairThicknessRes;
- 122 }
- 123
- 124 /* Copied from cycles. */
- 125 float hair_shaperadius(float shape, float root, float tip, float time)
- 126 {
- 127 float radius = 1.0 - time;
- 128
- 129 if (shape < 0.0) {
- 130 radius = pow(radius, 1.0 + shape);
- 131 }
- 132 else {
- 133 radius = pow(radius, 1.0 / (1.0 - shape));
- 134 }
- 135
- 136 if (hairCloseTip && (time > 0.99)) {
- 137 return 0.0;
- 138 }
- 139
- 140 return (radius * (root - tip)) + tip;
- 141 }
- 142
- 143 # ifdef OS_MAC
- 144 in float dummy;
- 145 # endif
- 146
- 147 void hair_get_pos_tan_binor_time(bool is_persp,
- 148 mat4 invmodel_mat,
- 149 vec3 camera_pos,
- 150 vec3 camera_z,
- 151 out vec3 wpos,
- 152 out vec3 wtan,
- 153 out vec3 wbinor,
- 154 out float time,
- 155 out float thickness,
- 156 out float thick_time)
- 157 {
- 158 int id = hair_get_base_id();
- 159 vec4 data = texelFetch(hairPointBuffer, id);
- 160 wpos = data.point_position;
- 161 time = data.point_time;
- 162
- 163 # ifdef OS_MAC
- 164 /* Generate a dummy read to avoid the driver bug with shaders having no
- 165 * vertex reads on macOS (T60171) */
- 166 wpos.y += dummy * 0.0;
- 167 # endif
- 168
- 169 if (time == 0.0) {
- 170 /* Hair root */
- 171 wtan = texelFetch(hairPointBuffer, id + 1).point_position - wpos;
- 172 }
- 173 else {
- 174 wtan = wpos - texelFetch(hairPointBuffer, id - 1).point_position;
- 175 }
- 176
- 177 wpos = (hairDupliMatrix * vec4(wpos, 1.0)).xyz;
- 178 wtan = mat3(hairDupliMatrix) * wtan;
- 179
- 180 vec3 camera_vec = (is_persp) ? wpos - camera_pos : -camera_z;
- 181 wbinor = normalize(cross(camera_vec, wtan));
- 182
- 183 thickness = hair_shaperadius(hairRadShape, hairRadRoot, hairRadTip, time);
- 184
- 185 if (hairThicknessRes > 1) {
- 186 thick_time = float(gl_VertexID % hairThicknessRes) / float(hairThicknessRes - 1);
- 187 thick_time = thickness * (thick_time * 2.0 - 1.0);
- 188
- 189 /* Take object scale into account.
- 190 * NOTE: This only works fine with uniform scaling. */
- 191 float scale = 1.0 / length(mat3(invmodel_mat) * wbinor);
- 192
- 193 wpos += wbinor * thick_time * scale;
- 194 }
- 195 }
- 196
- 197 vec2 hair_get_customdata_vec2(const samplerBuffer cd_buf)
- 198 {
- 199 int id = hair_get_strand_id();
- 200 return texelFetch(cd_buf, id).rg;
- 201 }
- 202
- 203 vec3 hair_get_customdata_vec3(const samplerBuffer cd_buf)
- 204 {
- 205 int id = hair_get_strand_id();
- 206 return texelFetch(cd_buf, id).rgb;
- 207 }
- 208
- 209 vec4 hair_get_customdata_vec4(const samplerBuffer cd_buf)
- 210 {
- 211 int id = hair_get_strand_id();
- 212 return texelFetch(cd_buf, id).rgba;
- 213 }
- 214
- 215 vec3 hair_get_strand_pos(void)
- 216 {
- 217 int id = hair_get_strand_id() * hairStrandsRes;
- 218 return texelFetch(hairPointBuffer, id).point_position;
- 219 }
- 220
- 221 #endif
- 222 uniform mat4 ModelViewProjectionMatrix;
- 223 uniform mat4 ModelMatrix;
- 224 uniform mat4 ModelMatrixInverse;
- 225 uniform mat4 ProjectionMatrix;
- 226 uniform mat4 ViewProjectionMatrix;
- 227 uniform mat4 ViewMatrixInverse;
- 228 uniform mat3 NormalMatrix;
- 229
- 230 #ifndef HAIR_SHADER
- 231 in vec3 pos;
- 232 in vec3 nor;
- 233 in vec2 u; /* active texture layer */
- 234 # ifdef V3D_SHADING_VERTEX_COLOR
- 235 in vec3 c; /* active color */
- 236 # endif
- 237 # define uv u
- 238 #else /* HAIR_SHADER */
- 239 # ifdef V3D_SHADING_TEXTURE_COLOR
- 240 uniform samplerBuffer u; /* active texture layer */
- 241 # endif
- 242 flat out float hair_rand;
- 243 #endif /* HAIR_SHADER */
- 244
- 245 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 246 out vec3 normal_viewport;
- 247 #endif
- 248
- 249 #ifdef V3D_SHADING_TEXTURE_COLOR
- 250 out vec2 uv_interp;
- 251 #endif
- 252 #ifdef V3D_SHADING_VERTEX_COLOR
- 253 out vec3 vertexColor;
- 254 #endif
- 255
- 256 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 257 float integer_noise(int n)
- 258 {
- 259 n = (n >> 13) ^ n;
- 260 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 261 return (float(nn) / 1073741824.0);
- 262 }
- 263
- 264 #ifdef V3D_SHADING_VERTEX_COLOR
- 265 vec3 srgb_to_linear_attr(vec3 c)
- 266 {
- 267 c = max(c, vec3(0.0));
- 268 vec3 c1 = c * (1.0 / 12.92);
- 269 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 270 return mix(c1, c2, step(vec3(0.04045), c));
- 271 }
- 272 #endif
- 273
- 274 void main()
- 275 {
- 276 #ifdef HAIR_SHADER
- 277 # ifdef V3D_SHADING_TEXTURE_COLOR
- 278 vec2 uv = hair_get_customdata_vec2(u);
- 279 # endif
- 280 float time, thick_time, thickness;
- 281 vec3 pos, tan, binor;
- 282 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 283 ModelMatrixInverse,
- 284 ViewMatrixInverse[3].xyz,
- 285 ViewMatrixInverse[2].xyz,
- 286 pos,
- 287 tan,
- 288 binor,
- 289 time,
- 290 thickness,
- 291 thick_time);
- 292 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 293 hair_rand = integer_noise(hair_get_strand_id());
- 294 tan = normalize(tan);
- 295 vec3 nor = normalize(cross(binor, tan));
- 296 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 297 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 298 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 299 nor = nor * sin_theta + binor * cos_theta;
- 300 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 301 #else
- 302 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 303 #endif
- 304 #ifdef V3D_SHADING_TEXTURE_COLOR
- 305 uv_interp = uv;
- 306 #endif
- 307
- 308 #ifdef V3D_SHADING_VERTEX_COLOR
- 309 # ifndef HAIR_SHADER
- 310 vertexColor = srgb_to_linear_attr(c);
- 311 # endif
- 312 #endif
- 313
- 314 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 315 normal_viewport = NormalMatrix * nor;
- 316 # ifndef HAIR_SHADER
- 317 normal_viewport = normalize(normal_viewport);
- 318 # endif
- 319 #endif
- 320
- 321 #ifdef USE_WORLD_CLIP_PLANES
- 322 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 323 #endif
- 324 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- ===== shader string 6 ====
- 15 uniform mat4 ModelViewProjectionMatrix;
- 16 uniform mat4 ModelMatrix;
- 17 uniform mat4 ModelMatrixInverse;
- 18 uniform mat4 ProjectionMatrix;
- 19 uniform mat4 ViewProjectionMatrix;
- 20 uniform mat4 ViewMatrixInverse;
- 21 uniform mat3 NormalMatrix;
- 22
- 23 #ifndef HAIR_SHADER
- 24 in vec3 pos;
- 25 in vec3 nor;
- 26 in vec2 u; /* active texture layer */
- 27 # ifdef V3D_SHADING_VERTEX_COLOR
- 28 in vec3 c; /* active color */
- 29 # endif
- 30 # define uv u
- 31 #else /* HAIR_SHADER */
- 32 # ifdef V3D_SHADING_TEXTURE_COLOR
- 33 uniform samplerBuffer u; /* active texture layer */
- 34 # endif
- 35 flat out float hair_rand;
- 36 #endif /* HAIR_SHADER */
- 37
- 38 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 39 out vec3 normal_viewport;
- 40 #endif
- 41
- 42 #ifdef V3D_SHADING_TEXTURE_COLOR
- 43 out vec2 uv_interp;
- 44 #endif
- 45 #ifdef V3D_SHADING_VERTEX_COLOR
- 46 out vec3 vertexColor;
- 47 #endif
- 48
- 49 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 50 float integer_noise(int n)
- 51 {
- 52 n = (n >> 13) ^ n;
- 53 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 54 return (float(nn) / 1073741824.0);
- 55 }
- 56
- 57 #ifdef V3D_SHADING_VERTEX_COLOR
- 58 vec3 srgb_to_linear_attr(vec3 c)
- 59 {
- 60 c = max(c, vec3(0.0));
- 61 vec3 c1 = c * (1.0 / 12.92);
- 62 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 63 return mix(c1, c2, step(vec3(0.04045), c));
- 64 }
- 65 #endif
- 66
- 67 void main()
- 68 {
- 69 #ifdef HAIR_SHADER
- 70 # ifdef V3D_SHADING_TEXTURE_COLOR
- 71 vec2 uv = hair_get_customdata_vec2(u);
- 72 # endif
- 73 float time, thick_time, thickness;
- 74 vec3 pos, tan, binor;
- 75 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 76 ModelMatrixInverse,
- 77 ViewMatrixInverse[3].xyz,
- 78 ViewMatrixInverse[2].xyz,
- 79 pos,
- 80 tan,
- 81 binor,
- 82 time,
- 83 thickness,
- 84 thick_time);
- 85 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 86 hair_rand = integer_noise(hair_get_strand_id());
- 87 tan = normalize(tan);
- 88 vec3 nor = normalize(cross(binor, tan));
- 89 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 90 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 91 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 92 nor = nor * sin_theta + binor * cos_theta;
- 93 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 94 #else
- 95 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 96 #endif
- 97 #ifdef V3D_SHADING_TEXTURE_COLOR
- 98 uv_interp = uv;
- 99 #endif
- 100
- 101 #ifdef V3D_SHADING_VERTEX_COLOR
- 102 # ifndef HAIR_SHADER
- 103 vertexColor = srgb_to_linear_attr(c);
- 104 # endif
- 105 #endif
- 106
- 107 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 108 normal_viewport = NormalMatrix * nor;
- 109 # ifndef HAIR_SHADER
- 110 normal_viewport = normalize(normal_viewport);
- 111 # endif
- 112 #endif
- 113
- 114 #ifdef USE_WORLD_CLIP_PLANES
- 115 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 116 #endif
- 117 }
- Vertex shader failed to compile with the following errors:
- GPUShader: compile error:
- ===== shader string 1 ====
- 1 #version 330
- ===== shader string 2 ====
- 2 #define GPU_VERTEX_SHADER
- ===== shader string 3 ====
- 3 #extension GL_ARB_texture_gather: enable
- 4 #define GPU_ARB_texture_gather
- 5 #extension GL_ARB_texture_query_lod: enable
- ===== shader string 4 ====
- 6 #define GPU_ATI
- 7 #define OS_WIN
- ===== shader string 5 ====
- 8 #define V3D_SHADING_OBJECT_OUTLINE
- 9 #define V3D_SHADING_SPECULAR_HIGHLIGHT
- 10 #define V3D_LIGHTING_STUDIO
- 11 #define OBJECT_ID_PASS_ENABLED
- 12 #define MATDATA_PASS_ENABLED
- 13 #define NORMAL_VIEWPORT_PASS_ENABLED
- 14 #define WORKBENCH_ENCODE_NORMALS
- 15 #define HAIR_SHADER
- ===== shader string 6 ====
- 16 /**
- 17 * Library to create hairs dynamically from control points.
- 18 * This is less bandwidth intensive than fetching the vertex attributes
- 19 * but does more ALU work per vertex. This also reduce the number
- 20 * of data the CPU has to precompute and transfert for each update.
- 21 */
- 22
- 23 /**
- 24 * hairStrandsRes: Number of points per hair strand.
- 25 * 2 - no subdivision
- 26 * 3+ - 1 or more interpolated points per hair.
- 27 */
- 28 uniform int hairStrandsRes = 8;
- 29
- 30 /**
- 31 * hairThicknessRes : Subdiv around the hair.
- 32 * 1 - Wire Hair: Only one pixel thick, independent of view distance.
- 33 * 2 - Polystrip Hair: Correct width, flat if camera is parallel.
- 34 * 3+ - Cylinder Hair: Massive calculation but potentially perfect. Still need proper support.
- 35 */
- 36 uniform int hairThicknessRes = 1;
- 37
- 38 /* Hair thickness shape. */
- 39 uniform float hairRadRoot = 0.01;
- 40 uniform float hairRadTip = 0.0;
- 41 uniform float hairRadShape = 0.5;
- 42 uniform bool hairCloseTip = true;
- 43
- 44 uniform mat4 hairDupliMatrix;
- 45
- 46 /* -- Per control points -- */
- 47 uniform samplerBuffer hairPointBuffer; /* RGBA32F */
- 48 #define point_position xyz
- 49 #define point_time w /* Position along the hair length */
- 50
- 51 /* -- Per strands data -- */
- 52 uniform usamplerBuffer hairStrandBuffer; /* R32UI */
- 53 uniform usamplerBuffer hairStrandSegBuffer; /* R16UI */
- 54
- 55 /* Not used, use one buffer per uv layer */
- 56 //uniform samplerBuffer hairUVBuffer; /* RG32F */
- 57 //uniform samplerBuffer hairColBuffer; /* RGBA16 linear color */
- 58
- 59 /* -- Subdivision stage -- */
- 60 /**
- 61 * We use a transform feedback to preprocess the strands and add more subdivision to it.
- 62 * For the moment theses are simple smooth interpolation but one could hope to see the full
- 63 * children particle modifiers being evaluated at this stage.
- 64 *
- 65 * If no more subdivision is needed, we can skip this step.
- 66 */
- 67
- 68 #ifdef HAIR_PHASE_SUBDIV
- 69 int hair_get_base_id(float local_time, int strand_segments, out float interp_time)
- 70 {
- 71 float time_per_strand_seg = 1.0 / float(strand_segments);
- 72
- 73 float ratio = local_time / time_per_strand_seg;
- 74 interp_time = fract(ratio);
- 75
- 76 return int(ratio);
- 77 }
- 78
- 79 void hair_get_interp_attrs(
- 80 out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time)
- 81 {
- 82 float local_time = float(gl_VertexID % hairStrandsRes) / float(hairStrandsRes - 1);
- 83
- 84 int hair_id = gl_VertexID / hairStrandsRes;
- 85 int strand_offset = int(texelFetch(hairStrandBuffer, hair_id).x);
- 86 int strand_segments = int(texelFetch(hairStrandSegBuffer, hair_id).x);
- 87
- 88 int id = hair_get_base_id(local_time, strand_segments, interp_time);
- 89
- 90 int ofs_id = id + strand_offset;
- 91
- 92 data0 = texelFetch(hairPointBuffer, ofs_id - 1);
- 93 data1 = texelFetch(hairPointBuffer, ofs_id);
- 94 data2 = texelFetch(hairPointBuffer, ofs_id + 1);
- 95 data3 = texelFetch(hairPointBuffer, ofs_id + 2);
- 96
- 97 if (id <= 0) {
- 98 /* root points. Need to reconstruct previous data. */
- 99 data0 = data1 * 2.0 - data2;
- 100 }
- 101 if (id + 1 >= strand_segments) {
- 102 /* tip points. Need to reconstruct next data. */
- 103 data3 = data2 * 2.0 - data1;
- 104 }
- 105 }
- 106 #endif
- 107
- 108 /* -- Drawing stage -- */
- 109 /**
- 110 * For final drawing, the vertex index and the number of vertex per segment
- 111 */
- 112
- 113 #ifndef HAIR_PHASE_SUBDIV
- 114 int hair_get_strand_id(void)
- 115 {
- 116 return gl_VertexID / (hairStrandsRes * hairThicknessRes);
- 117 }
- 118
- 119 int hair_get_base_id(void)
- 120 {
- 121 return gl_VertexID / hairThicknessRes;
- 122 }
- 123
- 124 /* Copied from cycles. */
- 125 float hair_shaperadius(float shape, float root, float tip, float time)
- 126 {
- 127 float radius = 1.0 - time;
- 128
- 129 if (shape < 0.0) {
- 130 radius = pow(radius, 1.0 + shape);
- 131 }
- 132 else {
- 133 radius = pow(radius, 1.0 / (1.0 - shape));
- 134 }
- 135
- 136 if (hairCloseTip && (time > 0.99)) {
- 137 return 0.0;
- 138 }
- 139
- 140 return (radius * (root - tip)) + tip;
- 141 }
- 142
- 143 # ifdef OS_MAC
- 144 in float dummy;
- 145 # endif
- 146
- 147 void hair_get_pos_tan_binor_time(bool is_persp,
- 148 mat4 invmodel_mat,
- 149 vec3 camera_pos,
- 150 vec3 camera_z,
- 151 out vec3 wpos,
- 152 out vec3 wtan,
- 153 out vec3 wbinor,
- 154 out float time,
- 155 out float thickness,
- 156 out float thick_time)
- 157 {
- 158 int id = hair_get_base_id();
- 159 vec4 data = texelFetch(hairPointBuffer, id);
- 160 wpos = data.point_position;
- 161 time = data.point_time;
- 162
- 163 # ifdef OS_MAC
- 164 /* Generate a dummy read to avoid the driver bug with shaders having no
- 165 * vertex reads on macOS (T60171) */
- 166 wpos.y += dummy * 0.0;
- 167 # endif
- 168
- 169 if (time == 0.0) {
- 170 /* Hair root */
- 171 wtan = texelFetch(hairPointBuffer, id + 1).point_position - wpos;
- 172 }
- 173 else {
- 174 wtan = wpos - texelFetch(hairPointBuffer, id - 1).point_position;
- 175 }
- 176
- 177 wpos = (hairDupliMatrix * vec4(wpos, 1.0)).xyz;
- 178 wtan = mat3(hairDupliMatrix) * wtan;
- 179
- 180 vec3 camera_vec = (is_persp) ? wpos - camera_pos : -camera_z;
- 181 wbinor = normalize(cross(camera_vec, wtan));
- 182
- 183 thickness = hair_shaperadius(hairRadShape, hairRadRoot, hairRadTip, time);
- 184
- 185 if (hairThicknessRes > 1) {
- 186 thick_time = float(gl_VertexID % hairThicknessRes) / float(hairThicknessRes - 1);
- 187 thick_time = thickness * (thick_time * 2.0 - 1.0);
- 188
- 189 /* Take object scale into account.
- 190 * NOTE: This only works fine with uniform scaling. */
- 191 float scale = 1.0 / length(mat3(invmodel_mat) * wbinor);
- 192
- 193 wpos += wbinor * thick_time * scale;
- 194 }
- 195 }
- 196
- 197 vec2 hair_get_customdata_vec2(const samplerBuffer cd_buf)
- 198 {
- 199 int id = hair_get_strand_id();
- 200 return texelFetch(cd_buf, id).rg;
- 201 }
- 202
- 203 vec3 hair_get_customdata_vec3(const samplerBuffer cd_buf)
- 204 {
- 205 int id = hair_get_strand_id();
- 206 return texelFetch(cd_buf, id).rgb;
- 207 }
- 208
- 209 vec4 hair_get_customdata_vec4(const samplerBuffer cd_buf)
- 210 {
- 211 int id = hair_get_strand_id();
- 212 return texelFetch(cd_buf, id).rgba;
- 213 }
- 214
- 215 vec3 hair_get_strand_pos(void)
- 216 {
- 217 int id = hair_get_strand_id() * hairStrandsRes;
- 218 return texelFetch(hairPointBuffer, id).point_position;
- 219 }
- 220
- 221 #endif
- 222 uniform mat4 ModelViewProjectionMatrix;
- 223 uniform mat4 ModelMatrix;
- 224 uniform mat4 ModelMatrixInverse;
- 225 uniform mat4 ProjectionMatrix;
- 226 uniform mat4 ViewProjectionMatrix;
- 227 uniform mat4 ViewMatrixInverse;
- 228 uniform mat3 NormalMatrix;
- 229
- 230 #ifndef HAIR_SHADER
- 231 in vec3 pos;
- 232 in vec3 nor;
- 233 in vec2 u; /* active texture layer */
- 234 # ifdef V3D_SHADING_VERTEX_COLOR
- 235 in vec3 c; /* active color */
- 236 # endif
- 237 # define uv u
- 238 #else /* HAIR_SHADER */
- 239 # ifdef V3D_SHADING_TEXTURE_COLOR
- 240 uniform samplerBuffer u; /* active texture layer */
- 241 # endif
- 242 flat out float hair_rand;
- 243 #endif /* HAIR_SHADER */
- 244
- 245 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 246 out vec3 normal_viewport;
- 247 #endif
- 248
- 249 #ifdef V3D_SHADING_TEXTURE_COLOR
- 250 out vec2 uv_interp;
- 251 #endif
- 252 #ifdef V3D_SHADING_VERTEX_COLOR
- 253 out vec3 vertexColor;
- 254 #endif
- 255
- 256 /* From http://libnoise.sourceforge.net/noisegen/index.html */
- 257 float integer_noise(int n)
- 258 {
- 259 n = (n >> 13) ^ n;
- 260 int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
- 261 return (float(nn) / 1073741824.0);
- 262 }
- 263
- 264 #ifdef V3D_SHADING_VERTEX_COLOR
- 265 vec3 srgb_to_linear_attr(vec3 c)
- 266 {
- 267 c = max(c, vec3(0.0));
- 268 vec3 c1 = c * (1.0 / 12.92);
- 269 vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
- 270 return mix(c1, c2, step(vec3(0.04045), c));
- 271 }
- 272 #endif
- 273
- 274 void main()
- 275 {
- 276 #ifdef HAIR_SHADER
- 277 # ifdef V3D_SHADING_TEXTURE_COLOR
- 278 vec2 uv = hair_get_customdata_vec2(u);
- 279 # endif
- 280 float time, thick_time, thickness;
- 281 vec3 pos, tan, binor;
- 282 hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
- 283 ModelMatrixInverse,
- 284 ViewMatrixInverse[3].xyz,
- 285 ViewMatrixInverse[2].xyz,
- 286 pos,
- 287 tan,
- 288 binor,
- 289 time,
- 290 thickness,
- 291 thick_time);
- 292 /* To "simulate" anisotropic shading, randomize hair normal per strand. */
- 293 hair_rand = integer_noise(hair_get_strand_id());
- 294 tan = normalize(tan);
- 295 vec3 nor = normalize(cross(binor, tan));
- 296 nor = normalize(mix(nor, -tan, hair_rand * 0.10));
- 297 float cos_theta = (hair_rand * 2.0 - 1.0) * 0.20;
- 298 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta));
- 299 nor = nor * sin_theta + binor * cos_theta;
- 300 gl_Position = ViewProjectionMatrix * vec4(pos, 1.0);
- 301 #else
- 302 gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- 303 #endif
- 304 #ifdef V3D_SHADING_TEXTURE_COLOR
- 305 uv_interp = uv;
- 306 #endif
- 307
- 308 #ifdef V3D_SHADING_VERTEX_COLOR
- 309 # ifndef HAIR_SHADER
- 310 vertexColor = srgb_to_linear_attr(c);
- 311 # endif
- 312 #endif
- 313
- 314 #ifdef NORMAL_VIEWPORT_PASS_ENABLED
- 315 normal_viewport = NormalMatrix * nor;
- 316 # ifndef HAIR_SHADER
- 317 normal_viewport = normalize(normal_viewport);
- 318 # endif
- 319 #endif
- 320
- 321 #ifdef USE_WORLD_CLIP_PLANES
- 322 world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
- 323 #endif
- 324 }
- Vertex shader failed to compile with the following errors:
- Error : EXCEPTION_ACCESS_VIOLATION
- Address : 0x00007FF781B5E064
- Module : I:\BlenderUpdater\blender.exe
- ---------------------------------------------------------------------------------------------------------------------------------------
- BLENDER SYSTEM INFO.txt
- ---------------------------------------------------------------------------------------------------------------------------------------
- ============================================
- = Blender 2.80 (sub 58) System Information =
- ============================================
- Blender:
- ============================================
- version: 2.80 (sub 58), branch: blender2.7, commit date: 2019-04-24 02:30, hash: 1b839e85e142, type: Release
- build date: 23/04/2019, 20:12
- platform: Windows
- binary path: 'I:\\BlenderUpdater\\blender.exe'
- build cflags: /W3 /w34062 /w34115 /w34189 /wd4018 /wd4146 /wd4065 /wd4127 /wd4181 /wd4200 /wd4244 /wd4267 /wd4305 /wd4800 /wd4828 /wd4996 /we4013 /we4133 /we4431 /w35038 /DWIN32 /D_WINDOWS /W3 /nologo /J /Gd /MP -openmp
- build cxxflags: /W3 /w34062 /w34115 /w34189 /wd4018 /wd4146 /wd4065 /wd4127 /wd4181 /wd4200 /wd4244 /wd4267 /wd4305 /wd4800 /wd4828 /wd4996 /we4013 /we4133 /we4431 /w35038 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /nologo /J /Gd /MP /EHsc -openmp
- build linkflags: /MACHINE:X64 /SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib /ignore:4049 /ignore:4217 /ignore:4221
- build system: CMake
- Python:
- ============================================
- version: 3.7.0 (default, Aug 26 2018, 16:05:01) [MSC v.1900 64 bit (AMD64)]
- paths:
- 'I:\\BlenderUpdater\\2.80\\scripts\\addons_contrib'
- 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\scripts\\addons'
- 'I:\\BlenderUpdater\\2.80\\scripts\\addons'
- 'I:\\BlenderUpdater\\2.80\\scripts\\startup'
- 'I:\\BlenderUpdater\\2.80\\scripts\\modules'
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64'
- 'I:\\BlenderUpdater\\python37.zip'
- 'I:\\BlenderUpdater\\2.80\\python\\DLLs'
- 'I:\\BlenderUpdater\\2.80\\python\\lib'
- 'I:\\BlenderUpdater'
- 'I:\\BlenderUpdater\\2.80\\python'
- 'I:\\BlenderUpdater\\2.80\\python\\lib\\site-packages'
- 'I:\\BlenderUpdater\\2.80\\scripts\\freestyle\\modules'
- 'I:\\BlenderUpdater\\2.80\\scripts\\addons\\modules'
- 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\scripts\\addons\\modules'
- Python (External Binary):
- ============================================
- binary path: 'I:\\BlenderUpdater\\2.80\\python\\bin\\python.EXE'
- version: Python 3.7.0
- Directories:
- ============================================
- scripts:
- 'I:\\BlenderUpdater\\2.80\\scripts\\modules'
- 'I:\\BlenderUpdater\\2.80\\scripts'
- 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\scripts'
- user scripts: 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\scripts'
- pref scripts: None
- datafiles: 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\datafiles\\'
- config: 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\config\\'
- scripts : 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\scripts\\'
- autosave: 'C:\\Users\\Administrator\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\autosave\\'
- tempdir: 'C:\\Users\\Administrator\\AppData\\Local\\Temp\\blender_a20892\\'
- FFmpeg:
- ============================================
- avcodec: '58, 18, 100'
- avdevice: '58, 3, 100'
- avformat: '58, 12, 100'
- avutil: '56, 14, 100'
- swscale: ' 5, 1, 100'
- SDL:
- ============================================
- Version: 2.0.8
- Loading method: linked (WITH_SDL_DYNLOAD=OFF)
- Other Libraries:
- ============================================
- OpenColorIO: 1, 1, 0
- OpenImageIO: 1, 8, 13
- OpenShadingLanguage: 1, 9, 9
- OpenSubdiv: 0, 0, 0
- OpenVDB: 5, 1, 0
- Alembic: 1, 7, 8
- OpenGL:
- ============================================
- renderer: 'AMD Radeon R6 Graphics'
- vendor: 'ATI Technologies Inc.'
- version: '4.5.13547 Core Profile Context 25.20.15031.5004'
- extensions:
- GL_AMDX_debug_output
- GL_AMD_blend_minmax_factor
- GL_AMD_conservative_depth
- GL_AMD_debug_output
- GL_AMD_depth_clamp_separate
- GL_AMD_draw_buffers_blend
- GL_AMD_framebuffer_sample_positions
- GL_AMD_gcn_shader
- GL_AMD_gpu_shader_half_float
- GL_AMD_gpu_shader_int16
- GL_AMD_gpu_shader_int64
- GL_AMD_interleaved_elements
- GL_AMD_multi_draw_indirect
- GL_AMD_name_gen_delete
- GL_AMD_occlusion_query_event
- GL_AMD_performance_monitor
- GL_AMD_pinned_memory
- GL_AMD_query_buffer_object
- GL_AMD_sample_positions
- GL_AMD_seamless_cubemap_per_texture
- GL_AMD_shader_atomic_counter_ops
- GL_AMD_shader_stencil_export
- GL_AMD_shader_stencil_value_export
- GL_AMD_shader_trace
- GL_AMD_shader_trinary_minmax
- GL_AMD_sparse_texture
- GL_AMD_sparse_texture_pool
- GL_AMD_stencil_operation_extended
- GL_AMD_texture_cube_map_array
- GL_AMD_texture_texture4
- GL_AMD_transform_feedback3_lines_triangles
- GL_AMD_transform_feedback4
- GL_AMD_vertex_shader_layer
- GL_AMD_vertex_shader_viewport_index
- GL_ARB_ES2_compatibility
- GL_ARB_ES3_1_compatibility
- GL_ARB_ES3_compatibility
- GL_ARB_arrays_of_arrays
- GL_ARB_base_instance
- GL_ARB_bindless_texture
- GL_ARB_blend_func_extended
- GL_ARB_buffer_storage
- GL_ARB_clear_buffer_object
- GL_ARB_clear_texture
- GL_ARB_clip_control
- GL_ARB_color_buffer_float
- GL_ARB_compressed_texture_pixel_storage
- GL_ARB_compute_shader
- GL_ARB_conditional_render_inverted
- GL_ARB_conservative_depth
- GL_ARB_copy_buffer
- GL_ARB_copy_image
- GL_ARB_cull_distance
- GL_ARB_debug_output
- GL_ARB_depth_buffer_float
- GL_ARB_depth_clamp
- GL_ARB_depth_texture
- GL_ARB_derivative_control
- GL_ARB_direct_state_access
- GL_ARB_draw_buffers
- GL_ARB_draw_buffers_blend
- GL_ARB_draw_elements_base_vertex
- GL_ARB_draw_indirect
- GL_ARB_draw_instanced
- GL_ARB_enhanced_layouts
- GL_ARB_explicit_attrib_location
- GL_ARB_explicit_uniform_location
- GL_ARB_fragment_coord_conventions
- GL_ARB_fragment_layer_viewport
- GL_ARB_fragment_program
- GL_ARB_fragment_program_shadow
- GL_ARB_fragment_shader
- GL_ARB_framebuffer_no_attachments
- GL_ARB_framebuffer_object
- GL_ARB_framebuffer_sRGB
- GL_ARB_geometry_shader4
- GL_ARB_get_program_binary
- GL_ARB_get_texture_sub_image
- GL_ARB_gl_spirv
- GL_ARB_gpu_shader5
- GL_ARB_gpu_shader_fp64
- GL_ARB_half_float_pixel
- GL_ARB_half_float_vertex
- GL_ARB_imaging
- GL_ARB_indirect_parameters
- GL_ARB_instanced_arrays
- GL_ARB_internalformat_query
- GL_ARB_internalformat_query2
- GL_ARB_invalidate_subdata
- GL_ARB_map_buffer_alignment
- GL_ARB_map_buffer_range
- GL_ARB_multi_bind
- GL_ARB_multi_draw_indirect
- GL_ARB_multisample
- GL_ARB_multitexture
- GL_ARB_occlusion_query
- GL_ARB_occlusion_query2
- GL_ARB_parallel_shader_compile
- GL_ARB_pipeline_statistics_query
- GL_ARB_pixel_buffer_object
- GL_ARB_point_parameters
- GL_ARB_point_sprite
- GL_ARB_program_interface_query
- GL_ARB_provoking_vertex
- GL_ARB_query_buffer_object
- GL_ARB_robust_buffer_access_behavior
- GL_ARB_sample_shading
- GL_ARB_sampler_objects
- GL_ARB_seamless_cube_map
- GL_ARB_seamless_cubemap_per_texture
- GL_ARB_separate_shader_objects
- GL_ARB_shader_atomic_counters
- GL_ARB_shader_ballot
- GL_ARB_shader_bit_encoding
- GL_ARB_shader_draw_parameters
- GL_ARB_shader_group_vote
- GL_ARB_shader_image_load_store
- GL_ARB_shader_image_size
- GL_ARB_shader_objects
- GL_ARB_shader_precision
- GL_ARB_shader_stencil_export
- GL_ARB_shader_storage_buffer_object
- GL_ARB_shader_subroutine
- GL_ARB_shader_texture_image_samples
- GL_ARB_shader_texture_lod
- GL_ARB_shader_viewport_layer_array
- GL_ARB_shading_language_100
- GL_ARB_shading_language_420pack
- GL_ARB_shading_language_packing
- GL_ARB_shadow
- GL_ARB_shadow_ambient
- GL_ARB_sparse_buffer
- GL_ARB_sparse_texture
- GL_ARB_spirv_extensions
- GL_ARB_stencil_texturing
- GL_ARB_sync
- GL_ARB_tessellation_shader
- GL_ARB_texture_barrier
- GL_ARB_texture_border_clamp
- GL_ARB_texture_buffer_object
- GL_ARB_texture_buffer_object_rgb32
- GL_ARB_texture_buffer_range
- GL_ARB_texture_compression
- GL_ARB_texture_compression_bptc
- GL_ARB_texture_compression_rgtc
- GL_ARB_texture_cube_map
- GL_ARB_texture_cube_map_array
- GL_ARB_texture_env_add
- GL_ARB_texture_env_combine
- GL_ARB_texture_env_crossbar
- GL_ARB_texture_env_dot3
- GL_ARB_texture_float
- GL_ARB_texture_gather
- GL_ARB_texture_mirror_clamp_to_edge
- GL_ARB_texture_mirrored_repeat
- GL_ARB_texture_multisample
- GL_ARB_texture_non_power_of_two
- GL_ARB_texture_query_levels
- GL_ARB_texture_query_lod
- GL_ARB_texture_rectangle
- GL_ARB_texture_rg
- GL_ARB_texture_rgb10_a2ui
- GL_ARB_texture_snorm
- GL_ARB_texture_stencil8
- GL_ARB_texture_storage
- GL_ARB_texture_storage_multisample
- GL_ARB_texture_swizzle
- GL_ARB_texture_view
- GL_ARB_timer_query
- GL_ARB_transform_feedback2
- GL_ARB_transform_feedback3
- GL_ARB_transform_feedback_instanced
- GL_ARB_transform_feedback_overflow_query
- GL_ARB_transpose_matrix
- GL_ARB_uniform_buffer_object
- GL_ARB_vertex_array_bgra
- GL_ARB_vertex_array_object
- GL_ARB_vertex_attrib_64bit
- GL_ARB_vertex_attrib_binding
- GL_ARB_vertex_buffer_object
- GL_ARB_vertex_program
- GL_ARB_vertex_shader
- GL_ARB_vertex_type_10f_11f_11f_rev
- GL_ARB_vertex_type_2_10_10_10_rev
- GL_ARB_viewport_array
- GL_ARB_window_pos
- GL_ATI_draw_buffers
- GL_ATI_envmap_bumpmap
- GL_ATI_fragment_shader
- GL_ATI_separate_stencil
- GL_ATI_texture_compression_3dc
- GL_ATI_texture_env_combine3
- GL_ATI_texture_float
- GL_ATI_texture_mirror_once
- GL_EXT_abgr
- GL_EXT_bgra
- GL_EXT_bindable_uniform
- GL_EXT_blend_color
- GL_EXT_blend_equation_separate
- GL_EXT_blend_func_separate
- GL_EXT_blend_minmax
- GL_EXT_blend_subtract
- GL_EXT_compiled_vertex_array
- GL_EXT_copy_buffer
- GL_EXT_copy_texture
- GL_EXT_depth_bounds_test
- GL_EXT_direct_state_access
- GL_EXT_draw_buffers2
- GL_EXT_draw_instanced
- GL_EXT_draw_range_elements
- GL_EXT_fog_coord
- GL_EXT_framebuffer_blit
- GL_EXT_framebuffer_multisample
- GL_EXT_framebuffer_object
- GL_EXT_framebuffer_sRGB
- GL_EXT_geometry_shader4
- GL_EXT_gpu_program_parameters
- GL_EXT_gpu_shader4
- GL_EXT_histogram
- GL_EXT_memory_object
- GL_EXT_memory_object_win32
- GL_EXT_multi_draw_arrays
- GL_EXT_packed_depth_stencil
- GL_EXT_packed_float
- GL_EXT_packed_pixels
- GL_EXT_pixel_buffer_object
- GL_EXT_point_parameters
- GL_EXT_polygon_offset_clamp
- GL_EXT_provoking_vertex
- GL_EXT_rescale_normal
- GL_EXT_secondary_color
- GL_EXT_semaphore
- GL_EXT_semaphore_win32
- GL_EXT_separate_specular_color
- GL_EXT_shader_image_load_store
- GL_EXT_shader_integer_mix
- GL_EXT_shadow_funcs
- GL_EXT_stencil_wrap
- GL_EXT_subtexture
- GL_EXT_texgen_reflection
- GL_EXT_texture3D
- GL_EXT_texture_array
- GL_EXT_texture_buffer_object
- GL_EXT_texture_compression_bptc
- GL_EXT_texture_compression_latc
- GL_EXT_texture_compression_rgtc
- GL_EXT_texture_compression_s3tc
- GL_EXT_texture_cube_map
- GL_EXT_texture_edge_clamp
- GL_EXT_texture_env_add
- GL_EXT_texture_env_combine
- GL_EXT_texture_env_dot3
- GL_EXT_texture_filter_anisotropic
- GL_EXT_texture_integer
- GL_EXT_texture_lod
- GL_EXT_texture_lod_bias
- GL_EXT_texture_mirror_clamp
- GL_EXT_texture_object
- GL_EXT_texture_rectangle
- GL_EXT_texture_sRGB
- GL_EXT_texture_sRGB_decode
- GL_EXT_texture_shared_exponent
- GL_EXT_texture_snorm
- GL_EXT_texture_storage
- GL_EXT_texture_swizzle
- GL_EXT_timer_query
- GL_EXT_transform_feedback
- GL_EXT_vertex_array
- GL_EXT_vertex_array_bgra
- GL_EXT_vertex_attrib_64bit
- GL_IBM_texture_mirrored_repeat
- GL_KHR_context_flush_control
- GL_KHR_debug
- GL_KHR_no_error
- GL_KHR_parallel_shader_compile
- GL_KHR_robust_buffer_access_behavior
- GL_KHR_robustness
- GL_KTX_buffer_region
- GL_NV_alpha_to_coverage_dither_control
- GL_NV_blend_square
- GL_NV_conditional_render
- GL_NV_copy_depth_to_color
- GL_NV_copy_image
- GL_NV_depth_buffer_float
- GL_NV_explicit_multisample
- GL_NV_float_buffer
- GL_NV_half_float
- GL_NV_primitive_restart
- GL_NV_texgen_reflection
- GL_NV_texture_barrier
- GL_OES_EGL_image
- GL_SGIS_generate_mipmap
- GL_SGIS_texture_edge_clamp
- GL_SGIS_texture_lod
- GL_SUN_multi_draw_arrays
- GL_WIN_swap_hint
- WGL_EXT_swap_control
- Implementation Dependent OpenGL Limits:
- ============================================
- Maximum DrawElements Vertices: 536870911
- Maximum DrawElements Indices: 536870911
- GLSL:
- Maximum Varying Floats: 128
- Maximum Vertex Attributes: 29
- Maximum Vertex Uniform Components: 16384
- Maximum Fragment Uniform Components: 16384
- Maximum Vertex Image Units: 32
- Maximum Fragment Image Units: 32
- Maximum Pipeline Image Units: 160
- Cycles:
- ============================================
- CPU device capabilities: SSE2 SSE3 SSE41 AVX AVX2
- OpenCL device capabilities:
- Number of platforms: 1
- Platform #0
- Platform Name: AMD Accelerated Parallel Processing
- Platform Vendor: Advanced Micro Devices, Inc.
- Platform Version: OpenCL 2.1 AMD-APP (2766.5)
- Platform Profile: FULL_PROFILE
- Platform Extensions: cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices
- Number of devices: 1
- Device: #0
- Device Name: Carrizo
- Device Board Name: AMD Radeon R6 Graphics
- Device Vendor: Advanced Micro Devices, Inc.
- Device OpenCL C Version: OpenCL C 2.0
- Device Profile: FULL_PROFILE
- Device Version: OpenCL 2.0 AMD-APP (2766.5)
- Device Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_depth_images cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_liquid_flash cl_amd_planar_yuv
- Device Max clock frequency (MHz): 720
- Device Max compute units: 6
- Device Max work group size: 256
- Enabled add-ons:
- ============================================
- io_scene_fbx (version: (4, 14, 5), path: I:\BlenderUpdater\2.80\scripts\addons\io_scene_fbx\__init__.py)
- io_anim_bvh (version: (1, 0, 0), path: I:\BlenderUpdater\2.80\scripts\addons\io_anim_bvh\__init__.py)
- io_mesh_ply (version: (1, 0, 0), path: I:\BlenderUpdater\2.80\scripts\addons\io_mesh_ply\__init__.py)
- io_scene_obj (version: (3, 5, 6), path: I:\BlenderUpdater\2.80\scripts\addons\io_scene_obj\__init__.py)
- io_scene_x3d (version: (2, 2, 1), path: I:\BlenderUpdater\2.80\scripts\addons\io_scene_x3d\__init__.py)
- io_mesh_stl (version: (1, 1, 3), path: I:\BlenderUpdater\2.80\scripts\addons\io_mesh_stl\__init__.py)
- io_mesh_uv_layout (version: (1, 1, 1), path: I:\BlenderUpdater\2.80\scripts\addons\io_mesh_uv_layout\__init__.py)
- io_curve_svg (version: UNKNOWN, path: I:\BlenderUpdater\2.80\scripts\addons\io_curve_svg\__init__.py)
- cycles (version: UNKNOWN, path: I:\BlenderUpdater\2.80\scripts\addons\cycles\__init__.py)
- io_scene_gltf2 (version: (0, 9, 2), path: I:\BlenderUpdater\2.80\scripts\addons\io_scene_gltf2\__init__.py)
- ant_landscape (version: (0, 1, 8), path: I:\BlenderUpdater\2.80\scripts\addons\ant_landscape\__init__.py)
- space_view3d_3d_navigation (version: (1, 2, 4), path: I:\BlenderUpdater\2.80\scripts\addons\space_view3d_3d_navigation.py)
- add_curve_ivygen (version: (0, 1, 5), path: I:\BlenderUpdater\2.80\scripts\addons\add_curve_ivygen.py)
- add_curve_sapling (version: (0, 3, 4), path: I:\BlenderUpdater\2.80\scripts\addons\add_curve_sapling\__init__.py)
- add_mesh_geodesic_domes (version: (0, 3, 3), path: I:\BlenderUpdater\2.80\scripts\addons\add_mesh_geodesic_domes\__init__.py)
- node_wrangler (version: (3, 35), path: I:\BlenderUpdater\2.80\scripts\addons\node_wrangler.py)
- rigify (version: (0, 5, 1), path: I:\BlenderUpdater\2.80\scripts\addons\rigify\__init__.py)
- RenderManForBlender-21_5_0 (version: (21, 5, 0), path: C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\RenderManForBlender-21_5_0\__init__.py)
- blenderkit (version: (1, 0, 22), path: I:\BlenderUpdater\2.80\scripts\addons\blenderkit\__init__.py)
- io_scene_valvesource (version: (2, 11, '0b1'), path: C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\io_scene_valvesource\__init__.py)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement