Commit Graph

5322 Commits

Author SHA1 Message Date
Sergey Sharybin
de7b7572c2 Fix T46030: Strange behavior of Cycles Brick Texture
Added some extra seed to the hash, so it's now less likely to give repetitive
patters at values around zero.

This will change distribution of bricks for existing files. but it's something
inevitable.
2015-09-18 17:32:17 +05:00
Campbell Barton
247b68476b Cycles: simplify logic for calculating dof-dist
Matches change from BKE_camera
2015-09-18 16:40:55 +10:00
Sergey Sharybin
3cee28ebf3 Fix T46143: Faces missing with GPU render
Epsilon was quite arbitrary for GPU, replaced with checking for zero-sized faces.

It should solve both original report and the new one. After the release we can check
why GPU doesn't produce accurate math here and go to the root of the issue.
2015-09-17 17:21:17 +05:00
Sergey Sharybin
89de6e9eac OpenSubdiv: Fix crash caused by accessing OpenGL vendor from non-main thread 2015-09-16 22:25:13 +05:00
Sergey Sharybin
cf4711bdf9 OpenSubdiv: Attempt to solve crash in background mode 2015-09-16 20:33:16 +05:00
Sergey Sharybin
0f19e6d1a7 Code cleanup, whitespace 2015-09-16 20:26:58 +05:00
Sergey Sharybin
7b3491f2c6 OpenSubdiv: Fix for missing caching of vendor string parsing result 2015-09-16 20:23:32 +05:00
Sergey Sharybin
19d17c8d90 Fllowup to previous commit, remove unused code 2015-09-16 20:20:16 +05:00
Sergey Sharybin
3f05d72a98 Fix T45708: OpenSubdiv crashes on Windows with Intel cards
Disable Intel cards for until we'll go to the root of the issue of the crash.
This will take a bit, so being so close to the release we go safe and disable
unstable GPU, so blender at least doesn't crash.

This could be bypassed by setting OPENSUBDIV_ALLOW_INTEL environment variable.
2015-09-16 19:28:40 +05:00
Campbell Barton
09e40a4956 Cleanup: spelling 2015-09-14 02:22:22 +10:00
Campbell Barton
84c44e026e Fix leak in ContextGLX 2015-09-11 01:48:31 +10:00
Sergey Sharybin
12e4103bdd Cycles: Attempt to fix 32bit CUDA kernels 2015-09-09 18:23:49 +05:00
Sergey Sharybin
145617c5eb OpenSubdiv: More graceful handling of shader compile/linking errors 2015-09-09 17:27:08 +05:00
Sergey Sharybin
1a04179802 Cycles: Cleanup, typo
Spotted by Campbell, thanks!
2015-09-09 14:25:43 +05:00
Sergey Sharybin
c87ee8da2c Fix T46055: Volume doesn't render when PANORAMIC Camera is inside volume mesh 2015-09-09 13:57:54 +05:00
Sergey Sharybin
d13a0e8f4a Cycles: Limit triangle magnitude check for only GPU
Found a way to make AVX2 CPUs happy by reshuffling instructions a bit,
so now there's no weird precision errors happening in there.

This solves some render speed regressions on CPU, but unfortunately
this doesn't help for GPU rendering.
2015-09-09 13:39:36 +05:00
Sergey Sharybin
46d2abf78f Cycles: Only use ascii in comments 2015-09-09 13:39:36 +05:00
Campbell Barton
d1d0f8eb1a Cleanup: quiet warnings 2015-09-08 19:42:58 +10:00
Sergey Sharybin
2cdfa3ea5b Cycles: Support building with latest upstream OSL
Only affects standalone part.
2015-09-08 13:10:00 +05:00
Sergey Sharybin
cb7c61ad54 Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles
Issue was caused by wrong viewplane used for standalone camera.
2015-09-08 13:07:08 +05:00
Sergey Sharybin
310764603a Cycles: Add missing initialization of fov for prev/next frames 2015-09-08 13:06:17 +05:00
Sergey Sharybin
92d12ab38b Cycles: Correction to integrator's transparent shadows
It was possible that deleting transparent BSDF from shader wouldn't
disable transparent shadows in integrator when doing viewport render.
2015-09-08 11:47:39 +05:00
Sergey Sharybin
6b0544eaaf Cycles: Update TODO, camera in volume is supported already 2015-09-08 11:29:14 +05:00
Sergey Sharybin
0e12228bd9 Fix T46045: Missing viewport update when adding transparent shader to material 2015-09-08 11:28:02 +05:00
Sergey Sharybin
1a7eca3c54 Fix T46034: OpenCL kernel compilation error in latest buildbot
Simply expanded expression, so no float4->float3 conversion happens.
2015-09-07 15:02:44 +05:00
Sergey Sharybin
83a36b2829 Cycles: Fix for wrong optimization of bump node
It can't be simply removed in cases when it's connected to input which is
different from Normal. This is because the input wouldn't be connected to
default Normal geometry input, possibly breaking shading setup.

The fix is not really ideal, but should work at least.

This fixes skin having too much glossy reflection in the file from T46013.
2015-09-04 20:06:31 +05:00
Sergey Sharybin
713ce037ab Cycles: Fix wrong check for zero-sized triangles
Initial idea was to optimize calculation a bit by skipping calculation of actual
triangle edges and use vector from ray origin to triangles. In practice this
optimization didn't quite work in cases when origin point is too close to the
triangle.

Let's do 2.76 with a bit more complicated calculation, still looking into exact
reasons why watertight intersections fails in certain cases, but actual fix might
bit be ready so soon.

This fixes wrong eyes on the lady from T46013.
2015-09-04 20:06:31 +05:00
Sergey Sharybin
52fda9b0db Fix T45019: Cycles wrong render of motion blur mesh
The issue was caused by wrong detection whether number of verticies
changed or not. Basically, it wasn't working correct in cases when
number of verticies is increasing compared to the current frame.
2015-09-04 15:19:22 +05:00
Julian Eisel
ef629e0d50 Quiet warnings
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-09-04 01:04:37 +02:00
Sergey Sharybin
b899114a7e Fix T45937: Cycles hair not rendered if children count set to zero 2015-09-03 18:54:50 +05:00
Sergey Sharybin
a4bcd9bc96 Cycles: Fix missing packed images with newer versions of OSL
This isn't really complete fix, complete fix would require calculating
derivatives via OIIO API, but supporting this will either end up with
some code duplication or will require some non really safe changes at
this release cycle.
2015-09-03 18:16:30 +05:00
Sergey Sharybin
0bc4bc2e61 Fix T45946: Cycles texture interpolation bug
Coordinate clamping was done in the wrong order.
2015-09-03 18:16:30 +05:00
Sergey Sharybin
357e749957 Cycles: Fix nondeterministic pass ordering when using baker 2015-09-03 13:52:56 +05:00
Sergey Sharybin
f387fe2b65 Cycles: Fix for uninitialized closure data
This might confuse closure merger.

Spotted by Campbell Barton, thanks!
2015-09-03 13:48:43 +05:00
Campbell Barton
922d72355d Cleanup: pep8 2015-09-01 13:03:38 +10:00
Thomas Dinges
879c5d4568 Cycles: Make the max value for World MIS Map Resolution a power of two.
Old value likely was a copy / paste error.
2015-08-31 18:17:16 +02:00
Thomas Dinges
26bad9e8f0 Cleanup: Fix some typos in volume code comments. 2015-08-31 18:14:51 +02:00
Sergey Sharybin
4ac5859f05 Cycles: Avoid copying objects in some places of BVH build
Gives barely measurable speedup of Spatial Split BVH build.
2015-08-30 16:48:16 +02:00
Jörg Müller
6a80c2c48b Audaspace: fix for building with scons.
Removed duplicated code.
CMake so far built only the now removed version and scons tried to build both.
2015-08-29 22:42:20 +02:00
Sergey Sharybin
a560122c4b OpenSubdiv: Remove some dead code 2015-08-28 12:46:52 +02:00
Sergey Sharybin
5908340f79 OpenSubdiv: Attempt to solve crash on certain GPUs/drivers 2015-08-27 11:05:23 +02:00
Antony Riakiotakis
a8be746609 OpenSubdiv: Fix error found by PerfectionCat,
Use glew, not gl constants to detect presence of extensions.
glProgramParameterEXTi is part of GLEW_EXT_geometry_shader4
2015-08-27 10:05:58 +03:00
Sergey Sharybin
2633928e1d Fix T45232: Cycles bake artifacts with transparent textures
The issue was caused by uninitialized ray used for composite and AO evaluation.

Can;t really think of "proper" ray configuration here, it's all a bit arbitrary
but think initializing the ray in a way so we look at the surface in a negative
normal direction is much better alternative to uninitialized ray.

Open for alternative suggestions tho.
2015-08-26 17:51:54 +02:00
Sergey Sharybin
6ca12d157f Fix T45909: Garbage output in Viewport with OpenSubdiv device set to GLSL Compute
This isn't a Blender issue and the same bug happens with official OpenSubdiv
examples. For until it's either worked around from OpenSubdiv side or fixed
in the driver we'll force disable GLSL Compute for AMD hardware.
2015-08-26 12:10:24 +02:00
Sergey Sharybin
bcc0d2fb1d OpenSubdiv: Fix/workaround bad shading on AMD devices
Uniform block data layout was different on CPU and GPU which caused wrong
data being used from shader.

In theory using layout(std140) is what we need to do, but for some reason
such layout specifier is being ignored. This is probably caused by the way
how we exploit extensions from older version of glsl.

For until we've upgraded our glsl pipeline used different approach which
is basically about removing unused fields form the struct manual in hope
that it'll keep memory layout consistent for both CPU and GPU.

This seems to work so far for both NVidia GTX580 and AMD FirePro W8000
here in the studio.
2015-08-26 12:07:38 +02:00
Sergey Sharybin
df9f4c2e4f OpenSubdiv: Add extra checks whether GPU compute available or not 2015-08-26 09:16:35 +02:00
Sergey Sharybin
7dc75ea8f4 Fix T45904: Cycles bug after recent triangle intersect changes
Calculated cross product from wrong vectors by accident.
2015-08-25 18:32:11 +02:00
Sergey Sharybin
ad0c2d6cbb Fix T45789: Materials with transparency not properly rendered in viewport in Material Render mode
This is a bit tricky one -- ideally viewport should detect whether alpha is used
in the shader tree and if so do separate viewport pass for that objects. But in
practice it's really tricky to detect whether alpha is affected by shader or not
without evaluating the tree for all possible input values. We also can't assume
that alpha might always be affected because it'll slow viewport drawing down.

For until some smart solution is found simply expose alpha blending mode used
by the viewport. It could be found below the Viewport Color settings.
2015-08-25 18:12:35 +02:00
Sergey Sharybin
669f2f0088 OpenSubdiv: Remove partitioned mesh interface
It's hopefully no longer needed, at least not needed for as long as
single ptex face corresponds to a single patch which should be always
correct for uniform subdivisions as far as i know.
2015-08-25 15:12:12 +02:00
Sergey Sharybin
f1e68474e0 OpenSubdiv: Support for multiple materials in solid shading mode
Implementation is less optimal compared to non-opensubdiv drawing but
it is now as good as we can do it without affecting on how patches are
being created by OpenSubdiv.
2015-08-25 15:11:56 +02:00